ffcd149a5a804dab0667ed32056300dc9a179825
[mono.git] / mono / mini / ChangeLog
1 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
2
3         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4         
5 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6
7         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
8         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
9         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
10         (mips_adjust_stackframe): handle FP spills
11                 
12         * mini-ops.h: add mips_mtc1_s2
13         
14         * cpu-mips.md: add mips_mtc1_s2
15         
16 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
17
18         * unwind.c: New file, move the unwind info encoding functions here from
19         aot-compiler.c, so they could be used at runtime too.
20
21 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
22
23         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
24         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
25         
26 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
27
28         * mini-mips.c: cleanup warnings
29         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
30         (mips_adjust_stackframe): handle case of taking the address of stack locals
31         
32 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
33
34         * aot-compiler.c: Implement a few functions missing from the asm writer.
35         (emit_method_code): Only write symbols for methods when using the bin
36         writer, since the assembler can't deal with the characters in our method
37         names.
38
39         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
40
41         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
42         call.
43
44         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
45         a bit to also restore %rax.
46
47 2008-12-05  Mark Probst  <mark.probst@gmail.com>
48
49         * mini-ppc.c: Some simple merges from mini-ppc64.c.
50
51 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
52
53         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
54         arguments.
55
56 2008-12-05  Mark Probst  <mark.probst@gmail.com>
57
58         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
59
60         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
61         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
62
63         * exceptions-ppc64.c: Removed.
64
65         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
66
67 2008-12-05  Mark Probst  <mark.probst@gmail.com>
68
69         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
70         tramp-ppc64.c.
71
72         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
73
74         * tramp-ppc64.c: Removed.
75
76 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
77
78         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
79         the TYPESPEC table.
80
81 2008-12-05  Mark Probst  <mark.probst@gmail.com>
82
83         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
84
85         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
86         mini-ppc.h instead of mini-ppc64.h.
87
88         * mini-ppc64.h: Removed.
89
90 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
91
92         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
93         
94         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
95         
96 2008-12-05  Mark Probst  <mark.probst@gmail.com>
97
98         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
99         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
100         code easier.
101
102 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
103
104         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
105
106 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
107
108         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
109
110 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
111
112         * basic-simd.cs: Tests for operator == and != on Vector4f.
113
114 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
115
116         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
117
118         * simd-intrinsics.c: Kill useless enum.
119
120 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
121
122         * cpu-mips.md: add long_conv_to_ovf_i4_2
123         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
124
125 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
126
127         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
128         
129         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
130
131 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
132
133         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
134         
135 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
136
137         * basic-simd.cs: Add tests for new methods.
138
139 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
140
141         * simd-intrinsics.c: Add support for operator == and !=
142         on Vector4(u)i.
143
144         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
145
146 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
147
148         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
149
150 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
151
152         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
153
154         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
155         MONO_PATCH_INFO_ICALL_ADDR.
156
157         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
158
159         * aot-compiler.c: Resurrect full-aot support.
160
161 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
162
163         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
164         
165 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
166
167         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
168         
169 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
170
171         * basic-simd.cs: Fix tests to work under ppc.
172         Remove tests for methods that will be removed.
173
174 2008-12-03  Mark Probst  <mark.probst@gmail.com>
175
176         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
177         generic type (via a typedef or typeref) correctly.
178
179 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
180
181         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
182         diagnose an assertion failure.
183
184 2008-12-02  Mark Probst  <mark.probst@gmail.com>
185
186         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
187         Fix trampoline size.
188
189         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
190         conversion opcodes are implemented natively instead via emulation.
191
192 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
193
194         * cpu-mips.md: remove mips_xori
195
196         * mini-ops.h:  remove mips_xori
197
198         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
199
200         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
201         
202         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
203         
204 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
205
206         * cpu-mips.md: fix instruction lengths.
207
208         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
209
210         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
211
212         * mini-ops.h: fix slti / sltiu op profiles.
213         
214 2008-12-02  Martin Baulig  <martin@ximian.com>
215
216         * method-to-ir.c (mono_method_to_ir): Disable debugging
217         information for the init locals block to make the debugger stop
218         after all locals have been initalized.
219
220 2008-12-02  Martin Baulig  <martin@ximian.com>
221
222         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
223         running inside the debugger.
224
225 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
226
227         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
228         is enabled.
229
230         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
231         alu->alu imm optimization which only shows if deadce is disabled.
232
233         * aot-compiler.c: Rename the function names for the binary and asm writers
234         so they can coexist in the same process. Rework the xdebug code to use the
235         asm writer. This avoids the need to call into the runtime to dump the
236         debugging info. Add more debugging info for types.
237
238         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
239
240         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
241         cpu description tables, they can't occur in cpu-<ARCH>.md.
242
243         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
244         the stack in CEE_LDFLDA. Fixes #450542.
245
246         * generics.cs: Add a new test.
247
248 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
249
250         * mini-ops.h: updated MIPS opcodes
251         * mini-mips.c: decompose long opts
252         * mini-mips.h: decompose long opts
253         
254 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
255
256         * cpu-mips.md: fix length on int_rem_un
257         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
258         
259 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
260
261         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
262
263         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
264
265 2008-11-29  Martin Baulig  <martin@ximian.com>
266
267         * mini-exceptions.c (mono_handle_native_sigsegv): Check
268         mono_debug_using_mono_debugger() in addition to the
269         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
270
271 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
272
273         * mini-ops.h: updated more MIPS opcodes
274         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
275         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
276         
277 2008-11-28  Mark Probst  <mark.probst@gmail.com>
278
279         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
280
281 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
282
283         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
284         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
285         * mini-ops.h: correct selected mips opcode entries
286         
287 2008-11-28  Mark Probst  <mark.probst@gmail.com>
288
289         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
290         make them work.
291
292 2008-11-28  Mark Probst  <mark.probst@gmail.com>
293
294         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
295
296 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
297
298         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
299         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
300         * mini-mips.h: disable IMT
301         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
302         
303 2008-11-28  Mark Probst  <mark.probst@gmail.com>
304
305         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
306
307 2008-11-28  Mark Probst  <mark.probst@gmail.com>
308
309         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
310
311 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
312
313         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
314         consistency.
315
316 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
317
318         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
319         for Set/GetVector aligned versions.
320
321 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
322
323         * basic-simd.cs: Add tests for Get/SetVector.
324
325 2008-11-27  Mark Probst  <mark.probst@gmail.com>
326
327         * mini.c: Removed g_slist_append_mempool().  Now in
328         metadata/mempool.c.
329
330 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
331
332         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
333         size properly and make the bounds check optional.
334
335         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
336         for SetVector and IsAligned.
337
338 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
339
340         * mini.c: Remove unused mono_normalize_opcodes () function.
341
342 2008-11-26  Mark Probst  <mark.probst@gmail.com>
343
344         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
345         using the new atomic add ops now.
346
347         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
348         add.
349
350 2008-11-26  Mark Probst  <mark.probst@gmail.com>
351
352         * mini-ppc64.c: Several fixes.
353
354 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
355
356         * cpu-mips.md: added jump_table
357         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
358
359 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
360
361         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
362
363 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
364
365         * mini-ops.h: corrected a handful of MIPS opcodes.
366
367 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
368
369         * aot-compiler.c: MIPS to use ELF writer
370
371 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
372
373         * mini-codegen.c: remove MIPS specific assert.
374
375 2008-11-25  Mark Probst  <mark.probst@gmail.com>
376
377         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
378         fixes.  PPC64 now passes most of the runtime regressions.
379
380 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
381
382         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
383         volatile intervals a bit.
384
385 2008-11-24  Mark Probst  <mark.probst@gmail.com>
386
387         * basic-long.cs: New test case.
388
389 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
390
391         * mini.c (mini_method_compile): Disable globalra for large methods for 
392         now.
393
394         * regalloc2.c (order_moves): Add fp support.
395
396         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
397         source bblock ends with an OP_BR_REG.
398
399         * ratests.cs: Add a new test.
400
401 2008-11-23  Mark Probst  <mark.probst@gmail.com>
402
403         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
404         sharing.  PPC64 now passes generics.exe.
405
406 2008-11-23  Mark Probst  <mark.probst@gmail.com>
407
408         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
409
410 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
411
412         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
413         memory when mono_jit_info_table_find () can't find the method in the
414         LMF case.
415
416         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
417         AOTed code too.
418         
419         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
420         writer too.
421
422 2008-11-23  Mark Probst  <mark.probst@gmail.com>
423
424         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
425         Several fixes.  PPC64 now runs exceptions.exe and
426         devirtualization.exe.
427
428 2008-11-22  Mark Probst  <mark.probst@gmail.com>
429
430         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
431         arrays.exe and basic-math.exe.
432
433 2008-11-22  Mark Probst  <mark.probst@gmail.com>
434
435         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
436         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
437
438 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
439
440         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
441
442 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
443
444         * method-to-ir.c: Move bounds checking macros to ir-emit.h
445
446         * ir-emit.h: Move macros from method-to-ir.c to here.
447
448 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
449
450         * mini-ops.h: Correct the long simd ops to use LREG.
451
452 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
453
454         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
455         
456         * mini-ops.h: Correct the dreg type of a few long opcodes.
457
458         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
459         Add netbsd support.
460
461 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
462
463         * mini-ppc.c: remove negative stack references in epilog
464         for platforms that don't support the red zone.
465
466 2008-11-21  Mark Probst  <mark.probst@gmail.com>
467
468         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
469         point regs.  Now PPC64 passes basic-calls.exe.
470
471 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
472
473         * basic-simd.cs: Add tests for accessors of Vector2l.
474
475 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
476
477         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
478
479         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
480         
481         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
482
483 2008-11-21  Mark Probst  <mark.probst@gmail.com>
484
485         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
486         PPC64 passes basic-long.exe.
487
488 2008-11-20  Mark Probst  <mark.probst@gmail.com>
489
490         * decompose.c: Decompose carry and overflow add on PPC64 like on
491         other 64 bit archs.  Don't decompose sub at all on PPC64.
492
493         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
494         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
495         basic-long.exe.
496
497 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
498
499         * basic-simd.cs: Add tests for accessors of Vector2d.
500
501 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
502
503         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
504
505         * cpu-x86.md: Same.
506
507         * mini-x86.c (mono_arch_output_basic_block): Same.
508         
509         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
510
511 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
512
513         * basic-simd.cs: Add tests for accessors of Vector4f.
514
515 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
516
517         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
518
519         * cpu-x86.md: Same.
520
521         * mini-x86.c (mono_arch_output_basic_block): Same.
522         
523         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
524
525 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
526
527         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
528
529 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
530
531         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
532
533         * cpu-x86.md: Same.
534
535         * mini-x86.c (mono_arch_output_basic_block): Same.
536         
537         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
538
539 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
540
541         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
542
543 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
544
545         * simd-intrinsics.c: Enable setters for Vector16sb.
546
547 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
548
549         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
550
551         * cpu-x86.md: Same.
552
553         * mini-x86.c (mono_arch_output_basic_block): Same.
554         
555         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
556
557 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
558
559         * simd-intrinsics.c: Implement setter for Vector8us.
560
561 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
562
563         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
564         for dead variables.
565
566 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
567
568         * mini-ppc.c: remove references to the red zone in the prolog
569         (for systems that don't support it).
570
571 2008-11-19  Mark Probst  <mark.probst@gmail.com>
572
573         * cpu-ppc64.md: Fixed a few instruction lengths.
574
575         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
576         now.
577
578 2008-11-19  Mark Probst  <mark.probst@gmail.com>
579
580         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
581         basic.exe now.
582
583 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
584
585         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
586
587 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
588
589         * mini-ops.h: Added OP_INSERT_I2.
590
591         * cpu-x86.md: Same.
592
593         * mini-x86.c (mono_arch_output_basic_block): Same.
594         
595         * simd-intrinsics.c: Implement setter for Vector8s.
596
597         * simd-methods.h: Add the names of get setters of Vector8s.
598
599 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
600
601         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
602         
603         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
604         parameters.
605
606         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
607
608 2008-11-18  Mark Probst  <mark.probst@gmail.com>
609
610         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
611         for PPC64.  An empty program runs now.
612
613 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
614
615         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
616
617         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
618         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
619         info for JITted code is emitted into a shared library, loadable into gdb.
620
621 2008-11-18  Mark Probst  <mark.probst@gmail.com>
622
623         * Makefile.am: Changes to build PPC64.
624
625         * mini-arch.h: Include mini-ppc64.h on PPC64.
626
627 2008-11-18  Mark Probst  <mark.probst@gmail.com>
628
629         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
630         in PPC code up to r119147.
631
632 2008-11-18  Mark Probst  <mark.probst@gmail.com>
633
634         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
635         cpu-ppc64.md: Changes for PPC64.
636
637         Based on code submitted by andreas.faerber@web.de at
638         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
639         X11/MIT license.
640
641 2008-11-18  Mark Probst  <mark.probst@gmail.com>
642
643         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
644         cpu-ppc64.md: Copied from the corresponding PPC files from
645         r118846.
646
647 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
648
649         * mini-ops.h: Added OP_ROUND.
650
651         * cpu-x86.md: Added round.
652
653         * mini-x86.c: Added support for intrinsicing Math.Round (double).
654
655         * basic-math.cs: Added test_0_round to test rounding.
656
657         Contributed under MIT/X11 license.
658
659 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
660
661         * aot-compiler.c : Fix the Winx64 build.
662
663         Contributed under MIT/X11 license.
664
665 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
666
667         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
668         in OP_EXTRACT_R8 to avoid possible stack corruption.
669
670 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
671
672         * mini-ops.h: Added OP_EXTRACT_R8/I8.
673
674         * cpu-x86.md: Added extract_r8.
675
676         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
677         
678         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
679         a couple of OP_EXTRACT_I4.
680
681         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
682
683         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
684
685 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
686
687         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
688         and not 4.1. 
689
690 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
691
692         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
693         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
694
695         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
696         are not needed any more.
697
698         * mini.h: Remove the unused INS_LIST macros.
699
700         * mini.c (mini_method_compile): Remove a disable globalra case which is no
701         longer needed.
702
703         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
704         ir-emit.h.
705
706         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
707         mono_alloc_ireg () instead.
708
709         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
710         macros.
711
712         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
713         on amd64.
714
715         * aot-runtime.c (load_aot_module): Disable AOT when running under
716         CAS.
717
718         * mini-amd64.h: Change the monitor fastpath defines to check for
719         !PLATFORM_WIN32 so they work on *bsd too.
720
721         * mini.h mini.c mini-hhpa.c: Remove more unused code.
722
723         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
724
725         * mini.h (MonoCompile): Remove new_ir flag.
726
727         * regalloc.h regalloc.c: Remove unused code.
728
729         * cpu-*.md: Remove more unused opcodes.
730
731         * simple-cee-ops.h simple-mini-ops.h: Removed.
732
733         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
734         
735 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
736
737         * aliasing.h: Removed.
738
739         * *.c: Remove references to aliasing.h and inssel.h.
740
741         * mini.c: Remove additional unused functions.
742
743         * mini-ops.h cpu-*.md: Remove unused opcodes.
744
745 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
746
747         Remove the old JIT code.
748
749         * inssel*.brg: Removed.
750
751         * ssa.c abcremoval.c aliasing.c: Removed.
752
753         * ssa2.c: Renamed to ssa.c.
754
755         * abcremoval2.c: Renamed to abcremoval.c.
756
757         * *.c: Removed all !cfg->new_ir code.
758
759         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
760         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
761
762         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
763         
764 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
765
766         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
767         to simplify the code and cut back on the number of global symbols in the AOT
768         file.
769         
770         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
771
772 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
773
774         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
775         with the got/got_info tables.
776
777         * mini.h: Bump AOT file format version.
778         
779         * unwind.h: New file, contains definitions for stack unwinding.
780
781         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
782         to cfg->unwind_ops.
783         
784         * aot-compiler.c: Generalize the emitting of unwind information to use the
785         information in cfg->unwind_ops.
786
787         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
788
789         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
790         AOT method frames. Enable writing symbols for methods by default.
791
792 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
793
794         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
795         and make it work with vectors of element sizes 1, 2 and 4.
796
797         * simd-intrinsics.c: Enable getter for all vectors with element size
798         1, 2 or 4.
799
800         * simd-methods.h: Add the names of other getters.
801
802         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
803
804         * cpu-x86.md: Same.
805
806         * mini-x86.c: Same.
807
808 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
809
810         * mini-ppc.h: portability fix.
811
812 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
813
814         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
815         buggy and will overwrite it.
816
817 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
818
819         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
820         Use it to emit local symbols for all methods so AOTed methods show up with
821         their full name in gdb/valgrind output.
822
823 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
824
825         * mini-ppc.c: portability fixes.
826
827 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
828
829         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
830         entries out of the if (!generic_shared...) code so it is always done.
831         (mono_class_init_trampoline): Do the patching when running under valgrind
832         too, newer versions of valgrind have no problems with it.
833
834 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
835
836         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
837         further sections.
838
839 2008-11-13  Mark Probst  <mark.probst@gmail.com>
840
841         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
842         filters.
843
844 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
845
846         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
847
848 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
849
850         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
851
852         * cpu-x86.md: Same.
853
854         * mini-x86.c: Same.
855
856         * simd-intrinsics.c: Same.
857
858 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
859
860         * simd-intrinsics.c: Enable constructor intrinsics for all types.
861
862 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
863
864         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
865         to work with more Vector types.
866
867 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
868
869         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
870         store the elemens directly instead of using and intermediate.
871
872 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
873
874         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
875
876         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
877         to preserve %eax for aot plt trampolines.
878
879         * aot-compiler.c (compile_method): Don't skip synchronized methods.
880         (encode_method_ref): Flag synchronized methods so they won't go through
881         the AOT trampoline.
882
883         * aot-compiler.c: Additional work to support AOTing synchronized methods/
884         wrappers.
885
886         * cpu-ia64.md (jmp): Increase max length.
887
888 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
889
890         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
891         open generic classes.
892
893         * aot-compiler.c: Enable the ELF writer on ELF platforms.
894
895         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
896         box+brtrue optimization since it causes test failures on x86.
897
898 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
899
900         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
901
902         * cpu-x86.md: Same.
903
904         * mini-x86.c: Same.
905
906         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
907         for simd ctor values. 
908
909         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
910         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
911
912 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
913
914         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
915         LogicalRightShift.
916
917         * simd-instrincs.c: Same.
918
919         * basic-simd.cs: Same.
920
921 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
922
923         * ratests.cs: Add more tests.
924
925         * regalloc2.c (add_spill_code): Handle more corner cases.
926
927 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
928
929         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
930         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
931         both the source an destination of an instruction.
932
933 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
934
935         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
936         wapihandles.c: more portability changes.
937
938 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
939
940         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
941         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
942         safe to execute in a signal handler and the kernel provides better
943         the info in /proc/self/smaps. Avoid the assert on sigaction during
944         cleanup.
945
946 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
947
948         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
949         do the bblock linking hack if it is actually needed.
950
951         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
952         up linking.
953
954         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
955         crash problem is fixed.
956
957         * branch-opts.c (mono_remove_critical_edges): Link up newly added
958         bblocks.
959
960         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
961         for catch clauses.
962         (mini_method_compile): Set the starting value of next_vreg to 
963         MAX_IREGS + MAX_FREGS when using globalra.
964
965         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
966         filter clauses with BB_EXCEPTION_HANDLER.
967
968         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
969
970 2008-11-10  Mark Probst  <mark.probst@gmail.com>
971
972         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
973         space for stdcall.  Fixes regressions on Win32.
974
975 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
976
977         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
978         bblocks.
979         (linear_scan): Remove an assert which doesn't seem to be needed.
980
981         * local-propagation.c (mono_local_deadce): Avoid a call to
982         MONO_DELETE_INS which would screw up the instruction linking.
983
984         * mini.c (mono_decompose_op_imm): Make this work with globalra.
985
986         * regalloc2.c: Upgrade to work the current JIT code.
987
988 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
989
990         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
991         case.
992
993         * aot-runtime.c: Remove some dead code.
994
995         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
996         consistency.
997         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
998
999         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1000         trampolines using sscanf since atoi doesn't work on large unsigned values.
1001
1002         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
1003         Initialize code_size.
1004
1005 2008-11-08  Mark Probst  <mark.probst@gmail.com>
1006
1007         * method-to-ir.c (mini_emit_inst_for_method): Make
1008         Interlocked.CompareExchange work for Int arguments on 32 bit
1009         archs, as well.
1010
1011 2008-11-07  Mark Probst  <mark.probst@gmail.com>
1012
1013         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1014
1015 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
1016
1017         * main.c Fix MSVC build.
1018
1019         Contributed under MIT/X11 license.
1020
1021 2008-11-06  Mark Probst  <mark.probst@gmail.com>
1022
1023         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1024         alignment larger than 8 bytes are aligned correctly, too.
1025
1026         * mini.c: Honor the min_align field of MonoClass when laying out
1027         the stack.
1028
1029 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1032
1033         * aot-compiler.c (emit_plt): Fix a warning.
1034         
1035         * aot-compiler.c: Implement ARM support in the binary writer.
1036
1037 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1038
1039         * basic-simd.cs: Add test for getter with byref arg.
1040         Fix the naming of a few tests.
1041         Add missing checks to a test.
1042
1043 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1044
1045         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1046
1047         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1048         most of the full-aot support for monitor enter/exit trampolines.
1049
1050         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1051         enter/exit trampoline creation functions.
1052
1053         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1054         make dist.
1055
1056 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1057
1058         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1059         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1060         implement the needed functionality without adding crap to the runtime.
1061
1062 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1063
1064         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1065         non-x86 builds.
1066
1067         * mini.c (mono_build_date): New global version holding the build date in
1068         string format.
1069         
1070         * Makefile.am (buildver.c): Generate a file containing the build date.
1071
1072         * main.c: Set the build date from the generated file.
1073
1074         * mini.c (mono_get_runtime_build_info): New helper function returning build
1075         information in a string format.
1076         
1077         * driver.c (mono_main): Print the build date in --version.
1078
1079         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1080         file when the bind-to-runtime-version option is used.
1081
1082 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1083
1084         * simd-intrinsics.c: Fix bug when using getters and byref args. 
1085
1086 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1087
1088         * simd-methods.h: Rename prefetch methods.
1089
1090         * simd-intrinsics.c: Same.      
1091
1092 2008-11-05  Mark Probst  <mark.probst@gmail.com>
1093
1094         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1095         sizes.
1096
1097 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1098
1099         * aot-compiler.c: Use the bundled elf header files instead of depending on
1100         the system one.
1101         
1102         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
1103         mempool.
1104
1105         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
1106         on every call.
1107
1108 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
1109
1110         * cpu-x86.md: Add store nta ops.
1111
1112         * mini-ops.h: Same.
1113
1114         * mini-x86.c: Same.
1115
1116         * mini.h: Add an enum for simd prefetch modes.
1117
1118         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
1119         of store. Use the changed code to support store nta.
1120
1121         * simd-intrinsics.c: Add prefetch ops for all vector types.
1122
1123 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1124
1125         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
1126         threads.
1127         
1128         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
1129         names.
1130
1131         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
1132         trampolines.
1133
1134 2008-11-04  Mark Probst  <mark.probst@gmail.com>
1135
1136         * mini-x86.c: Fixed commit.
1137
1138 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1139
1140         * aot-compiler.c (emit_plt): Align the plt section only on x86.
1141
1142 2008-11-04  Mark Probst  <mark.probst@gmail.com>
1143
1144         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
1145         and MONITOR_EXIT, for the ASM fastpaths.
1146
1147         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
1148         available.
1149
1150         * mini.c, patch-info.h: Signature and patch infos for
1151         Monitor.Enter/Exit trampolines.
1152
1153         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
1154
1155         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
1156         Monitor.Enter/Exit ASM fastpath for Linux.
1157
1158 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1159
1160         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
1161
1162         * objects.cs: Add a new test.
1163         
1164         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
1165
1166         * aot-runtime.c (load_method): Run class initialization in the PLT case even
1167         if MONO_LOG_LEVEL is set.
1168
1169         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
1170
1171         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
1172
1173         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
1174         
1175         * aot-compiler.c: Change the relocation code to use virtual addresses instead
1176         of file offsets. Align the sections belonging to the data segment to 
1177         PAGESIZE.
1178
1179 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
1180
1181         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
1182         elf.h. Port it to amd64.
1183
1184 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
1185
1186         * driver.c: Enable SIMD by default.
1187
1188 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
1189
1190         * cpu-x86.md: Add prefetch op.
1191
1192         * mini-ops.h: Same.
1193
1194         * mini-x86.c: Same.
1195
1196         * mini.h: Add an enum for simd prefetch modes.
1197
1198         * simd-methods.h: Add prefetch function names.
1199
1200         * simd-intrinsics.c: Add prefetch ops for all vector types.
1201
1202 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
1203
1204         * aot-compiler.c (emit_bytes): Speed this up a little.
1205
1206 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
1207
1208         * aot-compiler.c: Add JIT time etc. statistics.
1209         
1210         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
1211
1212         * mini.h (MonoCompile): Add 'got_offset' field.
1213
1214         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
1215         method_got_offsets array.
1216
1217         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
1218         wrappers.
1219
1220         * aot-compiler.c (compile_method): Add generic method instances referenced
1221         by the method to the list of methods to be compiled, this is required so if
1222         A<T> references B<T>, and another assembly references A<int>, then it will
1223         also get a copy of B<int>.
1224
1225         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
1226         when checking for monitor enter/exit.
1227
1228 2008-10-30  Mark Probst  <mark.probst@gmail.com>
1229
1230         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
1231         for Monitor.Enter and Monitor.Exit if enabled.
1232
1233         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
1234         Solaris.
1235
1236 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
1237
1238         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
1239         of an OP_MOVE. Fixes #440046.
1240
1241         * basic-long.cs: Add a new test.
1242
1243 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
1244
1245         * mini.h: Add synchronization note for the managed counter-part.
1246
1247         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
1248         returns the simd caps of the current cpu.
1249
1250 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
1251
1252         * basic-simd.cs: Remove Console.WriteLine.
1253
1254 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1255
1256         * basic-simd.cs: New tests for Vector2ul.
1257
1258 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1259
1260         * simd-intrinsics.c: Add new vector type Vector2ul.
1261
1262 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1263
1264         * basic-simd.cs: New tests for Vector2l.
1265
1266 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1267
1268         * cpu-x86.md: Add long version of most packed int ops.
1269
1270         * mini-ops.h: Same.
1271
1272         * mini-x86.h: Same.
1273
1274         * simd-intrinsics.c: Add new vector type Vector2l.
1275
1276 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1277
1278         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
1279
1280         * simd-methods.h: Remove SN_op_BitwiseXor.
1281
1282 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
1283
1284         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
1285         alignment.
1286
1287 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
1288
1289         * basic-simd.cs: Test for Vector2d.
1290
1291         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
1292         value.
1293
1294 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
1295
1296         * cpu-x86.md: Add double version of all packed float ops.
1297
1298         * mini-ops.h: Same.
1299
1300         * mini-x86.h: Same.
1301
1302         * simd-intrinsics.c: Add new vector type Vector2d.
1303
1304         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
1305
1306         * simd-methods.h: Add Duplicate.
1307
1308 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
1309
1310         * basic-simd.cs: Test for packing with signed saturation.
1311
1312 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
1315         found in the TYPESPEC table.
1316
1317 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
1318
1319         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
1320         too.
1321
1322         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1323
1324         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
1325         instead of the RVA, since the RVA can be changed by tools like the cil 
1326         stripper.
1327
1328         * method-to-ir.c (mono_method_to_ir2): Ditto.
1329
1330         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
1331         (deserialize_variable): Ditto.
1332
1333 2008-10-25  Martin Baulig  <martin@ximian.com>
1334
1335         * debug-mini.c (write_variable): Use
1336         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
1337
1338 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1339
1340         * cpu-x86.md: Add unsigned variants of packd and packw.
1341
1342         * mini-ops.h: Same.
1343
1344         * mini-x86.h: Emit the right instruction for packd and packw.
1345         Add unsigned variants of packd and packw.
1346
1347         * simd-intrinsics.c: Packd and packw were used in place of their
1348         unsigned variants. Change that.
1349         Add intrinsics for (Signed)PackWithSignedSaturation.
1350
1351         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
1352
1353 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1354
1355         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
1356
1357 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1358
1359         * mini-ops.h: Remove dword packed add/sub with saturation ops.
1360
1361         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
1362
1363         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
1364         sse instructions.
1365
1366         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
1367
1368 2008-10-24  Mark Probst  <mark.probst@gmail.com>
1369
1370         * method-to-ir.c, mini.c: Special casing for the synchronized
1371         wrapper for the ldtoken+GetTypeFromHandle case.
1372
1373 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
1374
1375         * mini.c (mono_replace_ins): Move this to branch-opts.c.
1376
1377         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
1378         created/split bblocks.
1379
1380 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1381
1382         * mini-ops.h: Add packed signed mul high.
1383         
1384         * cpu-x86.md: Same.
1385
1386         * mini-x86.c (mono_arch_output_basic_block): Same.
1387
1388         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
1389
1390         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
1391
1392 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1393
1394         * basic-simd.cs: Tests for Vector16sb.
1395
1396 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
1397
1398         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
1399
1400 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
1401
1402         * mini-ops.h: Add packed signed min, max and compare greater.
1403         
1404         * cpu-x86.md: Same.
1405
1406         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
1407         saturation.
1408
1409         * simd-methods.h: Add CompareGreaterThan.
1410
1411         * simd-methods.h: Remove CompareEquals.
1412
1413         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
1414
1415         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
1416
1417         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
1418         CompareEqual.
1419
1420 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
1421
1422         * basic-simd.cs: Fix tests due to change in the API.
1423
1424 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1425
1426         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
1427
1428 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
1429
1430         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
1431
1432         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
1433         inst_offset as this has invalid values for LDADDR.
1434
1435 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
1436
1437         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
1438
1439         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
1440
1441 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
1444         for accessing field->data.
1445
1446 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
1447
1448         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
1449
1450 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
1451
1452         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
1453
1454         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
1455
1456 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1457
1458         * dominators.c (mono_compute_natural_loops): Allocate GList enties
1459         from the cfg mempool.
1460
1461 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
1462
1463         * basic-simd.cs: Tests for new methods in Vector8us.
1464
1465 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
1466
1467         * mini-ops.h: Add multiply and store high.
1468         
1469         * cpu-x86.md: Same.
1470
1471         * mini-x86.c (mono_arch_output_basic_block): Same.
1472
1473         * simd-methods.h: Same.
1474
1475         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
1476         and CompareEqual.
1477
1478 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
1479
1480         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
1481         mono_class_setup_vtable ().
1482
1483         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
1484         mono_class_get_vtable_entry () for accessing klass->vtable.
1485
1486         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
1487
1488         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
1489         found.
1490
1491         * method-to-ir.c (mono_save_token_info): Don't save references made from
1492         wrappers.
1493
1494         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
1495         of generic instances.
1496
1497         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
1498
1499 2008-10-19  Mark Probst  <mark.probst@gmail.com>
1500
1501         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
1502         OP_JMP depends on the method signature.  Calculate it properly.
1503
1504 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
1505         
1506         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
1507         called directly.
1508
1509         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
1510         instances.
1511         (emit_extra_methods): Add another table mapping method indexes to 
1512         offsets in the extra_method_info table.
1513
1514         * mini.h: Bump AOT file format version.
1515         
1516         * aot-runtime.c: Merge most of the code from mono_aot_get_method
1517         and mono_aot_get_method_from_token () into one function.
1518
1519 2008-10-19  Mark Probst  <mark.probst@gmail.com>
1520
1521         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
1522         separate counter.
1523
1524 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
1525
1526         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
1527         methods.
1528
1529         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
1530         disable_aot.
1531
1532         * mini.c (mono_patch_info_equal): Compare the generic context as well.
1533
1534         * mini.h: Bump aot file format version.
1535
1536         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
1537         AOT file can contain native code for methods which are not in the METHOD
1538         table. Generate code for non-sharable generic instances of generic methods
1539         found in the METHODSPEC table.
1540         
1541         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
1542         encoding generic type handles.
1543
1544         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
1545         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
1546
1547         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
1548         macros + MONO_ADD_INS.
1549
1550         * mini.c (mono_jump_info_token_new2): New function which takes a generic
1551         context as well.
1552
1553         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
1554
1555         * mini.h: Bump aot file format version.
1556
1557         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
1558
1559 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1560
1561         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
1562         platforms, with definable stack alignment value.  Set to 16 now
1563         for all platforms.
1564
1565         * mini.c, mini.h, driver.c: Command line option for disabling
1566         stack alignment.
1567
1568 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1569
1570         * basic-simd.cs: Tests for new methods in Vector4ui.
1571
1572 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1573
1574         * mini-ops.h: Add packed int shuffle.
1575         
1576         * cpu-x86.md: Same.
1577
1578         * mini-x86.c (mono_arch_output_basic_block): Same.
1579
1580         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
1581         extract mask, max, min, shuffle.
1582
1583         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
1584
1585 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1586
1587         * basic-simd.cs: Tests for new methods in Vector8us.
1588
1589 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1590
1591         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
1592         RuntimeTypeHandle, not a TypedReference.
1593
1594 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
1595
1596         * simd-intrinsics.c: remove relocations.
1597
1598 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
1599
1600         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
1601         optimizations from the x86 backend.
1602
1603 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
1604
1605         * simd-methods.h, simd-intrinsics.c: debloat method names and
1606         prepare for no relocations.
1607
1608 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1609
1610         * mini-ops.h: Add packed min/equal and sum of absolute differences.
1611         
1612         * cpu-x86.md: Same.
1613
1614         * mini-x86.c (mono_arch_output_basic_block): Same.
1615
1616         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
1617         extract mask, max, min and sum of absolute differences.
1618
1619         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
1620         method name.
1621
1622 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1623
1624         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
1625         Renamed one test for consistency.
1626
1627 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1628
1629         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
1630         fix to the code that deal with other blocks.
1631
1632 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1633
1634         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
1635
1636 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1637
1638         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
1639         that deals with vreg interference. Explicitly check for OP_LDADDR to be
1640         able to process the source reg.
1641
1642 2008-10-16  Martin Baulig  <martin@ximian.com>
1643
1644         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
1645
1646         * inssel.brg: Add `OP_HARD_NOP'.
1647
1648         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
1649
1650         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
1651         `OP_HARD_NOP' instruction when running inside the debugger.
1652
1653         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
1654         `OP_HARD_NOP' instruction when running inside the debugger.
1655
1656 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1657
1658         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
1659         now works. The issue with the regalloc tripping up no longer
1660         happens.
1661
1662         * simd-intrinsics.c (load_simd_vreg): Same.
1663
1664 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1665         
1666         * basic-simd.cs: Tests for new Vector8ui methods.
1667
1668 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1669
1670         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
1671         only for type. This fixes crashes where MonoInst::klass is checked
1672         for ops of type != VTYPE or OBJ.
1673
1674         * simd-intrinsics.c (load_simd_vreg): Same.
1675
1676 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1677
1678         * mini-ops.h: Add ops for packed shuffle/max/avg and
1679         extract mask.
1680         
1681         * cpu-x86.md: Same.
1682
1683         * mini-x86.c (mono_arch_output_basic_block): Same.
1684
1685         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
1686         extract mask.
1687
1688         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
1689         to emit extract mask op.
1690
1691         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
1692         to emit word shuffles.
1693
1694 2008-10-15  Mark Probst  <mark.probst@gmail.com>
1695
1696         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
1697         the largest alignment needed by a variable, but at least
1698         sizeof(gpointer).
1699
1700 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1701
1702         * basic-simd.cs: Tests for the fixes in the last commit.
1703
1704 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1705
1706         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
1707         no longer handles STACK_PTR input.
1708
1709         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
1710
1711         * simd-intrinsics.c (load_simd_vreg): New function that works like 
1712         get_simd_vreg   but handles STACK_PTR input.
1713
1714         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
1715         as the input can be an arbitrary pointer.
1716
1717         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
1718         LDADDR local optimization directly otherwise use a store op.
1719
1720 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1721
1722         * basic-simd.cs: Tests for dup low and dup high.
1723
1724 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1725
1726         * mini-ops.h: Add dup low and dup high ops.
1727         
1728         * cpu-x86.md: Same.
1729
1730         * mini-x86.c (mono_arch_output_basic_block): Same.
1731
1732         * simd-intrinsics.c (vector4f_intrinsics): Same.
1733
1734 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1735
1736         * basic-simd.cs: Tests for recently added functionality.
1737
1738 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1739
1740         * mini-ops.h: Add remaining sse1 fp ops.
1741         
1742         * cpu-x86.md: Add remaining sse1 fp ops.
1743
1744         * mini-x86.c (mono_arch_output_basic_block): Same.
1745
1746         * mini.h: Add enum for simd FP compare conditions.
1747
1748         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1749
1750         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1751         so the backed can generate the appropriate op.
1752
1753 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1754         This patch squeese one more byte from the SimdIntrinsc struct.
1755
1756         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1757         a a shift amount intead of simply or'ing it.
1758
1759         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1760
1761         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1762         byte so we can have an aditional flags field without increasing struct size.
1763
1764         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1765         against the simd_supported_versions bitmask.
1766
1767         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1768
1769 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1770
1771         * mini.c: remove rawbuffer code (the only use here is unsafe because
1772         it takes locks during signal handling and the kernel now provides much
1773         better info in proc/pid/smaps these days).
1774
1775 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1776
1777         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1778         OP_X86_PUSH_OBJ. Fixes #434620.
1779
1780         * objects.cs: Add a test.
1781         
1782 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1783
1784         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1785         that the packuswb/packusdw don't work with unsigned numbers for what
1786         would be negative numbers in signed format.
1787
1788         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1789         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1790
1791         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1792
1793         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1794
1795         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1796
1797         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1798
1799         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1800         add more ops.
1801
1802         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1803         version as the enum in mini.h.
1804
1805         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1806         for sse3 ops, check the simd_version field if present. This way the code
1807         works with all versions of sse.
1808
1809 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1810
1811         * simd-intrinsics.c: Fixed intrinsic name typo.
1812
1813         * mini.h: Added missing simd exported function.
1814
1815         * basic-simd.cs: Added tests for Vector4ui.
1816         Fixed broken test for Vector16b.
1817
1818 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1819
1820         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1821         the max length to 64.
1822
1823 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1824
1825         * method-to-ir.c: Only do the fast virtual generic method call for
1826         non-wrapper methods.
1827
1828         * mini.h, mini-trampolines.c: The new generic virtual remoting
1829         trampoline handles virtual method calls via the vtable (as done by
1830         the fast virtual generic method calls) to remoting proxies.
1831
1832         * mini.c (mono_jit_create_remoting_trampoline): For generic
1833         methods reate a generic virtual remoting trampoline.
1834
1835         * mini-amd64.h: Enable fast virtual generic method calls again.
1836
1837 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1838
1839         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1840         restore registers when doing tail calls.
1841
1842 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1843
1844         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1845         Vector4ui.
1846
1847 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1848
1849         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1850
1851 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1852
1853         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1854
1855 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1856
1857         * basic-simd.cs: Retrofit for API changes.
1858
1859 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1860
1861         * mini-ppc.c: Handle integer stack arguments for tail calls.
1862
1863 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1864
1865         * optflags-def.h: Removed sse3 optimization.
1866
1867         * driver.c: Same.
1868
1869         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1870         sse3.
1871
1872         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1873
1874         * mini.h: Added enumeration with simd versions.
1875
1876         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1877         for detecting SSE3.
1878
1879         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1880
1881         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1882
1883 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1884
1885         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1886
1887         * basic-simd.cs: Fixed test naming.
1888
1889 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1890
1891         * mini-ops.h: Added ops for packed and saturated math, shifts
1892         and packing/unpacking.
1893
1894         * cpu-x86.md: Added descriptors for the above ops.
1895
1896         * mini-x86.c: Added code to emmit the above ops.
1897
1898         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1899
1900 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * aot-compiler.c (compile_method): Enable AOT for generic code.
1903
1904         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1905
1906 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1907
1908         * mini.c: add a workaround for a common screwup that ends up blamed
1909         to mono (other processes blocking signal delivery).
1910
1911 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1914         in the LDFLD/STFLD opcodes. Fixes #432673.
1915
1916         * iltests.il.in: Add a new test.
1917
1918 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1919
1920         * mini-arm.c: attach the thread in unmanaged->managed transitions
1921         using delegates (bug #433148).
1922
1923 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1924
1925        * basic-simd.cs: Use new ShuffleSel constants.
1926
1927 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1928
1929         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1930
1931         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1932         only disable simd intrinsics if no sse2 is detected.
1933
1934         * optflags-def.h: Added sse3.
1935
1936         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1937         is disabled.
1938
1939 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1940
1941         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1942         when adding delegate-invoke wrappers.
1943
1944 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1945
1946         * Makefile.am: Reenable the simd tests.
1947
1948 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1949
1950         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1951           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1952           other vreg is allocated to that hreg.
1953
1954         Contributed under MIT/X11 license.
1955
1956 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1957
1958         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1959         yet checked in.
1960
1961 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1962
1963         * basic-simd.cs: New test suite for SIMD intrinsics.
1964
1965         * Makefile.am: Added new tests.
1966
1967 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1968
1969         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1970
1971         * mini-ops.h: Same.
1972
1973         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1974
1975         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1976         using SSE2 aware opcodes.
1977
1978         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1979         is enabled, this code path is only reachable if conversion ops are emmited after
1980         mono_method_to_ir.
1981
1982         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1983
1984         This optimization saves 6 bytes per conversion against the old version.
1985
1986 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1987
1988         * aot-compiler.c (compile_method): Don't skip methods referencing 
1989         generic methods without a corresponding entry in token_info_hash, since
1990         encode_method_ref () can handle all generic methods now.
1991
1992         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1993         generic context is set.
1994         
1995         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1996         generic sharing of LDTOKEN.
1997
1998 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1999
2000         * mini-amd64.h: Temporarily disabled fast virtual generic method
2001         calls because it breaks the System.Runtime.Remoting tests.
2002
2003 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2004
2005         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2006
2007         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2008         so inlining actually works.
2009         (check_inline_caller_method_name_limit): Ditto.
2010
2011 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2012
2013         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2014         64 bit safety (from Olaf Hering and Andreas Färber).
2015
2016 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2017         
2018         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2019         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2020         unused virtual call support code.
2021
2022         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2023         
2024         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2025         which can't use aot trampolines.
2026         (decode_patch): Don't create aot trampolines for methods which can't use
2027         them.
2028
2029         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2030         use aot trampolines.
2031
2032         * mini.h: Bump AOT image format version.
2033         
2034 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
2035
2036         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2037         to save_token_info () since cmethod is inflated for constrained calls.
2038
2039         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2040
2041 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
2042
2043         * Makefile.am: Add build rules for ppc64.
2044         This avoids the build failing at pedump with unresolved symbols
2045         due to lack of arch_sources. Instead it will now fail earlier
2046         due to lack of cpu-ppc64.md.
2047
2048         Contributed under MIT/X11 license.
2049
2050 2008-10-04  Mark Probst  <mark.probst@gmail.com>
2051
2052         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2053         tail calls.
2054
2055         * iltests.il.in: Add test case for tail call with many arguments.
2056
2057 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2058
2059         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2060         to the fast virtual generic method code until the aot case is fixed.
2061
2062 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2063
2064         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2065
2066 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2067
2068         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2069         thunks.
2070
2071 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2072         
2073         * simd-intrinsics.c: Forgot to add this one.
2074
2075         * mini-codegen.c: Fix macro in case SIMD is not supported.
2076
2077 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2078         
2079         This patch land initial JIT support for simd intrinsics.
2080
2081         * mini-x86.h: Added new define to make --enable_minimal work on x86.
2082
2083         * Makefile.am: Added simd-intrinsics.c
2084
2085         * simd-intrinsics.c: New file with simd instrinsic related
2086         code.
2087
2088         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2089
2090         * cpu-x86.md: Add simd related instructions.
2091
2092         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2093
2094         * driver.c: Added two new --regression variants.
2095
2096         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
2097
2098         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
2099
2100         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
2101         extract some complicated logic to helper functions.
2102
2103         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
2104
2105         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
2106
2107         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
2108         the specialized simplification pass.
2109
2110         * method-to-ir.c (mono_spill_global_vars): Use new macro.
2111
2112         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
2113
2114         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
2115         table.
2116
2117         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
2118         if MONO_ARCH_NEED_SIMD_BANK is defined.
2119
2120         * mini-ops.h: Added the new simd ops.
2121
2122         * mini-x86.c: Added mono_arch_xregname.
2123
2124         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
2125
2126         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
2127
2128         * mini-x86.h: Define simd related MONO_ARCH macros.
2129
2130         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
2131
2132         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
2133
2134         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
2135         MONO_CLASS_IS_SIMD to deal with simd related IR.
2136
2137         * mini.h (MonoInst): Added spill_var to the backend union.
2138
2139         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
2140
2141         * mini.h: Added forward declarations of the new simd fuctions.
2142
2143         * optflags-def.h: Added new optimization names SIMD.
2144
2145         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
2146
2147         * regalloc.h: Added support for working with 3 register banks.
2148
2149         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
2150
2151         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
2152
2153 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
2154
2155         * mini-exceptions.c: remove 64 bit related ifdef clutter.
2156
2157 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2158
2159         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
2160         instead of one on 64 bit systems.
2161
2162         * method-to-ir.c: Remove unused includes.
2163
2164 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
2165
2166         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
2167         cfg->used_int_regs, since the two are different on arm.
2168
2169 2008-10-02  Mark Probst  <mark.probst@gmail.com>
2170
2171         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
2172         mono_method_get_vtable_index() to get the vtable index.
2173
2174 2008-10-02  Mark Probst  <mark.probst@gmail.com>
2175
2176         * method-to-ir.c (mono_method_to_ir2): Don't create native
2177         wrappers for array methods, because they're never called (and if
2178         they were called they wouldn't work).
2179
2180 2008-10-02  Mark Probst  <mark.probst@gmail.com>
2181
2182         * method-to-ir.c (mono_method_to_ir2): Array methods are
2183         special-cased and must not be invoked indirectly via the (M)RGCTX
2184         when generic sharing is turned on.  Fixes #431413.
2185
2186 2008-10-01  Mark Probst  <mark.probst@gmail.com>
2187
2188         * method-to-ir.c: When generic sharing is active, call
2189         non-interface virtual generic methods via the standard trampoline.
2190
2191         * mini-trampolines.c: Handle virtual generic shared methods.
2192
2193         * mini.h, mini-x86.c, mini-x86.h: New argument for
2194         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
2195         method thunks and which is the trampoline to call if the lookup
2196         fails.  Enable the virtual generic method thunk for x86.
2197
2198         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
2199         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
2200         argument but assert that it's NULL, because these archs don't yet
2201         implement the virtual generic method thunk.  Changes in the IMT
2202         thunk data structures.
2203
2204 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
2205
2206         * aot-compiler.c (emit_globals): Avoid invalid characters in
2207         the static linking symbol.
2208
2209         * objects.cs: Add a test for the range check optimization. Fix warnings.
2210
2211         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
2212         optimization from the current JIT.
2213
2214         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
2215         later in decompose_array_access_opts () to allow more optimizations.
2216
2217         * method-to-ir.c (mono_handle_soft_float): Rename this to 
2218         mono_decompose_soft_float () for consistency.
2219
2220         * mini-ops.h: Fix arguments of OP_STRLEN.
2221
2222         * method-to-ir.c (save_cast_details): Extract the cast details saving code
2223         into a separate function.
2224         (reset_cast_details): Ditto.
2225         (handle_unbox): Save cast details. Fixes #431254.
2226
2227         * method-to-ir.c: Remove some obsolete FIXMEs.
2228
2229 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2230
2231         * ir-emit.h (alloc_dreg): Write a warning before crashing.
2232
2233 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2234
2235         * mini-codegen.c: More work on macros to make them
2236         ready for multiple regbanks.
2237
2238 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2239
2240         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
2241
2242         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
2243
2244 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2245
2246         * mini-codegen.c (mono_spillvar_offset): Proper support for
2247         multiple regbanks.
2248
2249 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
2250
2251         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
2252         the stack overflow changes.
2253
2254 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2255
2256         * mini-codegen.c: Make all bank macros depend on reg_bank.
2257
2258         * mini-codegen.c (mono_local_regalloc): Make free mask
2259         initialization regbank aware.
2260
2261 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2262
2263         * mini-codegen.c (mono_local_regalloc): Extract callee
2264         mask selection to a function and make it regbank aware.
2265
2266 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
2267
2268         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
2269         code to deal with many regbanks.
2270
2271 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * mini-codegen.c: More fp->regbank changes.
2274
2275 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2276
2277         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
2278         of a hardcoded constant.
2279
2280 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2281
2282         * method-to-ir.c (type_from_stack_type): Fix typo.
2283
2284 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
2285
2286         * mini-ia64.c (emit_move_return_value): Convert float return values to
2287         double.
2288
2289         * objects.cs: Add a new test.
2290         
2291         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
2292         VARARG methods to fix an assert later.
2293
2294         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
2295         end so it at least compiles.
2296
2297 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
2298
2299         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
2300
2301 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
2302
2303         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
2304         optimization to a new function (emit_optimized_ldloca_ir) and enable
2305         it for both ldloca and ldloca_s.
2306
2307 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
2308
2309         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
2310         gshared CASTCLASS code.
2311
2312         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
2313         amd64, where the libc stack unwinder encounters stack frames referring to
2314         native code in unmapped memory.
2315
2316         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
2317         sharing.
2318
2319         * generics.cs: Add new test.
2320
2321 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
2322
2323         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
2324         add a check that one of the ARM_FPU_ constants is defined.
2325
2326         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
2327         
2328         * mini-exceptions.c: Fix build on non-altstack platforms.
2329
2330         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
2331         sharing of vtypes.
2332
2333         * ir-emit.h: Add a comment to NEW_PCONST.
2334
2335         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
2336
2337         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
2338
2339         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
2340         after the changes to MonoJitDomainInfo.
2341
2342 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2343
2344         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
2345
2346 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2347
2348         * mini-ppc.c: Compiler warning fixes.
2349
2350 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2351
2352         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
2353         for pinvokes.
2354
2355 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2356
2357         * exceptions-ppc.c, mini-ppc.h: Compile
2358         mono_arch_handle_altstack_exception() on Darwin, too.
2359
2360 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2361
2362         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
2363         work on archs which don't have generic sharing implemented, only
2364         without the vtable_arg.
2365
2366 2008-09-26  Mark Probst  <mark.probst@gmail.com>
2367
2368         * mini.c: Added comment explaining why delegate ctor icall
2369         wrappers are compiled.
2370
2371 2008-09-26  Mark Probst  <mark.probst@gmail.com>
2372
2373         * mini.c: Don't produce trampolines to delegate ctor icall
2374         wrappers but compile them upfront.
2375
2376 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
2377
2378         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
2379         runtime-set function when going back to managed code. Currently this
2380         is used to set back the protection on the soft ovf pages and/or to
2381         throw the stack overflow exception that happened in unmanaged code.
2382
2383 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
2384
2385         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
2386         runtime-set function when going back to managed code. Currently this
2387         is used to set back the protection on the soft ovf pages and/or to
2388         throw the stack overflow exception that happened in unmanaged code.
2389
2390 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2391
2392         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
2393         the support code for restoring stack protection after stack overflows
2394         that happen in unmanaged code. Don't set the exec permission on the
2395         soft overflow area.
2396
2397 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
2398
2399         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
2400         delegate->method_ptr is set. Fixes #428054.
2401
2402 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
2403
2404         * tests.cs: Rename to ratests.cs.
2405
2406         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
2407         emit_get_rgctx_... functions.
2408
2409 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2410
2411         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
2412
2413 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2414
2415         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
2416         before asserting that method is sharable.
2417
2418 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2419
2420         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
2421         whether method needs a static RGCTX wrapper used instead of
2422         complex conditions.
2423
2424         * generic-sharing.c, mini.h: A few functions moved to
2425         metadata/generic-sharing.c.
2426
2427 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2428
2429         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
2430         Generic code sharing for value types, which essentially means
2431         treating value type methods like static methods.  The RGCTX is
2432         passed in the same way.
2433
2434 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
2435
2436         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
2437         opcode when creating multi-dimensional arrays of open types.
2438
2439         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
2440         open generic types.
2441
2442         * generics.cs: Add a test.
2443
2444         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
2445
2446 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
2447
2448         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
2449
2450         * mini.c (mini_method_compile): Set it when running under the debugger. 
2451
2452         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
2453         vreg optimization if the flag is set.
2454
2455         * driver.c (mono_main): Add --attach= option to pass options to
2456         the attach agent.
2457
2458         * mini.c (sigquit_signal_handler): Start the attach agent.
2459
2460         * ssapre.c: Disable this to save space since it is not yet ported to
2461         linear IR.
2462
2463         * regalloc2.c: Disable this to save space.
2464
2465         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
2466
2467 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2468
2469         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
2470         the -v option useful again.
2471
2472 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
2473
2474         * mini-amd64.c (mono_arch_output_basic_block): Add support for
2475         --break-at-bb.
2476
2477         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
2478         arrays of arrays. Fixes #428406.
2479
2480         * method-to-ir.c (mini_emit_castclass): Ditto.
2481
2482         * objects.cs: Add new test.
2483         
2484 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
2485
2486         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
2487         was wrong at it choked against target_type_is_incompatible for byref types.
2488
2489 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
2490
2491         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
2492         places.
2493
2494 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
2495
2496         * mini-exceptions.c: update a few more exceptions-related counters.
2497
2498 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2499
2500         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
2501         new functions to allocate from persistent mempools.
2502
2503 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
2506         multiple register banks in the future.
2507
2508         * mini-codegen.c (mono_local_regalloc): Fix a warning.
2509
2510 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
2511
2512         * mini.c (type_to_eval_stack_type): Remove duplicated function.
2513
2514         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
2515
2516         * mini.h: Export type_to_eval_stack_type.
2517
2518         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
2519         is only ins->klass of byref types.
2520
2521 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
2522
2523         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
2524         (mini_emit_memcpy2): Ditto.
2525
2526         * mini-amd64.c: Fix a warning.
2527
2528 2008-09-21  Mark Probst  <mark.probst@gmail.com>
2529
2530         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
2531         linking.
2532
2533 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
2534
2535         * method-to-ir.c: Extract stloc micro-optimization to a
2536         function and apply it to all cases.
2537
2538 2008-09-19  Mark Probst  <mark.probst@gmail.com>
2539
2540         * method-to-ir.c: Don't fail generic code sharing in cases we
2541         already support.
2542
2543 2008-09-18  Mark Probst  <mark.probst@gmail.com>
2544
2545         * mini-ppc.c: Handle structs in tailcalls on Darwin.
2546
2547 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2548
2549         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
2550         implementation.
2551
2552 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
2553
2554         * trace.c: make tracing more useful and correct, with per-thread
2555         id and indent info.
2556
2557 2008-09-15  Mark Probst  <mark.probst@gmail.com>
2558
2559         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
2560         doing a method call and the argument is an R4.
2561
2562 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
2565         generic methods.
2566
2567 2008-09-13  Mark Probst  <mark.probst@gmail.com>
2568
2569         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
2570
2571 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
2572
2573         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
2574         (MONO_JUMP_TABLE_FROM_INS): Ditto.
2575
2576 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2577
2578         * driver.c: Add a --agent argument (not supported yet) to load managed
2579         agent assemblies before loading the main assembly, similarly to how the
2580         Java VM handles agents.
2581
2582 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2583
2584         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
2585         function to do stack layout of local variables.
2586
2587 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2588
2589         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
2590         calculation.
2591
2592 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2593
2594         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
2595         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
2596         JIT if DISABLE_JIT is defined.
2597
2598         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
2599         defined.
2600
2601 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2602
2603         * iltests.il.in: Disable the fconv test on PPC (the result is
2604         undefined according to ECMA).
2605
2606 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2607
2608         * iltests.il.in: Enable tail call tests for PPC.
2609
2610         * mini.h: Add variable for storing incoming valuetype argument
2611         addresses for tail calls.
2612
2613         * mini-ppc.c: Implement valuetype arguments and return values for
2614         tailcalls on Linux.
2615
2616 2008-09-09  Mark Probst  <mark.probst@gmail.com>
2617
2618         * mini-ppc.c: Partially implement tail calls (struct arguments and
2619         return values not supported).
2620
2621         * method-to-ir.c: Enable tail calls on PPC.
2622
2623 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
2624
2625         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
2626         runtime-invoke wrappers to work around the problem of them getting
2627         assigned to a random class.
2628
2629         * aot-runtime.c (mono_aot_get_method): Ditto.
2630         
2631 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
2632
2633         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
2634         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
2635
2636 2008-09-07  Mark Probst  <mark.probst@gmail.com>
2637
2638         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
2639         until they're implemented properly.
2640
2641         * exceptions-ppc.c: Use arch-independent exception-handling code
2642         instead of custom one.
2643
2644         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
2645         for Linear IR.
2646
2647         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
2648
2649         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
2650         applies when __powerpc__ is defined.
2651
2652 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
2655         methods to their code to avoid computing the full name of wrappers and
2656         doing a lookup in a string hash table.
2657
2658 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2659
2660         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
2661         we identify bblocks before method_to_ir () is ran.
2662
2663         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
2664         Also avoid optimizing branches pointing to themselves.
2665
2666         * mini.c (mini_method_compile): Ditto. Fixes #422947.
2667
2668 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
2669
2670         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
2671
2672 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2673
2674         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
2675         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
2676         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
2677         'buf'.
2678
2679         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
2680         jumped to the same entry in plt_jump_table.
2681
2682 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
2683
2684         * method-to-ir.c (initialize_array_data): Handle field with RVA from
2685         dynamic images.
2686
2687 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
2688
2689         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
2690         other assignment can be if converted. Saves 1.5% on corlib size and fixes
2691         #421807.
2692
2693 2008-08-29  Geoff Norton  <gnorton@novell.com>
2694
2695         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
2696         segment, and doesn't properly handle .space as .text.  Fixes
2697         AOT Mach/ARM
2698
2699 2008-08-29  Geoff Norton  <gnorton@novell.com>
2700
2701         * mini.c: Disable the mach exception handler when running on 
2702         ARM
2703
2704 2008-08-29  Geoff Norton  <gnorton@novell.com>
2705
2706         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
2707         globals on Darwin/ARM
2708
2709 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
2710
2711         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
2712         since too many things depend on it. Instead, call 
2713         mono_runtime_set_no_exec ().
2714         
2715         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
2716         the new JIT.
2717
2718         * aot-compiler.c: Add an 'asm-only' AOT option.
2719
2720         * mini.c: Avoid initializing the runtime when doing AOT compilation.
2721                 
2722         * aot-compiler.c (compile_method): Disable gshared support for now as it
2723         doesn't yet work.
2724
2725 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2726
2727         * mini-amd64.h : Fix a compiler warning.
2728
2729         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
2730           Changed to use a callback function to retrieve the unwind info.
2731           This avoids problems observed when code blocks were removed by
2732           unloading an app domain.
2733
2734         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
2735           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
2736           to work properly.
2737
2738         Contributed under MIT/X11 license.
2739
2740 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2741
2742         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2743           case to keep the stack aligned to 8.
2744
2745         Contributed under MIT/X11 license.
2746
2747 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
2748
2749         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2750         avoid repeated linear searches.
2751
2752 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2755         methods it can't handle.
2756         
2757         * aot-compiler.c (add_method): Avoid adding a method twice.
2758         (add_wrappers): Add runtime invoke wrappers for all methods.
2759
2760         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2761         function to create an aot-compatible version of this trampoline.
2762
2763         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2764
2765 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2766
2767         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2768
2769         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2770         with a generic sharing failure.
2771
2772         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2773
2774         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2775         CEE_RETHROW. Fixes #419634.
2776
2777         * mini.c (mono_method_to_ir): Ditto.
2778
2779         * exceptions.cs: Add a new test.
2780         
2781         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2782         to mono_type_stack_size_internal () since some callers might not pass in
2783         an rgctx.
2784
2785         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2786         instrument_prolog. Fixes #419878.
2787
2788         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2789         doubles in soft float mode volatile.
2790
2791 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2794
2795         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2796         to handle soft float correctly.
2797
2798         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2799         the fast path.
2800
2801         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2802
2803         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2804         to sp, since the generics catch code requires it.
2805
2806         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2807         copying.
2808
2809         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2810         mono_arch_emit_imt_argument ().
2811
2812         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2813
2814         * mini-arm.c tramp-arm.c: Generic sharing updates.
2815
2816 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * mini-arm.c: Fix the arm build.
2819
2820         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2821         handling enums, generic instances and generic sharing.
2822         (mini_type_stack_size_full): Ditto.
2823
2824         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2825         
2826         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2827
2828         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2829
2830         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2831         trampolines.
2832
2833         * mini-arm.c: Various small generic sharing changes.
2834
2835         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2836         this for x86.
2837         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2838         custom code.
2839
2840         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2841         helper function to return a generic class init trampoline.
2842
2843         * method-to-ir.c mini.c: Use it.
2844         
2845         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2846         arch-specfic function to return a generic class init trampoline.
2847
2848         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2849         the GENERIC_CLASS_INIT custom code.
2850
2851         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2852         a fatal error, not a sharing failure.
2853
2854         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2855         needed.
2856
2857         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2858         trampoline argument from MONO_ARCH_VTABLE_REG.
2859
2860         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2861         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2862         argument, and pass the vtable in VTABLE_REG.
2863
2864         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2865         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2866         argument, and pass the vtable in VTABLE_REG.
2867         (mono_arch_create_trampoline_code_full): Remove some special casing for
2868         the rgctx fetch trampoline.
2869
2870         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2871         Fixes #419273.
2872
2873         * iltests.il: Add a test for it.
2874
2875 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2876
2877         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2878
2879         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2880         no longer needed.
2881
2882         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2883         use mono_jit_info_table_find () to avoid recursion.
2884         (mono_delegate_trampoline): Add a sync wrapper here.
2885
2886         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2887         here.
2888
2889         * mini.c (mono_method_to_ir): Ditto.
2890         
2891         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2892         add_sync_wrapper argument. Don't add a sync wrapper here.
2893         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2894
2895         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2896         
2897 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2898
2899         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2900           of nonvolatile registers back from MonoContext to CONTEXT.
2901
2902         Contributed under MIT/X11 license.
2903
2904 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2905
2906         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2907           arguments on Winx64 there are only 4 argument registers.  For this
2908           logic to work the last argument must be pulled from the stack.  
2909
2910         Contributed under MIT/X11 license.
2911
2912 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2913
2914         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2915
2916         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2917         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2918         encode/decode_method_ref ().
2919
2920         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2921
2922         * aot-runtime.c (decode_patch): Ditto.  
2923
2924         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2925         MONO_PATCH_INFO_METHOD.
2926
2927         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2928         MonoGenericJitInfo.
2929
2930         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2931         MonoGenericJitInfo.
2932
2933         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2934
2935         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2936         one from the caller.
2937
2938         * aot-runtime.c (decode_generic_inst): New function to decode and
2939         return a interned generic inst.
2940         (decode_klass_ref): Use it.
2941         (decode_method_ref): Ditto.
2942
2943         * aot-compiler.c (emit_exception_debug_info): Save 
2944         jinfo->has_generic_jit_info too.
2945
2946 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2949
2950         * iltests.il.in: Add a test for fconv_to_i.
2951
2952         * liveness.c: Disable the liveness2 pass for now to save space.
2953
2954         * regalloc2.c: Include mempool-internals.h to fix warnings.
2955
2956         * aot-compiler.c (encode_method_ref): Encode the context of generic
2957         instance methods.
2958
2959         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2960         the context saved in the aot file.
2961
2962         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2963
2964         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2965
2966         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2967         volatile so they won't be optimized away.
2968
2969 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2970
2971         * ssa.c:
2972         * ssa2.c:
2973         * mini.c:
2974         * regalloc2.c:
2975         * dominators.c: Remove duplicated functions that now are in
2976         mempool-internals.h.
2977
2978 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2979
2980         * aot-compiler.c: Fix warnings.
2981
2982         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2983
2984         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2985
2986         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2987         as the patch type.
2988
2989         * mini.c (mono_resolve_patch_target): Ditto.
2990         
2991         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2992         (encode_klass_ref): Add support for encoding VARs/MVARs.
2993
2994         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2995
2996         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2997         the handling of the got entries into a separate 'decode_got_entry' function.
2998         Add support for RGCTX_FETCH.
2999
3000         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3001         clobbered by the trampoline code.
3002
3003         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3004         not clobbered by the indirect calling code.
3005
3006 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3007
3008         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3009         to fix the build.
3010
3011 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3012
3013         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3014         signature using the compilation mempool otherwise we would leak it.
3015
3016 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3017
3018         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3019         mono_emit_abs_call ().
3020
3021         * patch-info.h: Add GENERIC_CLASS_INIT.
3022
3023         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3024
3025         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3026         as their target as a near call.
3027
3028         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3029         ABS handling code.
3030         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3031
3032         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3033         call to a runtime function described by a patch.
3034
3035         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3036         mono_emit_abs_call, this has the advantage that the ABS handling code in
3037         mono_codegen () can handle them both, and can handle other stuff in the
3038         future without additional code.
3039
3040         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3041         entry.
3042         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3043         abs addresses.
3044
3045         * mini.h: Add missing bblock related prototypes.
3046
3047         * mini.h (MonoCompile): Remove unused reverse_inst_list and
3048         reverse_inst_list_len fields.
3049
3050         * mini.c: Refactor this file a bit by moving branch optimizations to 
3051         branch-opts.c.
3052
3053         * method-to-ir.c: Merge generic sharing changes missed earlier.
3054
3055         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3056
3057         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3058         shared patches. Process METHODCONST as a shared patch.
3059
3060         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3061         as it crashes on the 2.0 mscorlib.
3062
3063         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3064         to cause crashes.
3065         
3066         * aot-compiler.c: Use is_plt_patch () in a few additional places.
3067         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3068         by IMT.
3069
3070         * aot-compiler.c: Reorganize the got handling code to be a bit more
3071         understandable.
3072
3073 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
3076         mono_patch_info_equals/hash, and use it to massively simplify
3077         get_plt_index ().
3078
3079         * mini.c (mono_patch_info_hash): Simplify this and add support for
3080         more patch types.
3081
3082         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3083
3084         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3085         handling code, since an offset is not enough to identify a trampoline.
3086
3087         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3088
3089 2008-08-17  Mark Probst  <mark.probst@gmail.com>
3090
3091         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3092
3093         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3094
3095         * mini-ops.h: Argument and result types for OVF_CARRY ops.
3096
3097         * decompose.c: PPC decompositions for various ops.
3098
3099         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
3100
3101 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
3104         call the generic trampoline code using a call, instead of a jump, to
3105         remove some special casing from the generic trampoline code.
3106
3107         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
3108         (mono_codegen): Ditto.
3109
3110         * aot-compiler.c aot-runtime.c: Ditto.
3111
3112         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
3113
3114         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
3115         helper function to find the offset corresponding to a lazy fetch trampoline.
3116
3117         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
3118         when doing generic sharing.
3119
3120         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
3121         places.
3122         
3123         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
3124         mini-trampolines.c to be with the other trampoline creation functions.
3125
3126         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
3127         as it is equal to method->signature in most cases, add a 
3128         mono_emit_method_call_full variant which takes a signature and an imt
3129         argument as well.
3130
3131 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
3132
3133         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
3134         to this function, since it could be computed easily from the method 
3135         argument.
3136         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
3137         more.
3138
3139         * method-to-ir.c mini.c: Remove references to 
3140         compile_generic_method_wo_context.
3141
3142         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
3143         generic method calls.
3144         
3145         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
3146         dimensional non-szarrays.
3147
3148         * mini.c (mini_init): Register mono_array_new_1.
3149
3150         * jit-icalls.c (mono_array_new_1): New jit icall.
3151
3152         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
3153         pointing to the method.
3154
3155         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
3156         method addresses belonging to METHOD_JUMP patches in the 
3157         jump_target_got_slot_hash.
3158         (mono_aot_load_method): Ditto.
3159
3160         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
3161         METHOD_JUMP patches.
3162
3163         * mini.c (mini_create_jit_domain_info): New helper function which 
3164         initializes/frees domain->runtime_info.
3165         (mini_free_jit_domain_info): Ditto.
3166         (mini_init): Install the domain hook functions with the runtime.
3167
3168         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
3169         information maintained by the JIT.
3170
3171         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
3172         insertion into jump_table_hash into mono_codegen (), also implement proper
3173         locking.
3174
3175         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
3176         tail calls, it is already done by the aot code.
3177         
3178         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
3179         mechanism on amd64.
3180
3181         * iltests.il.in: Make the jmp test a bit more complex.
3182
3183         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
3184         generic instances which doesn't have a token.
3185
3186         * aot-runtime.c (decode_method_ref): Ditto.
3187         
3188         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
3189         can handle this case now.
3190         (handle_box): Ditto.
3191
3192 2008-08-15  Geoff Norton  <gnorton@novell.com>
3193
3194         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
3195         debugging check.
3196
3197 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
3198
3199         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
3200         calling generic methods.
3201
3202         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
3203
3204         * aot-runtime.c (decode_patch_info): Ditto.
3205
3206         * mini.c (mono_resolve_patch_target): Ditto.
3207         
3208         * patch-info.h: Add METHOD_RGCTX.
3209
3210         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
3211
3212 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
3213
3214         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
3215         arguments in registers.
3216
3217         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
3218         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
3219
3220         * mini.c (mini_method_compile): Abort aot compilation for generic
3221         methods if generic sharing is disabled.
3222         
3223         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
3224         an mrgctx.
3225
3226         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
3227         requiring an mrgctx.
3228
3229         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
3230         store instructions when converting a vcall to a normal call.
3231
3232         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
3233         mono_arch_find_jit_info.
3234
3235 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
3236
3237         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
3238         avoid calling mono_method_full_name () for every method even if the
3239         env var is not set.
3240         (check_inline_caller_method_name_limit): Ditto.
3241
3242 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
3243
3244         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
3245         assemblies in one run.
3246
3247         * aot-compiler.c (mono_compile_assembly): Only print out a count of
3248         skipped methods if it is not 0.
3249
3250         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
3251
3252 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
3253
3254         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
3255           MONO_ARCH_HAVE_UNWIND_TABLE.
3256
3257         Contributed under MIT/X11 license.
3258
3259 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
3260
3261         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
3262           from default optimizaton list on Winx64.
3263
3264         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
3265
3266         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
3267           the LMF from the MonoJitTlsData structure.
3268
3269         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
3270
3271         Contributed under MIT/X11 license.
3272
3273 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
3274
3275         * mini.c (sigsegv_signal_handler): Fix the build.
3276
3277         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
3278         assembly->aot_module.
3279
3280         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
3281         hash table. This simplifies and speeds up a lot of code, and fixes support
3282         for .netmodules.
3283
3284         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
3285         with the runtime.
3286
3287         * mini-exceptions.c: Ditto.
3288         
3289         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
3290         'native_offset' argument, since these are computed in the 
3291         mono_find_jit_info () function.
3292
3293         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
3294         is used by exceptions-ppc.c.
3295
3296         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
3297         mono_arch_find_jit_info ().
3298         
3299         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
3300         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
3301         generic code in mini-exceptions.c.
3302
3303 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
3304
3305         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
3306
3307         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
3308         
3309         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
3310         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
3311         called while holding the loader lock. Fixes #415608.
3312         (mono_aot_get_method_from_token_inner): Ditto.
3313
3314 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
3315
3316         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
3317         to reduce differences between this and the generic implementation in
3318         mini-exceptions.c.
3319         (ves_icall_get_frame_info): Ditto.
3320
3321         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
3322
3323         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
3324         longer neccesarry.
3325
3326         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
3327         mono_arch_get_call_filter () and make it non-static, for consistency with the
3328         other architectures.
3329
3330 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
3331
3332         * mini.c:
3333         * local-propagation.c:
3334         * mini-x86.c: Correct the name of arch defines.
3335
3336 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
3337
3338         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
3339         NO_EMULATE_LONG_SHIFT_OPS define.
3340
3341 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
3344         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
3345
3346         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
3347         MACH fixes. Merged from the 2.0 branch.
3348
3349         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
3350
3351         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
3352         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
3353
3354         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
3355
3356         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
3357         mono_marshal_get_native_wrapper () signature changes.
3358
3359 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
3360
3361         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
3362         conversion bug under arm.
3363
3364 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
3365
3366         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
3367
3368         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
3369         with overflow checking.
3370
3371 2008-08-05  Marek Habersack  <mhabersack@novell.com>
3372
3373         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
3374         to the genmdesc.pl file
3375
3376 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
3377
3378         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
3379         arg_array in the soft-float versions of the LOAD/STORE macros.
3380
3381         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
3382         implementation.
3383
3384         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
3385
3386 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
3389         a float HFA. Fixes #413621.
3390
3391 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
3392
3393         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
3394         frame_size to args_size. Fixes build.
3395
3396 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
3399         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
3400
3401         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
3402         the stack are not unaligned. Fixes #413247.
3403         
3404 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
3405
3406         * mini.c: update jitted methods performance counters.
3407
3408 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3409
3410         * mini-exceptions.c: increase the exceptions thrown performance
3411         counter in mono_handle_exception ().
3412
3413 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
3416         can work with netmodules.
3417
3418 2008-07-28  Geoff Norton  <gnorton@novell.com>
3419
3420         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
3421         regression tests.
3422
3423 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
3424
3425         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
3426         correct place.
3427
3428 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
3429
3430         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3431           The float param registers and other param registers must be the 
3432           same index on Windows x64.
3433
3434         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
3435           ArgValuetypeAddrInIReg argument case.  Setting the argument
3436           op to OP_VTARG_ADDR (OP_REGOFFSET)).
3437
3438         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
3439           variable computed above as the copy length for arguments of storage
3440           type ArgValuetypeAddrInIReg.
3441
3442         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
3443           ArgValuetypeAddrInIReg argument case.  This case will rely on
3444           mono_arch_emit_outarg_vt to emit the correct code later in the process.
3445
3446         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
3447           a 32 byte stack allocation for all calls.  We will omit the adjustment for
3448           jump and tail call instructoins as they do not follow the typical call behavior.
3449
3450         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
3451           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3452           local variable and pass the local variable by reference to the called method.
3453
3454         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
3455           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
3456           of a struct is passed in a register it must be saved with the other
3457           volatile argument on the stack.
3458
3459         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
3460           frame pointer the stack adjustment value must be saved to the unwind 
3461           info structure.
3462
3463         Contributed under MIT/X11 license.
3464
3465 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
3466
3467         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
3468         which got lost in the merge.
3469
3470 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
3473         build.
3474
3475         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
3476         
3477         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
3478         icalls, since they won't be patched.
3479
3480         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
3481         different code sequence when running under valgrind to prevent some valgrind
3482         errors.
3483
3484         * iltests.il.in: Add new regression test.
3485
3486         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
3487         end with a throw.
3488
3489         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
3490         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
3491
3492         * iltests.il.in: Add new test.
3493
3494         * aot-compiler.c: Fix some warnings.
3495
3496         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
3497         Fixes #412494.
3498
3499 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
3500
3501         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
3502         (mini_usage_jitdeveloper): Add a missing --wapi option.
3503
3504 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3505
3506         * mini-codegen.c: Simplify the is_fp macros.
3507         (free_up_ireg): Remove, use free_up_reg instead.
3508         (free_up_reg): Fix the fp case.
3509
3510 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
3511
3512         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
3513         lowered earlier.
3514
3515         * exceptions-x86.c: Merge some changes which seemed to have got lost
3516         in the linear-ir merge.
3517
3518         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
3519
3520         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
3521         long vreg volatile even if the variable was already created.
3522
3523         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
3524         volatile variables.
3525
3526 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
3527
3528         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
3529
3530         * mini.c (mono_jit_compile_method_inner): Add support for 
3531         MONO_EXCEPTION_BAD_IMAGE.
3532
3533         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
3534         mini_method_get_context () returns NULL. Fixes #356531.
3535
3536         * mini.c (mono_method_to_ir): Ditto.
3537         
3538         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
3539         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
3540
3541 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3542
3543         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
3544         in the LDFTN implementation.
3545
3546 2008-07-25  Mark Probst  <mark.probst@gmail.com>
3547
3548         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
3549         code, patch calls to icalls, too, even if they're not in the
3550         shared generic code hash.  Fixes #411962.
3551
3552 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * cpu-x86.md: Increase the length of the fcall opcodes.
3555
3556         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
3557         calls returning floats.
3558
3559         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
3560         on NEWARR.
3561         
3562         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
3563         missed earlier.
3564
3565         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
3566         into the domain->method_code_hash.
3567
3568         * aot-compiler.c: Fix win32 build.
3569
3570         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
3571         
3572         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
3573         gshared NEWARR implementation.
3574
3575         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
3576
3577         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
3578         can be used outside of method_to_ir.
3579
3580         * mini.h (MonoCompile): Add arg_types field.
3581
3582         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
3583         
3584         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
3585         the values of the local arg_array and param_types array.
3586
3587 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3588
3589         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
3590         got accesses might only get generated later when NEWOBJ is decomposed.
3591         
3592         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
3593         looking up the native code of the target method when a delegate is called
3594         for the first time.
3595
3596         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
3597         optimization.
3598
3599         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
3600
3601         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
3602         AOT work on platforms without a working dlsym implementation.
3603
3604         * mini.h: Bump AOT image format version.
3605         
3606 2008-07-24  Mark Probst  <mark.probst@gmail.com>
3607
3608         * mini-exceptions.c: Free a MonoType with
3609         mono_metadata_free_type() instead of g_free().
3610
3611         * aot-runtime.c: Free a MonoType.
3612
3613 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3614
3615         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
3616         optimization.
3617
3618         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
3619         fp stack on x86.
3620
3621 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
3622         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
3623         profiler hook.
3624
3625 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3626
3627         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
3628         NEWOBJ calls on valuetypes.
3629
3630         * iltests.il.in: Add new test.
3631
3632         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
3633
3634 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3635
3636         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
3637         is no longer needed.
3638
3639         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
3640         non register sized integer arguments.
3641         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
3642         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
3643         emit_memcpy2 ().
3644
3645         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
3646         CEE_MONO_RETOBJ.
3647         
3648         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
3649         two a binop with different sized arguments is emitted.
3650
3651         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
3652         instruction in the ins==NULL case.
3653
3654 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
3657
3658         * mini-x86.c: Fix osx build.
3659
3660         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
3661         opcodes as well.
3662
3663         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
3664         instruction for non int sized variables.
3665
3666         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
3667         implementation.
3668
3669 2008-07-23  Robert Jordan  <robertj@gmx.net>
3670
3671         * method-to-ir.c: Fix MSVC build.
3672
3673 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
3676         a non int sized type, widen it to an int since newer versions of gcc seem to
3677         generate code which needs this.
3678
3679         * ssa2.c abcremoval2.c: Fix warnings.
3680
3681         * *: Merge the Linear IR branch.
3682
3683         The original branch is at trunk/branches/vargaz/mini-linear-il, and
3684         the ChangeLog file there describes all the changes done over the years. 
3685         Further documentation can be found at www.mono-project.com/Linear_IL.
3686
3687 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3688
3689         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3690           The float param registers and other param registers must be the 
3691           same index on Windows x64.
3692
3693         Contributed under MIT/X11 license.
3694
3695 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
3696
3697         * mini.c: Make the previous fix GC safe.
3698
3699 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
3700
3701         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
3702
3703 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3704
3705         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
3706           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
3707           ArgValuetypeAddrInIReg instead.
3708
3709         Contributed under MIT/X11 license.
3710
3711 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
3712
3713         * mini-codegen.c (get_register_spilling): Fix a warning.
3714
3715 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
3716
3717         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
3718         for types which the initialization fails. Raises the provided exception
3719         at the right stop after cleanup.
3720
3721 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
3722
3723         * aot-compiler.c: Free most of the memory allocated during compilation.
3724
3725         * mini.c (mini_parse_debug_options): Fix a leak.
3726         
3727         * mini.c (mini_method_compile): Don't add the method to the jit info tables
3728         during aot compilation.
3729
3730 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
3731
3732         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
3733         it has too much register pressure.
3734
3735 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3738
3739 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3742         on x86.
3743
3744         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3745         on amd64 similar to the way it is done on arm.
3746
3747         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3748
3749         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
3750         consistency, normalize error messages, avoid loading aot-only modules in
3751         normal mode.
3752
3753         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3754         for consistency.
3755
3756         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3757
3758 2008-07-11  Martin Baulig  <martin@ximian.com>
3759
3760         * debug-debugger.h
3761         (MonoDebuggerInfo): Add `interruption_request'.
3762
3763 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * aot-compiler.c (emit_plt): Remove some dead code.
3766
3767         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3768
3769         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3770         return the plt info offset belonging to a given plt entry.
3771
3772         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
3773         mono_aot_get_plt_info_offset.
3774         
3775         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3776         similar to the amd64 code by makeing jumps through a separate jump table 
3777         instead of embedding the jump addresses into the code.
3778
3779 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3780
3781         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3782         method.
3783
3784 2008-07-10  Martin Baulig  <martin@ximian.com>
3785
3786         * mini.c (mini_method_compile): Disable generics sharing when
3787         running in the debugger.
3788
3789 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3790
3791         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3792
3793         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3794         the local register allocator from running out of registers on x86 when 
3795         using aot.
3796
3797 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3798
3799         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3800         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3801         C4146.
3802
3803         Contributed under MIT/X11 license.
3804
3805 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3806
3807         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3808         speed up the assembler.
3809
3810 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3813         support.
3814
3815         * mini.c: Move the soft float handling macros a bit earlier, add 
3816         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3817         place.
3818
3819         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3820
3821         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3822         read-only to help catch code allocation requests.
3823         
3824         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3825         and turn it off when using --aot-only or when compiling with --aot=full.
3826
3827         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3828         jump table for switches from the normal domain mempool, not the code
3829         manager.
3830
3831         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3832         unbox trampoline which handles aot-only mode too.
3833
3834         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3835         an AOTed unbox trampoline.
3836
3837         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3838
3839 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3840
3841         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3842         ""
3843
3844         Contributed under MIT/X11 license.
3845
3846 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3847
3848         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3849           the unwind information for the method at the end of the allocated block.
3850           
3851         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3852           MonoCompileArch to hold the unwind info for SEH on Winx64
3853         
3854         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3855           frame pointer info for the method being compiled.
3856           
3857         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3858           the call to mono_exception_from_token.
3859           
3860         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3861           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3862           information is stored a the end of the method block because it is all 32-bit offset based.
3863
3864         Contributed under MIT/X11 license.
3865
3866 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3867
3868         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3869
3870         * wapihandles.c: Fix warnings.
3871
3872         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3873         mode.
3874
3875         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3876         mono_jit_compile_method in aot-only mode since that calls the type 
3877         initializer.
3878         
3879         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3880         get_delegate_invoke_impl in aot-only mode.
3881
3882         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3883
3884 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3885
3886         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3887
3888         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3889         is on by default.
3890
3891         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3892
3893         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3894         init trampoline from the AOT file as well.
3895
3896         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3897         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3898         code.
3899
3900         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3901         mono_init.
3902
3903         * exceptions-amd64.c: Add _full variants for the remaining exception code
3904         creation functions as well, allow emission of relocatable code, remove
3905         caching since that is now done by the caller.
3906
3907         * mini-exceptions.c: Add _full variants for the remaining exception code
3908         creation functions as well, add aot-only support.
3909
3910         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3911         if we can determine a proper token for them.
3912         (add_wrappers): Add a few more wrappers.
3913         (emit_method_code): Remove some dead code.
3914         (emit_trampolines): Emit exception code too.
3915
3916         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3917
3918         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3919         mono_array_new_va which avoids varargs.
3920
3921         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3922
3923         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3924         mono_arch_create_specific_trampoline () in all places.
3925
3926         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3927         a bit so it can be used for other things as well.
3928         
3929         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3930         on demand as well.
3931
3932         * exceptions-amd64.c: Rename the caching from the exception code creation
3933         functions, it is done by the caller instead.
3934         
3935         * exceptions-amd64.c: Change the signature of the exception code creation 
3936         functions to allow the creation of relocatable code later.
3937
3938         * mini-exceptions.c: Add a set of functions to query the various 
3939         runtime-generated exception functions.
3940
3941         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3942         mono_arch_.. () functions.
3943         
3944 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3945
3946         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3947
3948         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3949
3950         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3951         (mini_get_vtable_trampoline): Ditto.
3952
3953         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3954         code in the AOT case by returning the code size and a list of relocations to
3955         the caller.
3956
3957         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3958
3959 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3960
3961         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3962           clean the stack.
3963
3964         Contributed under MIT/X11 license.
3965
3966 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3967
3968         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3969         so the buffer size can be computed correctly. Fixes #404735.
3970
3971         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3972         normally as cfg->debug_info is already freed.
3973
3974 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3975
3976         * mini-amd64.c: For calls returning vtypes in registers, don't store
3977         the return address on the stack, instead allocate a separate local for
3978         it. Fixes #404729.
3979
3980 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3981
3982         * mini-trampolines.c, mini.h: Add an argument to
3983         mono_create_jit_trampoline_in_domain() for turning off the adding
3984         of the sync wrapper.
3985
3986         * mini.c: Use the JIT trampoline without sync instead of
3987         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3988         be patched.
3989
3990 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3991
3992         * driver.c: Turn on GSHARED optimization by default.
3993
3994 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3995
3996         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3997         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3998
3999         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4000         create a variant of the generic trampoline code callable from AOTed trampolines.
4001
4002         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4003         trampoline code callable from AOTed trampolines.
4004
4005         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4006
4007 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4008
4009         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4010         pass-through manner.
4011
4012         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
4013         and don't fail sharing for them anymore.
4014
4015         * mini-exceptions.c: Handle exceptions in shared generic methods.
4016
4017         * generic-sharing.c: When checking the context of a generic
4018         method, also check its class's context.  Don't treat wrappers as
4019         sharable.
4020
4021         * mini-trampolines.c: Some code factored out to
4022         metadata/generic-sharing.c.  Handle the MRGCTX case.
4023
4024         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4025         we must deal with the method being of another instantiation of the
4026         class.  Add static rgctx invoke wrappers to generic methods.
4027
4028 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4029
4030         * mini.c: Provide all jit infos of generic shared methods with a
4031         generic jit info.
4032
4033         * mini-exceptions.c: Handle the new situation that a generic info
4034         might be available, but not info about the this/vtable/mrgctx
4035         variable.
4036
4037 2008-07-03  Mark Probst  <mark.probst@gmail.com>
4038
4039         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4040         generic methods.
4041
4042 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
4043
4044         * dominators.c (check_dominance_frontier): Fix a warning.
4045
4046         * mini.h: Add some missing prototypes.
4047
4048         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4049
4050         * driver.c (mono_jit_init_version): Correct the comments since the first
4051         argument should be the name of the root domain, not a filename.
4052
4053         * aot-runtime.c (make_writable): Error out if this is called while running
4054         with --aot-only.
4055         (load_aot_module): Ditto.
4056
4057         * aot-compiler.c: Really fix the computation of method indexes.
4058
4059         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
4060         optimizations as this is no longer called frequently.
4061
4062         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4063         method and the invoke impl code and pass it to the delegate trampoline instead of
4064         just the delegate class.
4065
4066 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
4067
4068         * aot-compiler.c: Fixup the computation of method indexes.
4069         (add_wrappers): Create the base methods of the runtime invoke wrappers using
4070         the method builder infrastructure.
4071
4072         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4073         has no header.
4074
4075         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4076         mode, load the method right away instead of creating a trampoline.
4077
4078         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4079
4080         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4081         some checks a bit.
4082
4083 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4086         (mono_aot_load_method): Use method_index instead of method->token.
4087
4088         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4089         can handle icalls etc. properly.
4090
4091         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4092
4093         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4094
4095         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4096         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4097         JIT_ICALL_ADDR patch type.
4098
4099         * patch-info.h: Add JIT_ICALL_ADDR patch type.
4100
4101         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
4102         request flag.
4103         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
4104
4105         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
4106
4107 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
4108
4109         * mini.c: Use domain->jit_code_hash_lock for controlling access to
4110         domain->jit_code_hash.
4111
4112 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
4113
4114         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
4115
4116 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
4117
4118         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
4119         get_this_arg_from_call, let it compute it when needed.
4120
4121         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
4122         gsctx from code only when needed.
4123
4124         * mini-trampolines.c (get_generic_context): Rename this to 
4125         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
4126         it can be called by the arch backends.
4127
4128         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
4129
4130 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
4131
4132         * driver.c (mono_main): Add experimental --aot-only command line option.
4133
4134         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
4135         set.
4136
4137 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
4138
4139         * driver.c (DllMain): Remove mono_module_handle.
4140
4141         Contributed under MIT/X11 license.
4142
4143 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
4144
4145         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
4146         for emitting methods which are not in the source assembly. Detect and report
4147         failure of assembling+linking.
4148         
4149         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
4150
4151         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
4152
4153 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
4154
4155         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
4156
4157 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
4158
4159         * mini.h: Remove some obsolete prototypes.
4160
4161         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
4162
4163 2008-06-24  Mark Probst  <mark.probst@gmail.com>
4164
4165         * mini.c (get_object_generic_inst): Variable-sized arrays are not
4166         supported by Visual Studio, so use alloca().
4167
4168 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
4169
4170         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
4171         Fixes #402585.
4172
4173 2008-06-23  Mark Probst  <mark.probst@gmail.com>
4174
4175         * mini.c: Fail sharing of a generic method if it contains an open
4176         catch clause (because we don't pass MRGCTXs yet).
4177
4178 2008-06-23  Mark Probst  <mark.probst@gmail.com>
4179
4180         * mini.c: When compiling a method with generic sharing, insert the
4181         method instantiated with an all-Object generic context into the
4182         jit info table, instead of the context of the first instantiation
4183         of the method we happen to compile.
4184
4185 2008-06-18  Martin Baulig  <martin@ximian.com>
4186
4187         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
4188         `major_version' and `minor_version'.
4189
4190 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4191
4192         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
4193         mono_method_is_generic_sharable_impl() takes an additional
4194         argument specifying whether to treat type variables as reference
4195         types.
4196
4197 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4198
4199         * mini.h: Removed obsolete prototypes.
4200
4201 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4202
4203         * mini.c: Don't fail generic sharing for initobj and sizeof - we
4204         already handle them.
4205
4206 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4207
4208         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
4209         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
4210         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
4211         tramp-x86.c: Added a MonoGenericContext* argument to
4212         mono_arch_get_unbox_trampoline() so that it can call other
4213         functions which require it.
4214
4215 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4216
4217         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
4218         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
4219         mono_arch_get_this_arg_from_call() takes a
4220         MonoGenericSharingContext* as well.
4221
4222 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4223
4224         * mini.c: Factor out code for emitting unbox into emit_unbox() and
4225         implement generic sharing of unbox.
4226
4227 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4228
4229         * mini.c: Don't compute the vtable to determine whether a field is
4230         special static, because it might not work for open types.
4231
4232 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4233
4234         * mini.c: Removed the unused token_type and token_source arguments
4235         from get_runtime_generic_context_ptr().
4236
4237 2008-06-17  Marek Habersack  <mhabersack@novell.com>
4238
4239         * mini.c (ADD_BINOP): fix the build
4240
4241 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
4242
4243         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
4244         a widening op.
4245
4246 2008-06-16  Mark Probst  <mark.probst@gmail.com>
4247
4248         * mini.h: Removed class relations enum that's not used anymore.
4249
4250 2008-06-16  Mark Probst  <mark.probst@gmail.com>
4251
4252         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
4253
4254         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
4255         the lazy fetch trampoline access code.
4256
4257 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
4258
4259         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
4260
4261 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
4262
4263         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
4264
4265         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
4266
4267         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
4268
4269 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
4270
4271         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
4272         intrinsics.
4273
4274         * mini-ops.h: Add MIN/MAX_UN opcodes.
4275
4276         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
4277         intrinsics.
4278
4279         * basic-math.cs: Add more min/max tests.
4280
4281         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
4282
4283 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4284
4285         * mini.c: Small fix in the prologue of emit_castclass.
4286
4287 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
4288
4289         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
4290
4291         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
4292         do not work even for unsigned types. Fixes #400014.
4293
4294         * basic-math.cs: Add regression tests for unsigned Min/Max.
4295
4296 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4297
4298         * mini.c: Added additional context_used argument to several
4299         functions, which will be needed for sharing generic methods.  Use
4300         GET_RGCTX macro wherever appropriate.  Declare only one
4301         context_used in mono_method_to_ir().
4302
4303 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4304
4305         * mini.c, generic-sharing.c: Removed generic class relations.
4306
4307         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
4308         functions due to MRGCTX changes.
4309
4310 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4311
4312         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
4313         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
4314         with calculated IMT.
4315
4316         * mini.c: Generic sharing of calls via generic interfaces.
4317
4318         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
4319         generic method with non-constant MonoGenericContext*.  Instead,
4320         the context is taken out of the method itself.
4321
4322 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4323
4324         * mini.c: Generic sharing of ldvirtftn.
4325
4326 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4327
4328         * mini.c: Generic sharing of ldftn.
4329
4330 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4331
4332         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
4333
4334 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4335
4336         * mini.c: Generic sharing of the special case of ldtoken followed
4337         by a call to GetTypeFromHandle.
4338
4339 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4340
4341         * mini.c: Generic sharing of box for nullable types.
4342
4343 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
4344
4345         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
4346         are passed on the stack. Fixes #324807.
4347
4348 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
4349
4350         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
4351         for the ArgValuetypeAddrInIReg case.
4352
4353         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
4354         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
4355
4356         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
4357         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4358         local variable and pass the local variable by reference to the called method.
4359           
4360         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
4361         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
4362
4363         Contributed under MIT/X11 license.
4364
4365 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
4366
4367         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
4368
4369         * debug-mini.c (mono_debug_print_vars): Release memory after printing
4370         everything.
4371
4372 2008-06-10  Martin Baulig  <martin@ximian.com>
4373
4374         * debug-mini.c
4375         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
4376
4377 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
4378
4379         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
4380         possible error when no arguments are passed.
4381
4382         Contributed under MIT/X11 license.
4383
4384 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
4385
4386         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
4387         where the file name is NULL.
4388
4389 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
4390
4391         * mini.c: Fix s390 build.
4392
4393 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
4394
4395         * trace.c (mono_trace_parse_options): Fix warnings.
4396
4397         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
4398
4399 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
4400
4401         * mini.c (remove_block_if_useless): Avoid printing the method name.
4402         
4403         * mini.c: Remove needless setting of ins->cil_code which is now done by 
4404         MONO_INST_NEW.
4405
4406         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
4407         LMF. Not yet used.
4408
4409         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
4410         translated code after it has been patched.
4411
4412 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
4413
4414         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
4415         avoid problems during code patching on SMP systems.
4416         (emit_call): Avoid adding a patch info which is already added by 
4417         emit_call_body.
4418         (mono_arch_emit_exceptions): Ditto.
4419
4420 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
4421
4422         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
4423         MONO_TYPE_ISSTRUCT already checks for it.
4424
4425 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
4426
4427         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
4428           structs with floats on Winx64 the float registers are not used.  
4429           The integer registers are always used..
4430         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
4431           only one register will be used and only if the size of the struct 
4432           is 1,2,4, or 8 bytes.
4433
4434         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
4435           to work for Winx64.
4436
4437         Contributed under MIT/X11 license.
4438
4439 2008-06-05  Martin Baulig  <martin@ximian.com>
4440
4441         * debug-debugger.c (debugger_lookup_class): Also call
4442         mono_class_setup_methods() here; we're only called from RTI.
4443
4444 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
4445
4446         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
4447         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
4448         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
4449         Post-process object files and add dtrace-generated object, if necessary.
4450
4451         Contributed under MIT/X11 license.
4452
4453 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4454
4455         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
4456         element class.
4457
4458         * mini.c: Generic sharing for unbox.any and castclass.
4459
4460 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4461
4462         * mini.c: Ignore tailcall prefix in shared generic code and when
4463         doing calls which require a vtable/rgctx argument.
4464
4465 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4466
4467         * mini.c: Don't free the JIT info.
4468
4469         * driver.c: Changes in the JIT info table testing code.
4470
4471 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
4472
4473         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
4474         interruption. Fix some warnings.
4475
4476         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
4477         interruption_checkpoint.
4478
4479 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
4480
4481         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
4482         from embedding applications.
4483
4484 2008-06-02  William Holmes  <billholmes54@gmail.com>
4485
4486         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
4487           reserving 32 bytes on the stack when making calls. 
4488
4489         Contributed under MIT/X11 license.
4490
4491 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
4492
4493         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
4494         the linear IL branch.
4495
4496         * driver.c: Print out more information for --version on arm.
4497
4498 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
4499
4500         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
4501         bb_exit instead, since out of line bblocks might not actually be emitted
4502         out-of-line.
4503         
4504         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
4505         maximum epilog size for out of line bblocks if tracing is enabled.
4506
4507         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
4508
4509 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
4510
4511         * arrays.cs: Regression tests for allocating arrays with negative sizes.
4512
4513 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
4514
4515         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
4516         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
4517         opcodes.
4518
4519 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
4522         the 'value' to store is a constant.
4523
4524         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
4525
4526         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
4527         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
4528
4529 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
4530
4531         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4532         for accessing method->generic_container.
4533
4534 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
4535
4536         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
4537         
4538         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
4539
4540         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
4541
4542         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
4543         fails.
4544
4545 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
4546
4547         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
4548
4549         * mini.c: Handle the case when mono_class_vtable () fails.
4550
4551 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
4552         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
4553         the stat profiler.
4554
4555 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4556
4557         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
4558         together with domain sharing.
4559
4560 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4561
4562         * mini.c: Treat callvirts to final methods like non-virtual calls
4563         when doing generic sharing, i.e. look them up in the runtime
4564         generic context.
4565
4566 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4567
4568         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
4569         with computed types (for generic sharing).
4570
4571         * mini.c: Generic sharing for mkrefany and refanyval.
4572
4573 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
4574
4575         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
4576         possible.
4577
4578         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
4579         the generic sharing code.
4580         
4581         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
4582         when needed.
4583
4584 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4585
4586         * mini.h: Remove the declaration of mono_aot_init_vtable ().
4587
4588 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
4589
4590         * driver.c: updated copyright date
4591
4592 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
4595         needed.
4596
4597 2008-05-19  Martin Baulig  <martin@ximian.com>
4598
4599         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
4600         pointing to the new `_mono_debug_using_mono_debugger' variable.
4601
4602         * driver.c
4603         (mono_main): Check mono_debug_using_mono_debugger() rather than
4604         the `MONO_INSIDE_MDB' environment variable to check whether we're
4605         inside the debugger.
4606
4607 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
4610         argument.
4611
4612 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4613
4614         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
4615
4616         * mini.c: Added mini_assembly_can_skip_verification. This
4617         function checks if the assembly requested to skip verification. 
4618         Fixes part of #387274.
4619
4620 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
4621
4622         * mini.c (mini_get_method): Disable the check for open generic classes when
4623         using generic sharing.
4624
4625         * generics.cs: Add a test for #387034.
4626
4627         * mini.c (mini_get_method): Check whenever the method class is an open generic
4628         type, and return NULL in that case, causing a verification error. Fixes
4629         #384123.
4630
4631 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4632
4633         * driver.c (mono_main): Revert r102623. The right
4634         thing to do is to enable the verifier under verifiable
4635         unless a --security flag was passed.
4636
4637         We need this non-trivial behavior for --verify-all otherwise
4638         mcs-compileall won't be able to use it. As it needs everything to
4639         be verified under validil.
4640
4641 2008-05-06  Martin Baulig  <martin@ximian.com>
4642
4643         Fix #383749.
4644
4645         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
4646         (mono_debugger_thread_cleanup): Likewise.
4647         (mono_debugger_extended_notification): Likewise.
4648
4649 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4650
4651         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
4652         against both inflated and non-inflated methods. We need to check against the
4653         generic definition for cases where the instantiated method is not visible.
4654         We need to check against the inflated types for cases where the instantiation
4655         changes any super type. This fixes #382986.
4656
4657         Note that this doesn't need to be applied to other parts of mono_method_to_ir
4658         that check for visibiliy as generic params only appears as the type subject
4659         of tokens on call opcodes. Field manipulation and ldftn must always
4660         target an exact type.
4661
4662 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4663
4664         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
4665         if no related --security flag is passed.
4666
4667 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4668
4669         * mini-arch.h: Prepare support for ppc64.
4670
4671         Contributed under MIT/X11 license.
4672
4673 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4674
4675         * aot-runtime.c: Prepare support for ppc64.
4676
4677         Contributed under MIT/X11 license.
4678
4679 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4680
4681         * mini-ops.h: Prepare support for ppc64.
4682
4683         Contributed under MIT/X11 license.
4684
4685 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
4686
4687         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
4688
4689         Contributed under MIT/X11 license.
4690
4691 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
4694         assemblies, since aot_name is not a full path, causing us to load MS.NET 
4695         assemblies on windows.
4696
4697 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
4698
4699         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
4700         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
4701         * main.c: Use UTF-8 encoded command line instead of Windows default code
4702         page on Windows to support Unicode.
4703         * driver.c (DllMain): New function for mixed-mode assembly support.
4704         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
4705         export __stdcall functions without decoration.
4706
4707         Contributed under MIT/X11 license.
4708
4709 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4710
4711         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
4712         saving it very early.
4713
4714 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4715
4716         * mini.h, mini.c: Lots of code for accessing the old RGCTX
4717         deleted.  The only way to access the new RGCTX is via the
4718         trampline.
4719
4720         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
4721         vtable instead of the RGCTX to static methods.
4722
4723         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
4724         accessing the new RGCTX.
4725
4726         * generic-sharing.c: There is no separation between self, type
4727         arguments and other types in the RGCTX anymore.
4728
4729 2008-04-25  Jonathan Chambers <joncham@gmail.com>
4730
4731         * mini-amd64.c (add_general): Remove previous stack adjustment.
4732         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
4733         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
4734         for 32 bytes of stack space reserved for all calls.
4735         
4736         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4737         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
4738         adjustment.
4739         
4740         Code contributed under MIT/X11 license.
4741
4742 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
4743
4744         * mini.c (mini_method_verify): Only verify non-inflated methods, check
4745         against the root definition, peeling out method and type instantiations.
4746         Cache verify success results, code that fails verification is still
4747         checked multiple times.
4748
4749 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4750
4751         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4752
4753 2008-04-23  Jonathan Chambers <joncham@gmail.com>
4754
4755         * mini-amd64.c (add_general): Always increment stack on Win64.
4756         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4757         on Win64.
4758         
4759         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
4760         stack based argument handling on Win64.
4761         
4762         Code contributed under MIT/X11 license.
4763
4764 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
4765
4766         * Makefile.am (version.h): Add support for git-svn.
4767
4768 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4769
4770         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4771         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
4772         avoiding allocations and libc functions which might deadlock.
4773         
4774         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4775         'no-gdb-backtrace' option is set.
4776
4777         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4778
4779         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4780
4781 2008-04-21  Martin Baulig  <martin@ximian.com>
4782
4783         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4784         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4785
4786 2008-04-21  Martin Baulig  <martin@ximian.com>
4787
4788         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4789         `thread_vtable', `event_handler_ptr' and `event_handler'.
4790
4791 2008-04-21  Martin Baulig  <martin@ximian.com>
4792
4793         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4794         allows delayed initialization of the `executable_code_buffer' when
4795         attaching.
4796
4797 2008-04-21  Martin Baulig  <martin@ximian.com>
4798
4799         * mini.h (mono_debugger_create_notification_function): Removed.
4800         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4801
4802         * mdb-debug-info64.s
4803         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4804
4805         * mdb-debug-info32.s
4806         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4807
4808         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4809         currently only works on x86 and x86_64, so don't create it on ppc.
4810
4811 2008-04-21  Martin Baulig  <martin@ximian.com>
4812
4813         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4814
4815         * mini.c
4816         (mini_method_compile): In the fp elimination check, check
4817         `debug_options.mdb_optimizations' in addition to
4818         mono_debug_using_mono_debugger().       
4819
4820         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4821         disable some JIT optimizations which are only disabled when
4822         running inside the debugger.
4823         Added `--help-debug' option to describe the debugging options.
4824         (parse_debug_options): New static function to parse the `--debug'
4825         options, so we can easily add more stuff in future.
4826
4827 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4828
4829         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4830         the method has no body.
4831
4832 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4833
4834         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4835         assembly is not allowed in MSVC 64-bit compiler. 
4836         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4837         as we get floating point exceptions everywhere.
4838         
4839         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4840         correctly align arguments for call to throw_exception.
4841         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4842         
4843         Code contributed under MIT/X11 license.
4844
4845 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4846
4847         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4848
4849 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4850
4851         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4852
4853         * mini-amd64.c (NEW_INS): Set cil_code.
4854
4855         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4856         from mini-amd64.c so all debugger related logic is in one place.
4857
4858         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4859         later won't have a random ip assigned to them.
4860
4861 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4864         the arch specific function initializes code_size.
4865         (mono_create_delegate_trampoline): Ditto.
4866
4867         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4868         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4869         platforms.
4870
4871         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4872         running under the debugger.
4873
4874         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4875         debugger.
4876
4877         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4878         debugger. Also move the disabling of optimizations here from driver.c.
4879         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4880         debugger.
4881
4882         * mini.h (MonoCompile): Add a few new flags.
4883
4884 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4885
4886         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4887         so the cil_code field of created MonoInst's is properly set.
4888         (mini_select_instructions): Ditto.
4889
4890         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4891         (MONO_INST_NEW_CALL): Ditto.
4892
4893         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4894         in many places so the ins->cil_code field is properly initialized.
4895
4896         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4897         place.
4898
4899 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4900
4901         * mini.c (mini_method_compile): Print a different message when compiling a 
4902         shared method.
4903         
4904         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4905         > 1.
4906
4907 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4908
4909         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4910         SSE2 instructions.
4911
4912         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4913         
4914 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4915
4916         * mini.c (handle_stack_args): Make this return void since its return value was
4917         never used. Also set cfg->unverifiable for invalid IL instead of calling
4918         G_BREAKPOINT ().
4919
4920 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4921
4922         * mini.c: Make sure "this" is live in catch clauses with type
4923         variables in shared generic code.
4924
4925 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4926
4927         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4928         generic_class_is_reference_type() to ensure the proper behaviour
4929         when sharing generic code and the type in question is a type
4930         argument.
4931
4932 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4933
4934         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4935         race conditions when printing thread dumps. Fixes #377738.
4936
4937 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4938         
4939         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4940         shows up when both MonoInst arguments can cause aliasig.
4941         There is likely no way in the current JIT to trigger this problem, but
4942         it showed up in the development of generics sharing, when in a new
4943         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4944         When the generics sharing code will be committed, its tests will be
4945         valid also for this bug.
4946
4947 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4948
4949         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4950         PATCH_INFO_METHOD.
4951
4952         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4953         NULL.
4954
4955 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4958         use a more detailed exception message for InvalidCastException.
4959
4960         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4961
4962         * driver.c (mono_main): Add --debug=casts option to turn on better 
4963         InvalidCastException message details.
4964
4965         * mini.c (mini_get_debug_options): New helper function to return the address of
4966         the debug_options variable.
4967
4968         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4969         the jit_tls TLS variable.
4970
4971         * mini.c (mono_jit_tls): New TLS variable.
4972
4973         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4974         option is used.
4975
4976 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4977
4978         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4979
4980         * mini.c: Removed verifer related stuff, code moved to verify.c.
4981
4982         * driver.c: Using code from verify.c instead of mini.c.
4983
4984 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4985
4986         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4987         longer valid.
4988
4989 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4990
4991         * mini.c (check_for_method_verify): Enabling verification of
4992         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4993         have been fixed.
4994
4995 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4996
4997         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4998         caller saved registers as well.
4999         
5000         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5001         saved registers as well.
5002
5003 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
5004
5005         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5006
5007         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5008         code.
5009
5010 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5013         to get_call_info.
5014         (get_call_info): Take a gsctx argument instead of 'cfg'.
5015
5016 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
5017
5018         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5019         mono_verify_all is set.
5020
5021         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5022
5023         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5024
5025 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
5026
5027         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5028         an exception.
5029
5030         * driver.c mini.c mini.h: Add a --verify-all development option to test the
5031         verifier and the code generated by the compiler.
5032
5033 2008-03-25  Mark Probst  <mark.probst@gmail.com>
5034
5035         * mini.c: Generic sharing of the non-nullable case of the box
5036         instruction.
5037
5038 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
5039
5040         * inssel.brg: Fix the build.
5041
5042         * iltests.il.in: Add a test for lconv.ovf.u8.un.
5043
5044 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
5045
5046         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5047         Array:Address. Fixes #372410.
5048
5049         * iltests.il.in: New tests for readonly prefix.
5050
5051 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
5052
5053         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
5054         mini-trampolines.c.
5055
5056         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
5057         mini-exceptions.c.
5058
5059         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5060         
5061         * mini.c (mono_decompose_op_imm): New helper function.
5062
5063         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5064         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5065         return value.
5066
5067         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5068         mono_arch_output_basic_block. Fix warnings.
5069
5070         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5071         for now.
5072
5073 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
5074
5075         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5076         since the extra frame is now detected automatically inside the loop.
5077
5078         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
5079         opts which are now in mono_peephole_ins ().
5080         
5081         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5082
5083         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5084         frames and skip duplicate managed-to-native frames. Fixes #367665.
5085
5086         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5087         opts which are now in mono_peephole_ins ().
5088         (mono_arch_peephole_pass_2): Ditto.
5089
5090         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5091
5092         * mini-codegen.c (mono_peephole_ins): New helper function containing the
5093         arch independent peephole optimizations.
5094
5095         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5096         opts which are now in mono_peephole_ins ().
5097
5098         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
5099         
5100         * mini-s390.c (mono_arch_output_basic_block): Fix build.
5101
5102         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
5103         pattern.
5104
5105         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
5106         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
5107         opcode. 
5108
5109 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
5110
5111         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
5112         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5113         return value.
5114
5115         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5116         mono_arch_output_basic_block. Fix warnings.
5117
5118 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
5119
5120         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
5121         conv.ovf.u.un.
5122
5123 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
5124
5125         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
5126         conv.ovf.u.un.
5127
5128         * iltests.il: Add new tests.
5129
5130 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
5131
5132         * mini.c: Removed Windows version macros.
5133
5134 2008-03-20  Mark Probst  <mark.probst@gmail.com>
5135
5136         * generic-sharing.c: Put reflection types in the extensible part
5137         of the runtime generic context.
5138
5139         * mini.c: Generic sharing of the GetTypeHandle special case of the
5140         ldtoken instruction.
5141
5142 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
5143
5144         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
5145
5146         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
5147         
5148         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
5149         consistency with the other version on the linear IR branch.
5150
5151         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
5152
5153         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
5154
5155         * iltests.il.in: Add new tests.
5156
5157 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
5158
5159         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
5160
5161         * iltests.il.in: Add new tests.
5162
5163 2008-03-19  Mark Probst  <mark.probst@gmail.com>
5164
5165         * mini.c: Two variables with the same name were declared in
5166         nesting contexts and one wasn't initialized.  Fixed.
5167
5168 2008-03-19  Mark Probst  <mark.probst@gmail.com>
5169
5170         * mini.c: Generic sharing of the initobj instruction.
5171
5172 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
5173
5174         * mini.c: make the test to optimize ldtoken from typeof() more
5175         precise.
5176
5177 2008-03-18  Mark Probst  <mark.probst@gmail.com>
5178
5179         * mini.c: Generic sharing of the initobj instruction for reference
5180         types.
5181
5182 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5183
5184         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
5185         the mono_breakpoint_clean_code() code to perform bound checks.
5186
5187 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
5188
5189         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
5190         mono_arch_patch_callsite() to include the start of the managed method
5191         to be able to perform bound checks.
5192
5193 2008-03-17  Mark Probst  <mark.probst@gmail.com>
5194
5195         * mini.c: Generic sharing for the isinst instruction.
5196
5197 2008-03-17  Mark Probst  <mark.probst@gmail.com>
5198
5199         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
5200         inssel-long32-mips.brg: Added opcodes for doing indirect calls
5201         with the runtime generic context argument.
5202
5203         * mini.c: Share calls to several types of unsharable methods by
5204         putting the address of the method code in the runtime generic
5205         context and doing an indirect call.
5206
5207         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
5208         to switches.
5209
5210 2008-03-16  Mark Probst  <mark.probst@gmail.com>
5211
5212         * generic-sharing.c: Change due to a change in the runtime genric
5213         context API.
5214
5215 2008-03-15  Martin Baulig  <martin@ximian.com>
5216
5217         * tramp-x86.c
5218         (mono_arch_nullify_class_init_trampoline): Add call to
5219         mono_breakpoint_clean_code() to make things work when running
5220         inside the debugger.
5221
5222         * tramp-amd64.c
5223         (mono_arch_nullify_class_init_trampoline): Add call to
5224         mono_breakpoint_clean_code() to make things work when running
5225         inside the debugger.
5226
5227 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
5228
5229         * inssel-long.brg (reg): Fix 64 bit build.
5230
5231 2008-03-14  Mark Probst  <mark.probst@gmail.com>
5232
5233         * mini.c, mini.h: Share static generic code by passing it an
5234         implicit argument pointing to the runtime generic context.
5235
5236         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
5237         inssel-long32-mips.brg: New opcodes for calling shared static,
5238         which need to be passed the runtime generic context.
5239
5240         * mini-amd64.c, mini-x86.c: Save the runtime generic context
5241         argument on the stack in the prologue if needed.  New function for
5242         finding the runtime generic context argument from the registers
5243         saved by the trampoline.
5244
5245         * mini-amd64.h, mini-x86.h: Specify which register to use for the
5246         runtime generic context argument.
5247
5248         * tramp-amd64.c: Also restore the register used for the runtime
5249         generic context argument.
5250
5251         * mini-trampoline.c: Resolve shared static calls by consulting the
5252         runtime generic context via the new argument.
5253
5254         * generic-sharing.c: Add an argument to sharability-checking
5255         functions that specifies whether type variables should be treated
5256         as sharable type arguments.
5257
5258         * inssel-x86.brg: Removed a superfluous, buggy rule.
5259
5260         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
5261         to switches.
5262
5263 2008-03-14  Martin Baulig  <martin@ximian.com>
5264
5265         * debug-debugger.c (main_thread_handler): Call
5266         mono_runtime_run_main() without sending any notifications.
5267
5268         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
5269
5270 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
5271
5272         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
5273
5274 2008-03-14  Mark Probst  <mark.probst@gmail.com>
5275
5276         * tramp-x86.c: Fixed register restore offsets in the trampoline
5277         code for ECX and EDX.
5278
5279 2008-03-12  Geoff Norton  <gnorton@novell.com>
5280
5281         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
5282         different ucontext_t implementations.
5283         * exceptions-arm.c: Use the above defines to get exceptions working on 
5284         iPhone (based on a patch by Luke Howard lukeh@padl.com)
5285         * mini-arm.c: Implement iPhone icache support (based on a patch by
5286         Luke Howard lukeh@padl.com)
5287
5288 2008-03-12  Mark Probst  <mark.probst@gmail.com>
5289
5290         * mini.c: Enable generic sharing of calls to non-static
5291         non-interface non-generic non-value-type methods.
5292
5293         * mini-trampolines.c: Resolve calls from shared generic code.
5294
5295 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
5298
5299         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
5300
5301 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
5302
5303         * mini.c: some fixes for the AOT compiler.
5304
5305 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
5306
5307         * cpu-amd64.md: Add clob:1 to some float opcodes.
5308
5309 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
5310
5311         * mini.h: Added MiniVerifierMode enumeration.
5312
5313         * mini.c: Added mini_verifier_set_mode to control
5314         the usage of the new verifier.
5315
5316         * mini.c (mono_method): Integrated the new verifier.
5317
5318         * driver.c: Extended --security option with validil and
5319         verifiable options to activate the new verifier.
5320
5321 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
5322
5323         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
5324         optimization to ctors taking 0 or 2 arguments too.
5325
5326         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
5327         a bit.
5328
5329         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
5330
5331         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
5332
5333 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
5334
5335         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
5336         non-aot case as well.
5337
5338         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
5339
5340         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
5341         changes.
5342
5343         * aot-compiler.c (encode_patch): Ditto.
5344
5345         * mini.h (G_MININT32): Fix the definition of this.
5346
5347 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
5348
5349         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
5350
5351         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
5352
5353 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
5356         methods returning vtypes in registers.
5357         (mono_arch_allocate_vars): Ditto.
5358
5359         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
5360
5361         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
5362
5363         * generics.cs: Add a test from the linear IR branch.
5364
5365         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
5366
5367         * mini.c (inline_method): Cache failed inline attempts.
5368
5369 2008-03-04  Mark Probst  <mark.probst@gmail.com>
5370
5371         * mini.c: For shared methods of generic classes put the location
5372         of "this" into the MonoGenericJitInfo.
5373
5374         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
5375         register out of a MonoContext by register number.  Add the generic
5376         sharing context as an argument to mono_arch_find_this_argument().
5377
5378         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
5379         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
5380         for new arch function.
5381
5382         * mini-exception.c: Handle open exception clauses in shared
5383         generic code.
5384
5385         * mini-trampolines.c: Supply additional argument to
5386         mono_arch_find_this_argument().
5387
5388 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
5389
5390         * Makefile.am (regtests): Run the bench.exe tests last.
5391
5392 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
5395         a bit.
5396
5397 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
5398
5399         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
5400         with MS.
5401
5402         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
5403         
5404         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
5405
5406         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
5407         whose class has no cctor.
5408
5409         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
5410
5411 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
5412
5413         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
5414         unverified.
5415
5416 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
5419         to be in sync with the code on the linear IR branch.
5420
5421         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
5422
5423         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
5424
5425 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
5426
5427         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
5428
5429         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
5430
5431         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
5432
5433         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
5434
5435         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
5436         
5437         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
5438         body.
5439
5440 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
5441
5442         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
5443         OP_LOADR4_MEMBASE emission.
5444
5445         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
5446         (mono_spillvar_offset_float): Ditto.
5447
5448         * mini-mips.c (mono_arch_emit_prolog): Ditto.
5449
5450         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
5451         emission.
5452
5453         * basic-long.cs: Add regression tests for them.
5454
5455         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
5456         use.
5457         (mono_arch_allocate_vars): Fix representation of single-precision float
5458         argument.
5459         (mono_arch_output_basic_block): Ditto.
5460
5461         * inssel-mips.brg: Ditto, remove duplicate items.
5462
5463         * mini-mips.c (emit_load_volatile_arguments): New function to handle
5464         arguments of tail calls as on other platforms.
5465         (mono_arch_output_basic_block): Handle tail calls.
5466
5467         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
5468         register.
5469
5470         * objects.cs (test_5_pass_static_struct): Add test for it.
5471
5472         Contributed under MIT/X11 license.
5473
5474 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
5475
5476         * Makefile.am: Use gmcs for compiling the regression tests.
5477
5478         * *.2.cs *.2.il: Rename to *.cs and *.il.
5479
5480 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
5481
5482         * regalloc.h: Make the vassign array smaller.
5483
5484         * mini.c (mini_method_compile): Remove an unused field in cfg.
5485
5486         * mini-codegen.c: Add a bunch of micro optimizations.
5487
5488 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
5489
5490         * regalloc.h: Remove some unused fields.
5491
5492 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
5493
5494         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
5495
5496         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
5497
5498 2008-02-22  Mark Probst  <mark.probst@gmail.com>
5499
5500         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
5501
5502         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
5503         trampoline: Fetch an entry from the runtime generic context.  If
5504         it's NULL, jump to the actual trampoline to fill the runtime
5505         generic context.  Otherwise, return it.
5506
5507         * mini.c: Call the lazy fetch trampoline to get entries out of the
5508         runtime generic context.
5509
5510         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
5511         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
5512         tramp-sparc.c: Stubs for the lazy fetch trampoline.
5513
5514 2008-02-21  Mark Probst  <mark.probst@gmail.com>
5515
5516         * mini.c: Fetch data out of the extensible part of the runtime
5517         generic context instead of calling a helper function.
5518
5519         * generic-sharing.c: Some functions moved into
5520         metadata/generic-sharing.c.  Helper function for fetching other
5521         types now checks and asserts against extensible rgctx (just for
5522         debugging purposes - the helper function isn't called anymore
5523         unless for debugging).
5524
5525 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5526
5527         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
5528         for tail calls up to the point that the tests in iltests.exe run. Also add a
5529         dummy CKFINITE implementation.
5530         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
5531         needed for trampoline LMF frames.
5532
5533         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
5534         trampoline LMF frames.
5535
5536 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
5537
5538         * mini.c (inline_method): clean any pending loader error when inlining fail.
5539         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
5540
5541 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5542
5543         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
5544
5545         * aot-runtime.c (decode_patch_info): Ditto.
5546
5547         * mini.c (mono_resolve_patch_target): Ditto.
5548         
5549         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
5550         icall wrappers.
5551
5552         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
5553         
5554         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
5555         if it references an icall address.
5556
5557 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
5558
5559         * cpu-s390x.md: Remove some more unused opcodes.
5560         
5561         * cpu-s390x.md: Remove some unused opcodes.
5562
5563         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
5564         mono_op_imm_to_op ().
5565
5566         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
5567         instead of a switch statement.
5568         
5569         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
5570         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
5571
5572         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
5573         
5574         * mini-codegen.c: Remove unused mono_regstate2_... functions.
5575
5576         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
5577         -1.
5578
5579 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
5580
5581         * driver.c (mono_main): Improve error reporting when an assembly cannot be
5582         opened. Fixes #362607.
5583
5584         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
5585
5586         * iltests.il.in: Add a test for static methods in interfaces.
5587
5588 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
5589
5590         * genmdesc.c (build_table): Fix a crash on older glib versions.
5591
5592         * cpu-sparc.md: Remove some unused opcodes.
5593         
5594         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
5595         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
5596
5597         * cpu-amd64.md: Remove some unused opcodes.
5598
5599         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
5600         like the other opcodes.
5601
5602 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
5603
5604         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
5605
5606         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
5607
5608         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
5609         variables 'cfg' instead of 'm' for consistency.
5610
5611         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
5612
5613         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
5614         argument holding the vtype return address, to avoid the ambigious use of
5615         cfg->ret for this purpose.
5616
5617         * mini.c (NEW_RETLOADA): Use vret_addr if set.
5618
5619         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
5620         
5621         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
5622         new mono_print_ins () function which only takes one argument.
5623
5624 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
5625
5626         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
5627         macro arguments.
5628
5629 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
5632
5633         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
5634
5635         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
5636         opcodes and other small changes.
5637
5638         * mini-ops.h: Add some new opcodes from the linear IR branch.
5639
5640         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
5641
5642         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
5643         opcodes, use the REG_MEMBASE opcodes instead.
5644         
5645         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
5646         opcodes, use the REG_MEMBASE opcodes instead.
5647         
5648         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
5649         linear IR branch.
5650
5651         * mini.c (mono_op_imm_to_op): New helper function.
5652
5653         * mini-ops.h: Add some opcodes from linear IR branch.
5654
5655 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
5658         <tsv@solvo.ru>.
5659
5660 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
5661
5662         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
5663         OP_ICONV_TO_R4/R8.
5664
5665         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
5666
5667 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
5668
5669         * aot-compiler.c (emit_method_code): Add an assert.
5670
5671         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
5672         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
5673         methods.
5674
5675 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
5676
5677         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
5678         some load/store opcodes so they are consistent. 
5679         (mono_arch_emit_prolog): Simplify some code.
5680
5681         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
5682
5683         * objects.cs: Add tests for large argument offsets on ARM.
5684
5685         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
5686         stack offsets. Fixes #359651.
5687
5688         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
5689
5690         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
5691
5692         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
5693
5694         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
5695
5696         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
5697
5698         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
5699         rid of CEE_CONV_R_UN.
5700
5701         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
5702
5703 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
5704
5705         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
5706
5707         * mini.c (mono_normalize_opcodes): Add some more opcodes.
5708
5709         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
5710
5711         * cpu-amd64.md: Remove some unused opcodes.
5712
5713         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
5714
5715         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
5716
5717         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
5718         arch specific functions for its parts. Call the peephole pass after local
5719         regalloc so the prolog can compute a more accurate max_offset.
5720         
5721         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
5722         the corresponding OP_I/OP_L opcodes.
5723
5724         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
5725
5726         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
5727
5728 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5729
5730         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
5731         as they are handled in mini.c.
5732
5733         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5734         
5735         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5736         case since it is handled in mini.c.
5737
5738         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5739
5740         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5741
5742         * *.c: Use the new opcodes in the IR and back end code.
5743
5744         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5745
5746         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5747
5748 2008-02-06  Mark Probst  <mark.probst@gmail.com>
5749
5750         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5751         an assert because it has a race condition.
5752
5753 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5754
5755         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5756
5757         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5758
5759         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5760
5761         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5762         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5763
5764 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5765
5766         * cpu-amd64.md (move): Correct the maximum size of move.
5767
5768 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5769
5770         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5771         the generic class init trampoline to return quickly if the class
5772         is already inited.
5773
5774 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
5775
5776         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5777         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5778
5779 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5780
5781         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5782         branch.
5783
5784 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5785
5786         * objects.cs: Add some soft-float tests.
5787
5788         * mini.c: Fix a couple more soft-float issues.
5789
5790         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5791
5792         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5793         avoid a REX prefix.
5794
5795 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5796
5797         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5798         exception happens while compiling a virtual method.
5799
5800 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5801
5802         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5803         
5804         * mini-sparc.c: Fix build.
5805
5806         * mini-sparc.c (get_call_info): Add support for generic sharing.
5807
5808         * mini-exceptions.c: Add a FIXME.
5809
5810 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5811
5812         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5813         altstack handling code.
5814
5815         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5816         
5817         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5818
5819         * mini-s390.c: Add support for generic sharing.
5820
5821         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5822         Fix CAS on s390.
5823         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5824
5825         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5826
5827         * mini-s390x.c: Add support for generic sharing.
5828         
5829         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5830         Fix CAS on ia64.
5831         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5832
5833         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5834         can be used since it takes a 16 bit signed immediate.
5835
5836         * inssel-s390x.brg: Fix OP_SETRET.
5837
5838         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5839
5840         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5841
5842         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5843
5844         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5845
5846         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5847         in one place.
5848
5849         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5850         stuff.
5851
5852         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5853         of the unused mono_arch_patch_delegate_trampoline stuff.
5854
5855 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5856
5857         * basic-long.cs: Move the fp related tests to basic-float.cs.
5858
5859         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5860
5861         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5862
5863         * basic-calls.cs: Add a test for proper float argument passing.
5864
5865         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5866         if the context corresponds to an exception received through a signal.
5867
5868         * exceptions.cs: Add a test for nullref handling at the start of a try
5869         clause.
5870
5871         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5872
5873         * jit-icalls.c (mono_break): New JIT icall.
5874
5875         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5876
5877         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5878
5879 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5880
5881         * cpu-*.md: Get rid of unused opcodes.
5882
5883         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5884
5885         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5886         by all platforms.
5887
5888         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5889         define.
5890
5891         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5892         the arch independent trampoline code in mini-trampolines.c.
5893
5894         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5895
5896         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5897
5898         * mini-s390.h: Remove an unused define.
5899         
5900         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5901         the arch independent trampoline code in mini-trampolines.c.
5902
5903         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5904
5905 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5908
5909         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5910
5911         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5912
5913         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5914
5915         * cpu-amd64.md: Use smaller sizes for int opcodes.
5916
5917         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5918
5919         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5920         objects.cs.
5921
5922         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5923         debugging.
5924
5925         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5926         instead of though a pointer to save an indirection when accessing elements of
5927         the array.
5928
5929         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5930         some typos.
5931         (NOT_IMPLEMENTED): New helper macro.
5932         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5933         of a bb.
5934
5935         * *.c: Use the new helper macro.
5936
5937 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5938
5939         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5940
5941 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5942
5943         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5944         stack slots.
5945
5946 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5947
5948         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5949         profiling is enabled.
5950         
5951         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5952         the end.
5953         (mono_arch_emit_prolog): Add more first bblock optimizations.
5954
5955         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5956         in order if possible.
5957         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5958         bblock, since the arguments are still in their original registers.
5959
5960         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5961
5962 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5963
5964         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5965         as well.
5966
5967         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5968         offset 0.
5969
5970         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5971
5972         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5973         process async exceptions received while in unmanaged code.
5974
5975         * mini.c (mini_init): Install a callback with the runtime which will be called
5976         when a thread receives an async exception while in unmanaged code.
5977
5978         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5979
5980         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5981
5982 2008-01-16  Wade Berrier  <wberrier@novell.com>
5983
5984         * cpu-g4.md:
5985         * cpu-arm.md:
5986         * cpu-s390x.md:
5987         fix build
5988
5989 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5992         compilation with sun cc.
5993
5994         * cpu-*.md: Fix the build.
5995
5996         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5997
5998         * mini-amd64.h: Add some comments to the MonoLMF structure.
5999
6000         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6001         
6002         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6003         in the LMF structure if possible. This saves two instructions in the
6004         managed->native wrappers.
6005
6006         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6007
6008 2008-01-16  Mark Probst  <mark.probst@gmail.com>
6009
6010         * generic-sharing.c: New type argument lookup code which uses the
6011         runtime generic context template.
6012
6013 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6016
6017         * mini-arm.c (add_general): Fix arm eabi parameter passing.
6018         (mono_arch_output_basic_block): Fix localloc implementation.
6019
6020         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6021
6022         * mini-ia64.c (peephole_pass): Fix ia64 build.
6023
6024         * mini-amd64.c (peephole_pass): Fix a warning.
6025         
6026         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6027         at a constant offset from sp/fp.
6028
6029         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6030         instead of obtaining it from *lmf in the managed method case.
6031
6032 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
6033
6034         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6035
6036 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
6037
6038         * mini.h (MonoInstList): New type.
6039         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6040         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6041         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6042         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6043         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6044         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6045         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6046         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6047         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6048         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6049         MONO_INST_LIST_FOR_EACH_ENTRY,
6050         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6051         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6052         mono_inst_list_first, mono_inst_list_last,
6053         mono_inst_list_next, mono_inst_list_prev): New instruction
6054         list handling interfaces.
6055         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6056         list head 'ins_list'.
6057         (MonoInst): Replace next pointer with list head 'node'.
6058         (MonoCallInst): Make 'out_args' a MonoInstList.
6059         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6060         (MonoCompile): Delete reverse_inst_list and
6061         reverse_inst_list_len.
6062         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6063         mono_arch_lowering_pass, mono_arch_local_regalloc,
6064         mono_arch_output_basic_block, mono_arch_emit_prolog):
6065         Convert to new instruction lists.
6066         (insert_after_ins): Delete.
6067         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6068         instruction lists.
6069         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6070         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6071         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6072         mono_emulate_opcode, mono_emit_load_got_addr,
6073         inline_method, mono_method_to_ir, mono_print_bb_code,
6074         print_dfn, decompose_pass, nullify_basic_block,
6075         replace_out_block_in_code, remove_block_if_useless,
6076         merge_basic_blocks, move_basic_block_to_end,
6077         try_unsigned_compare, optimize_branches, mono_print_code,
6078         mini_select_instructions, remove_critical_edges): Likewise.
6079         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6080         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6081         mono_arch_output_basic_block, mono_arch_emit_prolog):
6082         Likewise.
6083         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6084         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6085         mono_arch_output_basic_block): Likewise.
6086         (inst_list_prepend, insert_after_ins): Delete.
6087         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6088         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6089         instruction lists.
6090         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6091         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6092         mono_arch_emit_prolog): Likewise.
6093         * cfold.c (mono_constant_fold): Likewise.
6094         * liveness.c (visit_bb, mono_analyze_liveness,
6095         optimize_initlocals): Likewise.
6096         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6097         * graph.c (mono_draw_code_cfg): Likewise.
6098         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
6099         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
6100         mono_ssa_cprop): Likewise.
6101         * abcremoval (get_relations_from_previous_bb, process_block):
6102         Likewise.
6103         * local-propagation (mono_cprop_invalidate_values,
6104         mono_local_cprop_bb): Likewise.
6105         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
6106         peephole_pass, mono_arch_output_basic_block,
6107         mono_arch_emit_prolog): Likewise.
6108         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
6109         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6110         mono_arch_emit_prolog): Likewise.
6111         (insert_after_ins): Delete.
6112         * aliasing.c (print_code_with_aliasing_information,
6113         mono_build_aliasing_information, mono_aliasing_deadce):
6114         Convert to new instruction lists.
6115         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
6116         peephole_pass, NEW_INS, mono_arch_lowering_pass,
6117         mono_arch_local_regalloc, mono_arch_output_basic_block):
6118         Likewise.
6119         (insert_after_ins): Delete.
6120         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
6121         peephole_pass, mono_arch_output_basic_block): Convert to
6122         new instruction lists.
6123         * mini-codegen (InstList, inst_list_prepend,
6124         insert_after_ins): Delete.
6125         (insert_before_ins, get_register_force_spilling,
6126         get_register_spilling, free_up_ireg, free_up_reg,
6127         create_copy_ins, create_spilled_store, alloc_int_reg,
6128         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
6129         to new instruction lists.
6130         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
6131         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6132         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
6133         (insert_after_ins): Delete.
6134         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
6135         mono_arch_local_regalloc, mono_arch_output_basic_block,
6136         mono_arch_call_opcode): Convert to new instruction lists.
6137         (insert_after_ins): Delete.
6138         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
6139         peephole_pass, mono_arch_output_basic_block,
6140         mono_arch_emit_prolog): Convert to new instruction lists.
6141
6142 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
6143
6144         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
6145
6146         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
6147         Fixes #353182.
6148
6149         * Makefile.am (version.h): Make this work with non-bash shells.
6150
6151 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
6152
6153         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
6154
6155 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
6156
6157         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
6158         the InitializeArray optimization.
6159
6160 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
6161
6162         * mini.c driver.c: Don't include os/gc_wrapper.h.
6163
6164 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
6165
6166         * mini.c (print_jit_stats): Print GC statistics if available.
6167
6168 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
6169
6170         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
6171
6172 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
6173
6174         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
6175
6176 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
6177
6178         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
6179         
6180         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
6181
6182         * driver.c (mono_main): Ditto.
6183
6184 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
6185
6186         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
6187
6188         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
6189         in the vtable can't be encoded.
6190         (compile_method): Ditto.
6191
6192 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
6193
6194         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
6195         defined.
6196
6197         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
6198         lmf->rbp.
6199
6200         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
6201         the top LMF entry belongs to the current method.
6202
6203         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
6204
6205 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
6206
6207         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
6208         
6209         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
6210
6211         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
6212
6213         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
6214
6215         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
6216
6217         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
6218         implementation.
6219
6220         * basic-float.cs: Add an ulong->double cast test.
6221
6222 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
6223
6224         * mini.c (mono_method_to_ir): Fix a warning.
6225
6226 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * mini-ops.h: Add OP_SWITCH.
6229
6230         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
6231         CEE_SWITCH in back-end code, use OP_SWITCH instead.
6232
6233 2007-12-11  Geoff Norton  <gnorton@novell.com>
6234
6235         * mini-s390x.c: Minor change to the MAX() define to allow
6236         it to compile with other gcc versions.
6237
6238 2007-12-11  Geoff Norton  <gnorton@novell.com>
6239
6240         * cpu-s390x.md:
6241         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
6242
6243 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
6244
6245         exceptions-arm.c (mono_arch_get_restore_context): Restore
6246         the frame pointer.
6247
6248         exceptions-arm.c (throw_exception): Save the frame pointer.
6249         This is a partial fix for #323747. Only the client side is
6250         fixed.
6251
6252 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
6253
6254         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
6255         was using an unrelated variable to log the class which
6256         needed the cctor to be called. This was crashing on arm.
6257
6258 2007-12-09  Robert Jordan  <robertj@gmx.net>
6259
6260         * mini-x86.c (mono_arch_emit_epilog):
6261         Consider all kinds of 64-bit types. Fixes #323114.
6262
6263 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
6266
6267 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
6268
6269         * mini-amd64.c (peephole_pass): Add a missing instruction check.
6270
6271 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6272
6273         * mini.c: run type ctor before allocating an object, not only
6274         when running it's constructor method (fixes at least part of bug #342507).
6275
6276 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
6277         
6278         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
6279         
6280         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
6281         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
6282         function.
6283
6284         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
6285         mono_generic_class_init_trampoline () the same as it is done with the other
6286         trampolines.
6287
6288         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
6289         aot-runtime.c aot-compiler.c: Implement AOT support.    
6290
6291 2007-12-07  Mark Probst  <mark.probst@gmail.com>
6292
6293         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
6294         build for archs which don't have the vtable trampoline defined
6295         yet.
6296
6297 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
6298
6299         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
6300
6301         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
6302
6303         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
6304
6305         * tramp-<ARCH>.c: Use the new helper function.
6306
6307 2007-12-07  Mark Probst  <mark.probst@gmail.com>
6308
6309         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
6310         trampoline call, which takes a vtable argument.
6311
6312         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
6313         OP_TRAMPCALL_VTABLEs like other calls.
6314
6315         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
6316         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
6317         call.  Implemented a support function which fetches the vtable
6318         from a register set.
6319
6320         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
6321         Implemented a generic class init trampoline, using the
6322         OP_TRAMPCALL_VTABLE opcode.
6323
6324         * mini.c: Implemented static field access when sharing generic
6325         code.  This implies initing the class using the new
6326         OP_TRAMPCALL_VTABLE call.
6327
6328 2007-12-07  Mark Probst  <mark.probst@gmail.com>
6329
6330         * mini.c: Don't compile methods with sharing enabled if their
6331         classes are disabled for sharing.
6332
6333 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
6334
6335         * inssel.brg: Add a missing sign extension to the GETCHR and array access
6336         opcodes. Fixes #346563.
6337
6338         * objects.cs: Add a new test.
6339
6340         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
6341
6342         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
6343         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
6344
6345 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
6346
6347         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
6348
6349 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
6350
6351         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
6352         code stream.
6353
6354 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
6355
6356         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
6357
6358         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
6359         optimization in the AOT case.
6360         
6361 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
6362
6363         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
6364         
6365         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
6366
6367         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
6368
6369         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
6370
6371         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
6372         is created by the inlined delegate ctor.
6373
6374         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
6375
6376         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
6377
6378 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
6379
6380         * cpu-x86.md: Fix the length of ckfinite.
6381
6382 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
6383
6384         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
6385         
6386         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
6387         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
6388
6389         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
6390
6391         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
6392         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
6393
6394 2007-11-28  Martin Baulig  <martin@ximian.com>
6395
6396         * mini-x86.c
6397         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
6398         after creating the trampoline.
6399
6400 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
6401
6402         * aot-runtime.c (load_aot_module): Check runtime version if needed.
6403
6404         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
6405         the same version.
6406
6407         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
6408         instead of the calling method to help AOT.
6409
6410         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
6411
6412 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
6413
6414         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
6415         is defined.
6416
6417 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
6418
6419         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
6420         
6421         * aot-compiler.c (compile_method): Correct check for generic method definitions.
6422         (encode_method_ref): No need to handle generic method definitions specially.
6423
6424         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
6425
6426         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
6427         decode_klass_info.
6428
6429         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
6430         encode_klass_info.
6431         (compile_method): Enable generic sharing.
6432
6433 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
6434
6435         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
6436         (mini_method_compile): Add preliminary support for AOTing shared generic code.
6437
6438         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
6439         generic code.
6440
6441         * mini-trampolines.c: Fix a warning.
6442
6443         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
6444         NEW_PCONST.
6445         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
6446         (generic_class_is_reference_type): Remove unused function.
6447
6448         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
6449         in the generic vtable trampoline case.
6450
6451         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
6452         
6453         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
6454         return an AOT method based on a vtable slot.
6455
6456         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
6457
6458         * mini.c (mini_get_vtable_trampoline): Export this.
6459
6460 2007-11-22  Martin Baulig  <martin@ximian.com>
6461
6462         * debug-debugger.h
6463         (MonoDebuggerInfo): Move `debugger_version' up.
6464
6465 2007-11-22  Martin Baulig  <martin@ximian.com>
6466
6467         * mini-amd64.c
6468         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
6469
6470         * mini-trampolines.c
6471         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
6472         after compiling the method.
6473
6474 2007-11-20  Martin Baulig  <martin@ximian.com>
6475
6476         * debug-mini.c
6477         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
6478         (mono_debugger_remove_breakpoint): Likewise.
6479         (mono_debugger_check_breakpoints): Likewise.
6480
6481         * debug-debugger.c: Implement the new breakpoint interface here.
6482
6483 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
6484
6485         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
6486         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
6487
6488         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
6489
6490 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
6491
6492         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
6493
6494         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
6495         mini.c.
6496
6497         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
6498         mini.c.
6499
6500         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
6501         returning a vtype in a register.
6502
6503         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
6504         here from the arch specific code.
6505
6506         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
6507         mini.c.
6508
6509         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
6510         (mono_arch_emit_prolog): Increment maximum prolog size.
6511
6512         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
6513         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
6514
6515         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
6516         MonoGenericSharingContext.
6517
6518         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
6519         MonoGenericSharingContext. Allocate memory from the cfg mempool.
6520
6521 2007-11-15  Mark Probst  <mark.probst@gmail.com>
6522
6523         * mini.c, mini.h, generic-sharing.c: Functions for producing code
6524         which extract fields out of the runtime generic context.  Full
6525         sharing of the NEWARR opcode.
6526
6527 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6528
6529         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
6530         --enable-minimal=ssa.
6531
6532 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
6533
6534         * mini-trampolines.c (mono_delegate_trampoline): Update after 
6535         mono_marshal_get_delegate_invoke () signature change.
6536
6537 2007-11-13  Mark Probst  <mark.probst@gmail.com>
6538
6539         * mini.c: Removed the shared context in favor of the generic
6540         sharing context.  Allocate the MonoJitInfo structure with room for
6541         the generic sharing context if it's needed.
6542
6543         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
6544         domain-internals.h now.
6545
6546         * mini-x86.c: Pass the generic sharing context to get_call_info ().
6547
6548         * generic-sharing.c: Several changes for working without a shared
6549         context and instead operating on open types instead.
6550
6551 2007-11-12  David S. Miller  <davem@davemloft.net>
6552
6553        * inssel-sparc.brg: Fix double instruction emit.
6554
6555 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
6556
6557         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
6558         Get/Set/Address methods.
6559         
6560         * mini.c debug-debugger.c mini-trampolines.c: Update after 
6561         mono_marshal_get_delegate_invoke signature change.
6562
6563 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6564
6565         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
6566         This can happens with dynamic methods. Fixes the other bug in #322722.
6567
6568 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6569
6570         * tramp-arm.c (mono_arch_patch_callsite): Support patching
6571         BX call sequence.
6572
6573         * mini-arm.c (arm_patch): Implement patching of BX call
6574         sequence. Fixes one of the bugs in #322722.
6575
6576 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
6577
6578        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
6579        under Linux.  We only need to flush every 32-byte cache line.    
6580
6581 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
6582
6583         * mini.c:
6584         move_basic_block_to_end: Add branches when needed, eventually creating
6585         a new BB.
6586         optimize_branches: added a parameter that tells if it's ok to create
6587         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
6588         and avoid calling move_basic_block_to_end when it's not ok.
6589         Fixes bug 318677.
6590
6591 2007-11-07  Mark Probst  <mark.probst@gmail.com>
6592
6593         * mini.c: Abort inlining call to InitializeArray if something
6594         looks wrong.  Let the icall handle it, which now has proper safety
6595         checks.
6596
6597 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6598
6599         * mini.c (mono_spill_call): add support for soft-float.
6600
6601         * mini.c (mono_method_to_ir): add support for soft-float
6602         to inlined functions that return float.
6603
6604         * mini.c (mono_method_to_ir): add support for soft-float
6605         to cee_stsfld opcode on float fields.
6606
6607 2007-11-05  Geoff Norton  <gnorton@novell.com>
6608
6609         * mini-x86.h: Fix the structure access for X86 Leopard.
6610
6611
6612 2007-11-05  Martin Baulig  <martin@ximian.com>
6613
6614         * mini-trampolines.c
6615         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
6616         after compiling the method to notify the debugger.
6617
6618 2007-11-05  Martin Baulig  <martin@ximian.com>
6619
6620         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
6621
6622 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
6623
6624         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
6625         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
6626
6627 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
6628
6629         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
6630         native-to-managed wrappers.
6631         
6632 2007-11-01  Geoff Norton  <gnorton@novell.com>
6633
6634         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
6635         members.
6636
6637 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6638
6639         * mini.c, mini-x86.c: when getting back from unmanaged code
6640         to managed via a marshaled delegate we also need to set the
6641         right domain.
6642
6643 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6644
6645         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
6646         for amd64.
6647
6648 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6649
6650         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
6651         let the debugger or other external agents to tell the JIT when
6652         a sw breakpoint has been inserted in the code that the JIT needs
6653         to be able to inspect.
6654
6655 2007-10-31  Martin Baulig  <martin@ximian.com>
6656
6657         * debug-debugger.h
6658         (MonoDebuggerInfo): Remove `runtime_class_init'.
6659
6660 2007-10-30  Martin Baulig  <martin@ximian.com>
6661
6662         * debug-mini.h
6663         (mono_debugger_thread_created): Added `MonoThread *' argument.
6664         (mono_debugger_extended_notification): New public method.
6665         (mono_debugger_trampoline_compiled): New public method.
6666
6667         * debug-mini.c
6668         (MonoDebuggerThreadInfo): Added `thread' and
6669         `extended_notifications' fields.
6670
6671         * debug-debugger.c
6672         (debugger_executable_code_buffer): New static variable.
6673
6674         * debug-debugger.h
6675         (MonoDebuggerInfo): Added `executable_code_buffer',
6676         `executable_code_buffer_size', `breakpoint_info_area',
6677         `breakpoint_table' and `breakpoint_table_size'.
6678
6679 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
6680
6681         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
6682         that IP  either is an unused value or the vtable pointer. IMT 
6683         calls use vtable + offset now. Reduced by almost half the size
6684         of IMT entries.
6685
6686 2007-10-26  Jonathan Chambers <joncham@gmail.com>
6687
6688         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
6689         defines to access param registers. Replace long usage with
6690         gsize as sizeof(long) != sizeof(void*) on Win64.
6691
6692         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
6693         on Win64. Fix intrinsic, use _AddressOfReturnAddress
6694         instead of non-existant _GetAddressOfReturnAddress.
6695
6696         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
6697         param registers. Save/restore %rdi and %rsi in MonoLMF.
6698
6699         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
6700         param registers. Modify (throw_exception) signature to take 
6701         %rdi and %rsi on Win64. 
6702
6703         Code is contributed under MIT/X11 license.
6704
6705 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6706
6707         * helpers.c: unlink debugging output files.
6708
6709 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
6710
6711         * mini.c: Move mono_create_ftnptr () to object.c.
6712
6713 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6714
6715         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
6716         optional. This function can now be used to disassemble code generated
6717         outside the JIT such as trampolines and IMT thunks.
6718
6719         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
6720
6721         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
6722         vtable pointer from a ldr instruction.
6723
6724         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
6725         new IMT call sequence.
6726
6727         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
6728         call sequence for interface invocations.
6729
6730         * mini-arm.c (mono_arch_emit_imt_argument): added, required
6731         for imt support. This function is empty since IMT on ARM requires no
6732         special handling on the IR side.
6733
6734         * mini-arm.c (mono_arch_find_imt_method): added, required for
6735         imt support.
6736
6737         * mini-arm.c (mono_arch_find_this_argument): added, required
6738         for imt support.
6739
6740         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6741         a ldr instruction to load a value stored in the code stream.
6742
6743         * mini-arm.c (mono_arch_build_imt_thunk):added, required
6744         for imt support.
6745
6746
6747 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6748
6749         * mini.c (mini_init): Install the jump trampoline callback.
6750
6751 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6752
6753         * mini-trampolines.c: handle synchronized methods with the common
6754         vtable trampoline (bug #335601).
6755
6756 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
6757
6758         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6759
6760         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6761         64 bit platforms.
6762
6763         * mini-ia64.h mini-ia64.c: Add support for IMT.
6764
6765         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6766         prolog. Fixes #331958.
6767
6768 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
6769
6770         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6771
6772 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6773
6774         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6775         trampoline.
6776
6777 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6778
6779         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6780         trampoline.
6781
6782 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6783
6784         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6785         trampoline.
6786
6787 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6788
6789         * mini-trampolines.c: changed the magic rampoline to understand
6790         the common vtable trampoline method: the method to invoke is
6791         determined by the vtable displacement of the call.
6792
6793 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6794
6795         * mini.c, mini.h: register the common vtable trampoline if the
6796         architecture supports it.
6797
6798 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6799
6800         * cpu-amd64.md: use the correct max length for tls_get.
6801
6802 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6803
6804         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6805         CEE_STELEM_ANY. Fixes #333696.
6806
6807 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6808
6809         * exceptions-x86.c: provide more graceful handling of the case where
6810         we followed a bogus function pointer from managed code (bug #332866).
6811
6812 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6813
6814         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6815         replaces the generic_shared flag and will carry more information
6816         in the future.
6817
6818         * generic-sharing.c: Added mini_type_stack_size() which allows
6819         allows open types if given a generic sharing context.
6820         mini_get_basic_type_from_generic() takes a
6821         MonoGenericSharingContext* instead of a MonoCompile* now.
6822
6823         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6824         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6825         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6826         changes above.  Just passing arguments through to the right
6827         places.
6828
6829 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6830
6831         * mini-arm.c: unify the call emission to emit_code_seq().
6832
6833 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6834
6835         * tramp-arm.c: reduced the trampoline size.
6836
6837 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6838
6839         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6840         variable handling out of arch-specific code.
6841
6842 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini-arm.c: implemented fast delegate dispatch.
6845
6846 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6849         that fp elimination is turned off if the space required by locals is too
6850         big. Fixes #331958.
6851
6852 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6853
6854         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6855         ARM to the new style trampoline.
6856
6857 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6858
6859         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6860
6861         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6862
6863 2007-10-09  Martin Baulig  <martin@ximian.com>
6864
6865         * debug-debugger.h
6866         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6867         `field_info_offset_offset'.     
6868
6869 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6870
6871         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6872         removed more internal usage of the r11 register and made it available
6873         to the register allocator.
6874
6875 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6876
6877         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6878         when sharing generics and treat type variables as references.
6879
6880 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6881
6882         * mini-ppc.c: started removing the internal uses of register r11
6883         to eventually allow the register allocator to manage it as an
6884         additional available register.
6885
6886 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6887
6888         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6889
6890 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6891
6892         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6893         specific trampolines as they are not performance critical as a jump
6894         target (maybe align as before only for AOT code?). This saves about
6895         200 KB of native code on x86 for monodevelop startup.
6896
6897 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6898
6899         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6900         monodevelop startup.
6901
6902 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6903
6904         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6905
6906         * mini-sparc.h mini-sparc.c: Implement IMT support.
6907
6908         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6909         its smaller and doesn't clobber sparc_g1.
6910
6911         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6912
6913 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6914
6915         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6916
6917 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6918
6919         * mini-ppc.c: implemented fast delegate invocation.
6920
6921 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6922
6923         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6924
6925 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6926
6927         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6928         code to the new style trampoline in preparation for IMT support.
6929
6930 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6931
6932         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6933         systems already. This also reduces the specific trampiline sizes and
6934         prepares for the use of r12 as the IMT identifier register.
6935
6936 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6937
6938         * mini-mips.h: endianess fix (simplified from a patch by
6939         Thomas Kunze <thommy@tabao.de>, bug #323737).
6940
6941 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6942
6943         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6944         to access ucontext fields and enable netbsd support
6945         (partially from Magnus Henoch <mange@freemail.hu>).
6946
6947 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6948
6949         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6950         use the preprocessor from the CPP env var if it is set.
6951
6952 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6953
6954         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6955         code, before interface_offset gets used.
6956
6957 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6958
6959         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6960         mono_class_setup_vtable () before accessing klass->vtable.
6961
6962 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6963
6964         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6965         hackish.
6966
6967 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6968
6969         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6970         IMT slots (this saves hundreds of KB of memory in programs like
6971         IronPython and Monodevelop).
6972
6973 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6974
6975         * mini.c: print the delegate counter.
6976
6977 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6978
6979         * mini-x86.c: make it easier to enable the debugging code for IMT
6980         slots.
6981
6982 2007-09-28  Martin Baulig  <martin@ximian.com>
6983
6984         * debug-debugger.h
6985         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6986         `mono_method_klass_offset' and `mono_method_token_offset'.
6987
6988 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6989
6990         * mini.c: First generics sharing implementation.  Can only share
6991         in very simple cases.  If sharing doesn't work it falls back to
6992         dedicated compilation.
6993
6994         * mini.h: Flag in MonoCompile to specify whether generic
6995         compilation is shared.  Flags enum for marking which generic inst
6996         of a context is used.  Prototypes for helper functions.
6997
6998         * generic-sharing.c: Helper functions for generic method sharing.
6999
7000         * optflags-def.h: Optimization flag (gshared) for enabling generic
7001         method sharing added.
7002
7003         * Makefile.am: generic-sharing.c added.
7004
7005 2007-09-19 Daniel Nauck <dna@mono-project.de>
7006
7007         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7008
7009 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
7010         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7011         fixes bug 325507.
7012
7013 2007-09-19  Martin Baulig  <martin@ximian.com>
7014
7015         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7016         mono_debug_cleanup() is now part of mono_cleanup().
7017
7018 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7019
7020         * driver.c (mono_main): Fix a warning.
7021
7022 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
7023
7024         * aot-compiler.c: Optimize various parts when processing large assemblies.
7025         Fixes ##325568.
7026
7027         * mini.c (mono_patch_info_hash): Improve hash function.
7028
7029 2007-09-14  Jonathan Chambers <joncham@gmail.com>
7030
7031         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7032         
7033         Code is contributed under MIT/X11 license.
7034
7035 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7036
7037         * mini.c (mini_init): Fix a leak.
7038
7039         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7040
7041 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7042
7043         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7044
7045 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7046
7047         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7048
7049 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7050
7051         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7052         variance tests.
7053
7054         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7055
7056         * mini.c (handle_alloc): Enable managed allocators in AOT code.
7057
7058         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7059
7060         * aot-runtime.c (decode_patch_info): Ditto.
7061
7062 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7063
7064         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7065         static case. Cache delegates in architecture specific code, 
7066         based on number of parameters.
7067         
7068         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7069         in architecture specific code, based on number of parameters.
7070         
7071         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
7072         caching happen in architecture specific code now.
7073         
7074         Code is contributed under MIT/X11 license.
7075
7076 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7077
7078         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7079         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7080         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7081
7082         Code is contributed under MIT/X11 license.
7083
7084 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7085         * mini.c: (mono_thread_abort) Fixed bug #82416.
7086
7087 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7088
7089         * mini.: hook the new managed GC allocation feature into the JIT.
7090
7091 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7092
7093         * mini.c: implementation for the new runtime tls opcode.
7094
7095 2007-09-11  Martin Baulig  <martin@ximian.com>
7096
7097         * debug-debugger.h
7098         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
7099         `mono_method_inflated_offset'.
7100
7101 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
7102
7103         * driver.c mini.h mini.c: Add a new devel command line option for injecting
7104         async exceptions into a method.
7105
7106         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
7107         purpose of testing whenever the unwinder works at every instruction.
7108
7109 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7110
7111         * mini.c: check accessibility of method used in ldftn (fixes
7112         bug #82635).
7113
7114 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
7115
7116         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
7117
7118         * inssel.brg: Fix a warning.
7119
7120 2007-09-03  Martin Baulig  <martin@ximian.com>
7121
7122         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
7123         now takes the `main_method' as argument.
7124
7125 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
7126
7127         * cpu-sparc.md (endfilter): Add missing src1:i argument.
7128
7129 2007-08-30  Jonathan Chambers <joncham@gmail.com>
7130
7131         * driver.c: include the cil-coff.h header on Windows.
7132         
7133         Code is contributed under MIT/X11 license.
7134
7135 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7136
7137         * mini.c, driver.c: don't include the cil-coff.h header.
7138
7139 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7140
7141         * mini.c: flag places that needs fixes fo soft-float support.
7142
7143 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
7144
7145         * mini.h, inssel-float.brg: fix soft-float constant loads on big
7146         endian systems (partially from Dean Jenkins, bug #81924).
7147
7148 2007-08-28  Mark Probst  <mark.probst@gmail.com>
7149
7150         * mini.c (check_linkdemand): Remove embedded reference object in
7151         call to LinkDemandSecurityException.
7152         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
7153         with an IntPtr instead of a reference object.
7154
7155 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
7156
7157         * mini.c (handle_initobj): Handle alignment properly.
7158
7159         * inssel.brg (mini_emit_memset): Ditto. 
7160
7161         * inssel.brg (mini_emit_memcpy): Ditto. 
7162
7163         * inssel-sparc.brg: Ditto.              
7164
7165         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
7166
7167 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
7168
7169         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
7170         exceptions raised in unmanaged code. Fixes part of #82594.
7171
7172 2007-08-24  Mark Probst  <mark.probst@gmail.com>
7173
7174         * mini.c (mono_method_to_ir), declsec.c
7175         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
7176
7177 2007-08-22  Martin Baulig  <martin@ximian.com>
7178
7179         * debug-mini.h
7180         (MonoDebuggerThreadInfo): New typedef.
7181         (mono_debugger_thread_table): New global variable.
7182         (mono_debugger_thread_created): New public function.
7183         (mono_debugger_thread_cleanup): New public function.
7184
7185         * debug-debugger.h
7186         (MonoDebuggerInfo):
7187         - removed `get_current_thread' and `lookup_assembly'.
7188         - removed `data_table'.
7189         - added `thread_table'.
7190
7191         * mini.c
7192         (mono_thread_start_cb): Call mono_debugger_thread_created().
7193         (mono_thread_attach_cb): Likewise.
7194         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
7195         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
7196         initial domain.
7197
7198         * driver.c (mono_main): Move mono_debug_init() up, before calling
7199         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
7200
7201 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7202
7203         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
7204         together when passing several arguments of type double (gives a small
7205         speedup and saves a few bytes of generated code).
7206
7207 2007-08-20  Jb Evain  <jbevain@novell.com>
7208
7209         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
7210
7211 2007-08-20  Jb Evain  <jbevain@novell.com>
7212
7213         * mini.c (mono_method_to_ir): throw MethodAccessException
7214         and FieldAccessException instead of InvalidProgramException.
7215
7216 2007-08-20  Mark Probst  <mark.probst@gmail.com>
7217
7218         * mini.c: CoreCLR security checks.
7219
7220         * mini.h: Removed MonoSecurityMode (moved to
7221         metadata/security-manager.h) and mono_security_mode global var
7222         (replaced by set/get functions in security-manager.h).
7223
7224         * driver.c: Added "core-clr-test" security mode for testing.  Used
7225         set-function for setting security mode.
7226
7227 2007-08-17  Mark Probst  <mark.probst@gmail.com>
7228
7229         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
7230         the new jit_info_table.
7231
7232         * driver.c: Test code for the new jit_info_table (enabled by the
7233         define MONO_JIT_INFO_TABLE_TEST).
7234
7235 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
7236
7237         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7238         detection of call <REG> instruction sequence. Fixes build on freebsd.
7239
7240 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * mini-exceptions.c: Fix a warning.
7243
7244 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
7245
7246         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
7247         stack overflow handling code on amd64 too.
7248
7249         * mini-exceptions.c (mono_setup_altstack): Make this use 
7250         mono_thread_get_stack_bounds ().
7251
7252         * mini-x86.h: Disable sigaltstack on solaris x86.
7253
7254 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
7255
7256         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
7257
7258 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
7259
7260         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
7261
7262 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
7263
7264         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
7265
7266         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
7267
7268 2007-08-03  Neale Ferguson <neale@sinenomine.net>
7269
7270         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
7271         due to alignment.
7272
7273 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7274
7275         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
7276         to be emitted (bug #82281).
7277
7278 2007-08-01  Martin Baulig  <martin@ximian.com>
7279
7280         Merged the `debugger-dublin' branch.
7281
7282         * debug-debugger.h (MonoDebuggerInfo):
7283         Removed the `old_*' compatibility entries.
7284         Added `debugger_version' and `data_table'.
7285         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
7286         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
7287
7288         * debug-mini.c
7289         (MiniDebugMethodBreakpointInfo): Add `address_list'.
7290         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
7291         instead of a `gconstpointer'.
7292         (mono_debugger_insert_method_breakpoint): Return a
7293         `MonoDebugMethodAddressList *'.
7294
7295 2007-06-28  Martin Baulig  <martin@ximian.com>
7296
7297         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7298
7299 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
7300
7301         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
7302         __builtin_frame_address () since it is broken on older gcc versions.
7303
7304 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7305
7306         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
7307         on the stack overflow handling and made the managed stack overflows
7308         catchable in most cases using soft guard pages.
7309         * exceptions-x86.c: added code to restore the protection in the soft
7310         guard pages at the end of exception handling.
7311
7312 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
7313
7314         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
7315
7316 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7317
7318         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
7319         exception handling.
7320
7321 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7322
7323         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
7324         signal handling support until it has been ported to the new mechanism.
7325         * mini.c: fixed stack overflow detection and use the new
7326         architecture code  to handle signals on the altstack.
7327
7328 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
7329
7330         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
7331         stack overflows on the alt stack.
7332
7333 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
7334
7335         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
7336         stack overflows on the alt stack.
7337
7338 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
7339
7340         * exceptions-ppc.c: cleanup preparing for altstack support.
7341
7342 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7343
7344         * exceptions-arm.c: cleanup preparing for altstack support.
7345
7346 2007-07-27  Mark Probst  <mark.probst@gmail.com>
7347
7348         * mini.c (print_jit_stats): Output hazard pointer stats.
7349
7350 2007-07-26  Mark Probst  <mark.probst@gmail.com>
7351
7352         * driver.c, mini.c: Replaced security mode flags with a single
7353         enum variable.
7354
7355 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7356
7357         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
7358
7359 2007-07-25  Mark Probst  <mark.probst@gmail.com>
7360
7361         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
7362         (which doesn't do anything yet) for activating Core CLR
7363         (Silverlight) security.
7364
7365 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
7366
7367         * mini-codegen.c: work around a possible gcc bug on arm.
7368
7369 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7370
7371         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
7372         message for platforms that don't support AOT compilation.
7373
7374 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7375
7376         * mini.h, mini.c, driver.c: temporary smcs hack.
7377
7378 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
7379
7380         * mini-arm.h, mini-arm.c: arm EABI fixes.
7381
7382 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
7383
7384         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
7385         case.
7386
7387         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
7388         trampolines taking a method argument.
7389
7390         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
7391
7392         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
7393         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
7394
7395         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
7396         JIT compilation throws an exception. Fixes #82050.
7397
7398 2007-07-19  Mark Probst  <mark.probst@gmail.com>
7399
7400         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
7401         with the MONO_EXCEPTION_ defines.
7402
7403 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
7404
7405         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
7406         #82117.
7407         
7408         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
7409         the cause of an assertion.
7410
7411 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
7412
7413         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
7414         removed.
7415
7416 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
7417
7418         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
7419         assert. Should fix #82103.
7420
7421 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
7422
7423         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
7424         here too. Fixes #82095.
7425
7426         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
7427         addresses.
7428
7429         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
7430
7431         * mini-amd64.h: Enable IMT for amd64.
7432         
7433         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
7434
7435 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
7436
7437         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
7438
7439 2007-07-12  Mark Probst  <mark.probst@gmail.com>
7440
7441         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
7442         as soon as check_linkdemand sets an exception_type.
7443
7444 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7445
7446         * mini-x86.c: fixed offsets for IMT call sequence.
7447         * mini-x86.h: enable IMT again.
7448
7449 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
7450
7451         * trace.c (mono_trace_enter_method): Decode MonoType too.
7452
7453         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
7454
7455         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
7456
7457         * mini-amd64.c: Add preliminary IMT implementation.
7458         
7459 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7460
7461         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
7462         understand the new IMT-base interface invocation (thanks to
7463         Daniel Nauck for the report and the remote debugging session).
7464
7465 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7466
7467         * mini-x86.c: size and speed optimizations for the IMT bsearch.
7468
7469 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
7470
7471         * Makefile.am (aotcheck): Make this actually use the AOTed code.
7472
7473 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
7474
7475         * mini-trampolines.c: implement AOT IMT support.
7476         * mini-x86.h: enable IMT support for wider testing.
7477
7478 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * inssel.brg (emit_imt_argument): Add aot support here.
7481
7482         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
7483
7484 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7485
7486         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
7487         of the IMT implementation, partially from massi, with my
7488         implementation of the bsearch sequence. Disabled by default until
7489         the AOT code is implemented.
7490
7491 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
7492
7493         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
7494
7495         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
7496
7497 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7498
7499         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
7500         arch-independent IMT JIT code from Massimiliano
7501         Mantione (massi@ximian.com) with small cleanups from me.
7502
7503 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7504
7505         * Makefile.am: fix svn invocation to get the svn revision to be
7506         independent of the local language (build fix).
7507
7508 2007-07-09  Mark Probst  <mark.probst@gmail.com>
7509
7510         * mini.c (inline_method): Reset cfg->exception_type if the
7511         inlining is aborted.  Fixes: 82049.
7512
7513 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7514
7515         * mini.c: remove assert from exception handling code when exception_ptr
7516         is not set.
7517
7518 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
7519
7520         * mini.c (mono_codegen): Add an assert.
7521
7522         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
7523         enter and leave code.
7524         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
7525
7526 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7527
7528         * mini-ppc.c: fixed memory corruption for localloc(0)
7529         (bug #81852).
7530
7531 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
7532         
7533         * mini.c: Fix warnings.
7534
7535 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7536
7537         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
7538         to emit better double->int conversions.
7539
7540 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7541
7542         * mini.c: the provided Min/Max optimizations are valid for unisgned
7543         ints.
7544
7545 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
7546
7547         * 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
7548
7549 2007-06-28  Miguel de Icaza  <miguel@novell.com>
7550
7551         * mini.c (mono_running_on_valgrind): Add support for reporting the
7552         method and  its boundaries to valgrind.
7553
7554 2007-06-28  Martin Baulig  <martin@ximian.com>
7555
7556         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7557
7558 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
7559
7560         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
7561
7562         * generic.2.cs: Add new test case.
7563
7564 2007-06-25  Martin Baulig  <martin@ximian.com>
7565
7566         Merged the `debugger-dublin' branch.
7567
7568         * debug-mini.c
7569         (mono_debugger_insert_method_breakpoint): New public method.
7570         (mono_debugger_remove_method_breakpoint): Likewise.
7571         (mono_debugger_check_breakpoints): New static method.
7572         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
7573
7574         * debug-debugger.h (MonoDebuggerInfo):
7575         Renamed (to keep backward compatibility in the vtable):
7576         `insert_breakpoint' -> `old_insert_breakpoint'.
7577         `remove_breakpoint' -> `old_remove_breakpoint'.
7578         `create_string' -> `old_create_string'.
7579         `lookup_class' -> `old_lookup_class'.
7580         `lookup_type' -> removed; changed into a dummy field.
7581         `lookup_assembly' -> `old_lookup_assembly'.
7582         Added (same functionality, but different signature):
7583         `create_string', `lookup_class', `lookup_assembly'
7584         Added new:
7585         `get_method_addr_or_bpt', `remove_method_breakpoint',
7586         `runtime_class_init'.
7587
7588         * debug-debugger.c: Merged the `debugger-dublin' branch.
7589
7590 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
7591
7592         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
7593         well.
7594         (peephole_pass): Likewise.
7595
7596 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7597
7598         * driver.c: hopefully make setaffinity work also for ancient
7599         versions of linux.
7600
7601 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
7602
7603         * driver.c : win32 build fix.
7604
7605 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7606
7607         * driver.c: check for the MONO_NO_SMP env var and bind to a single
7608         processor if it is set.
7609
7610 2007-06-21  Martin Baulig  <martin@ximian.com>
7611
7612         * debug-mini.h: New file.
7613
7614         * debug-mini.c
7615         (mono_debugger_insert_breakpoint_full): Moved here from
7616         ../metadata/mono-debug-debugger.c.
7617         (mono_debugger_remove_breakpoint): Likewise.
7618         (mono_debugger_breakpoint_callback): Likewise.
7619
7620 2007-06-15  Raja R Harinath  <rharinath@novell.com>
7621
7622         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7623         changes in MonoGenericClass.
7624
7625 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
7626
7627         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
7628
7629 2007-06-14  Raja R Harinath  <rharinath@novell.com>
7630
7631         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7632         removal of MonoGenericMethod.
7633
7634 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7635
7636         * mini-exceptions.c: hooks for the exception events profiling API.
7637
7638 2007-06-14  Randolph Chung  <tausq@debian.org>
7639
7640         * Makefile.ma: Add hppa target.
7641         * mini-arch.h: Include mini-hppa.h
7642         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
7643         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
7644         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7645
7646 2007-06-14  Randolph Chung  <tausq@debian.org>
7647
7648         * inssel.brg: Add rules for "chained" compare-branch operations so that
7649         a single compare op can affect multiple branches.  Adjust cost for
7650         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
7651         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
7652         cost for some rules so that they can more easily be overridden by
7653         per-arch rules (with fixes from lupus).
7654         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7655
7656 2007-06-13  Randolph Chung  <tausq@debian.org>
7657
7658         * mini-ops.h: Reorder branch ops so that they match the order of the
7659         corresponding CEE_* ops.  The code expects them this way.
7660         Add new ops for HPPA target.
7661         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7662
7663 2007-06-13  Randolph Chung  <tausq@debian.org>
7664
7665         * mini-exceptions.c: Handle cases where the stack grows towards
7666         larger addresses.
7667         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7668
7669 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7670
7671         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
7672         counter.
7673         * driver.c: explain where a non-matching corlib is found.
7674
7675 2007-06-13  Mark Probst  <mark.probst@gmail.com>
7676
7677         * mini.c (print_jit_stats): Output dynamic code allocation stats.
7678
7679 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
7680
7681         * mini-exceptions.c: Generate a method profile leave event during
7682         an exception to ensure that the profiler gets notified.
7683
7684 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
7685
7686         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
7687         branch.
7688
7689         * cpu-amd64.md: Add long_and/or/xor opcodes.
7690
7691 2007-06-06  Wade Berrier  <wberrier@novell.com>
7692
7693         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
7694         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
7695         length of instruction shr_imm (expected 8, got 10)
7696
7697 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
7698
7699         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
7700
7701 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7702
7703         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7704         MonoInternalHashTable again (fixed bug in the internal hash table
7705         code).
7706
7707 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7708
7709         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
7710         Have to figure out what makes it crash the SWF regression.
7711
7712 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
7713
7714         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
7715
7716 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7717
7718         * mini.c: optimize out the type check when storing null in a
7719         reference array.
7720
7721 2007-06-04  Mark Probst  <mark.probst@gmail.com>
7722
7723         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7724         MonoInternalHashTable.
7725
7726 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7727
7728         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
7729         signed integer methods.
7730
7731 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7732
7733         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
7734         permanently since the current approach doesn't work.
7735
7736 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7737
7738         * inssel.brg (stmt): Only call delegate->invoke_impl if 
7739         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7740
7741 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7742
7743         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7744         the sreg2==rdx case.
7745         
7746         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7747         account if it contains a rex prefix.
7748         (peephole_pass): Handle OP_FMOVE as well.
7749
7750 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7751
7752         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7753         as it causes regressions.
7754
7755 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
7756
7757         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7758         static case as well.
7759
7760         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7761
7762         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7763         (mono_arch_get_this_arg_from_call): Ditto.
7764
7765         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7766
7767         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7768         invoke_impl field.
7769
7770         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7771         (mono_arch_get_this_arg_from_call): Ditto.
7772
7773         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7774         
7775         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7776         try to create optimized invoke code and use that for further invocations. 
7777         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7778
7779         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7780
7781 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7782
7783         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7784         sealed classes or methods.
7785         *devirtualization.cs: tests for the new optimization
7786
7787 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7788
7789         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7790         by the update_volatile () function.
7791
7792 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7793
7794         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7795         require it.
7796
7797         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7798
7799 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7800
7801         * mini.c: Add configure checks for header files.
7802         * mini-x86.c: Add configure checks for header files.
7803         * trace.c: Add configure checks for header files.
7804         * aot-runtime.c: Add configure checks for header files.
7805         * aot-compiler.c: Add configure checks for header files.
7806         * driver.c: Add configure checks for header files.
7807         * mini-codegen.c: Add configure checks for header files.
7808         
7809         Code is contributed under MIT/X11 license.
7810
7811 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7812
7813         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7814         icompare_imm -128 + op_iclt. Fixes #81703.
7815
7816 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7817
7818         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7819
7820 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7821
7822         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7823         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7824         so that all isinst checks now use "interface_bitmap".
7825
7826 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7827
7828         * cpu-amd64.md (jmp): Fix a warning.
7829
7830         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7831
7832         * basic.cs: Add new regression test.
7833
7834         * basic.cs: Remove test which is now in basic-long.cs.
7835
7836         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7837
7838         * basic-long.cs: Add new test.
7839         
7840 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7843
7844 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7845
7846         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7847
7848         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7849         places.
7850         
7851         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7852         throwing code a bit.
7853
7854         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7855         the exception throwing code a bit.
7856
7857         * mini-x86.c (get_call_info): Allocate result from a mempool.
7858
7859 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7860
7861         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7862
7863         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7864
7865         * mini.h (MonoCompile): Add 'token_info_hash' field.
7866
7867         * mini.c: Save token->method associations during compilation so the AOT 
7868         compiler can use it.
7869         
7870         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7871         which reference generic classes and methods.
7872
7873 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7874
7875         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7876
7877         * aot-compiler.c (compile_method): Fix a typo in a comment.
7878
7879         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7880
7881         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7882         everything generic.
7883
7884         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7885
7886 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7887
7888         * mini.h (MonoCompile): Add 'args' field.
7889
7890         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7891         into cfg->args.
7892
7893         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7894
7895 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7896
7897         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7898
7899         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7900
7901         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7902         opcodes for some opcodes.
7903
7904         * mini.h *.brg *.c: Use the new opcodes.
7905
7906 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7907
7908         * mini.h: Bumped aot revision.
7909
7910         * inssel.brg: modified code generation of type checks for interfaces
7911         to use the new "MonoClass.interface_bitmap" instead of the old
7912         "MonoClass.interface_offsets".
7913
7914 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7915
7916         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7917
7918 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7919
7920         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7921         64 bit platforms.
7922
7923 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7924
7925         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7926
7927 2007-04-27  Wade Berrier  <wberrier@novell.com>
7928
7929         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7930         mini.h) to fix build.
7931
7932 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7933
7934         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7935         
7936         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7937         causes the corlib unit tests to fail.
7938
7939 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7940
7941         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7942
7943         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7944
7945         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7946         opcodes to the comparison relations.
7947
7948         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7949         opcodes to their types.
7950         
7951         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7952
7953         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7954         it in cfg->arch.cinfo.
7955
7956         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7957
7958         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7959         cfg->cil_offset_to_bb.
7960
7961 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7962
7963         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7964         created becase of initlocals.
7965
7966 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7967
7968         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7969         Sergey Tikhonov <tsv@solvo.ru>.
7970
7971 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7972
7973         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7974
7975 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7976
7977         * cpu-s390.md (break): Correct the length of break instruction.
7978
7979 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7980
7981         * mini.c: fix a couple of soft-float issues and comments.
7982
7983 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7984
7985         * trace.c (is_filenamechar): - is also a filename char.
7986
7987 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7988
7989         * mini-s390.c: Correct checking for enum type in return value processing.
7990
7991 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7992
7993         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7994         (version.h): Makefile is in the build directory.
7995
7996 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7997
7998         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7999
8000 2007-04-11  Martin Baulig  <martin@ximian.com>
8001
8002         * mini.c (can_access_member): Fix handling of generic classes;
8003         fixes #81259.
8004
8005 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
8006
8007         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8008
8009 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
8010
8011         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8012
8013 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8014
8015         * mini-codegen.c: make sure the right spill amount is
8016         used for fp or integer registers (fixes the float_sub_spill() on ppc).
8017
8018 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8019
8020         * mini-ppc.c: fixes for the fp_branch_nan test.
8021
8022 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
8023
8024         * basic.cs: Comment out new test which still fails on ia64.
8025
8026 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8027
8028         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8029
8030 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8031
8032         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8033
8034 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
8035
8036         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8037         on 64 bit machines. Fixes part of #80738.
8038
8039         * basic.cs: Add regression test.
8040
8041 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8042
8043         * inssel.brg basic.cs: Revert previous change to fix build.
8044
8045         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8046         platforms.
8047         
8048         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8049
8050         * basic.cs: Add new regression test.
8051
8052 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8053
8054         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8055         many arguments.
8056
8057 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8058
8059         * cpu-s390x.md: Correct length of break instruction.
8060
8061 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8062
8063         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8064         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8065
8066 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
8067
8068         * *.c: Begin WIN64 port.
8069         * mini.c:  Use correct register in profiler.
8070         * mini-amd64.c: No inline assembly on Win64.
8071         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8072         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8073         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8074         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8075         mono_arch_ip_from_context for Win64.
8076         
8077         Contributed under MIT/X11 license.
8078
8079 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
8080
8081         * exceptions-amd64.c (seh_handler): Ditto.
8082
8083         * exceptions-x86.c (seh_handler): Fix a memory leak.
8084
8085 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8086
8087         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8088         mini-s390x.c: fixed peephole optimizations to deal
8089         correctly with 1 and 2 byte reload avoidance.
8090
8091 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8092
8093         * cpu-s390.md, cpu-s390x.md: update localloc length.
8094
8095 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8096
8097         * cpu-g4.md: added missing descriptions.
8098
8099 2007-03-14  Miguel de Icaza  <miguel@novell.com>
8100
8101         *  Makefile.am: Add support so the tail tests are not executed on
8102         PowerPC as that is a known limitation of the PowerPC port.
8103
8104 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
8105
8106         * runmdesc.bat:  Move to msvc directory.
8107         
8108 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
8109
8110         * runmdesc.bat:  Run executable that was produced by the current
8111         target and sent via an argument.
8112         
8113 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
8114
8115         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
8116         #81102.
8117
8118         * generics.2.cs: Add regression test.
8119
8120 2007-03-09  Wade berrier  <wberrier@novell.com>
8121
8122         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
8123
8124 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
8125
8126         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
8127         AOT code depends on this.
8128
8129 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
8130
8131         * mini.c: more precise tracking of types in the eval stack
8132         (part of fix for bug #81044).
8133
8134 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
8135
8136         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
8137
8138         * aot-compiler.c (encode_patch): Remove an obsolete comment.
8139
8140 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
8141
8142         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
8143
8144         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
8145
8146 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
8147
8148         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
8149         a pointer on 64 bit systems. Fixes #80190.
8150
8151         * iltests.il: Add new regression test.
8152
8153 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8154
8155         * mini.c: inline a constant for Environment.IsRunningOnWindows.
8156
8157 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
8158
8159         * trace.c: Remove an erroneous alignemnt check when tracing.
8160           Fixes --trace on OSX86.
8161
8162 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
8163
8164         * mini-$(arch).h: initialize SP in context for all the archs.
8165
8166 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
8167
8168         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
8169         regressions in the thread tests.
8170
8171 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
8172
8173         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
8174         - fixed implementation of LOCALLOC opcode
8175         - implemented non-un compare for floats
8176         - code cleanup
8177         - implementation of FDIV and CKFINITE opcodes
8178         - fixes for latest mono updates
8179         - additional arch opcodes
8180
8181 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8182
8183         * Makefile.am: simplify and merge rules for cross-compilation.
8184
8185 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
8186
8187         * local-propagation.c: Actually *apply* the fix for bug 80591...
8188
8189 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8190
8191         * mini-exceptions.c: backuot part of the last change
8192         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
8193
8194 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
8195         * inssel.brg: Fix bug 59286.
8196
8197
8198 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
8199
8200         * mini-exceptions.c: patch from Zoltan to correctly check for
8201         stack boundaries (using the stack register, not the frame register),
8202         fixes bugs #80724, #79717.
8203
8204 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
8205
8206         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
8207         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
8208
8209         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
8210         presence of frame pointer elimination.
8211
8212 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
8213         
8214         * mini-x86.h: NetBSD UCONTEX_REG defines.
8215
8216 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
8217
8218         * inssel-amd64.brg: Fix amd64 build.
8219
8220 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
8221
8222         * mini.h: remove extern to workaround what looks likes gcc bug 26905
8223         on amd64.
8224
8225 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
8226
8227         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
8228         ends.
8229
8230         * mini-<ARCH>.c: Use mono_is_regsize_var ().
8231
8232 2007-01-30 Mark Mason <mason@broadcom.com>
8233
8234            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
8235            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
8236            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
8237            beginning support for CEE_JMP [not quite working yet]
8238            * tramp-mips.c: LMF handling now works
8239         
8240 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
8241
8242         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
8243
8244         * mini.h (NULLIFY_INS): New macro.
8245
8246 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8247
8248         * mini.c: statistical profiler fix for windows, patch
8249         from Tor Lillqvist (tml@novell.com).
8250
8251 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
8252         * local-propagation.c: Fix bug 80591.
8253
8254 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
8255
8256         * Makefile.am: put back the --export-dynamic option as with
8257         the previous gmodule flags (thanks to Robert Jordan).
8258
8259 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
8260
8261         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
8262
8263         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
8264         simplify and speed up the local register allocator. Also rename some fields
8265         like iassign->vassign.
8266         
8267         * regalloc.c: Remove some functions which are no longer used since their
8268         inlined version is in mini-codegen.c.
8269         
8270         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
8271
8272         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
8273
8274 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
8275
8276         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
8277         narrowing. Fixes #80622.
8278
8279         * iltests.il: Add new regresssion test. 
8280
8281 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
8282
8283         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
8284         debug-debugger.c, debug-debugger.h: warning fixes.
8285         * driver.c: updated copyright year and made it fit in one line.
8286
8287 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
8288
8289         * aot-runtime.c: updated to use mono-dl instead of gmodule.
8290
8291 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
8292
8293         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
8294
8295         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
8296
8297         * iltests.il: Add new test for bug #80507.
8298
8299 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8300
8301         * mini-arm.h: use soft-float also on vfp for now.
8302
8303 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
8304
8305         * mini.c: fix some more soft-float issues.
8306
8307 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
8308
8309         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
8310
8311 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
8312         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
8313         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
8314         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
8315
8316 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
8317
8318         * mini-arm.c: typo fix.
8319
8320 2007-01-23  Neale Ferguson <neale@sinenomine.net>
8321
8322         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
8323
8324 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
8325
8326         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
8327         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
8328
8329         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
8330
8331         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
8332
8333         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
8334         
8335         * inssel.brg: Fix a warning.
8336
8337         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
8338
8339         * abcremoval.c ssa.c ssapre.c: Update after this change.
8340         
8341         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
8342
8343         * dominators.c (df_set): Use mono_bitset_union_fast.    
8344
8345 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
8346
8347         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
8348         mini-codegen.c: reduce relocations and memory usage for the cpu
8349         description.
8350
8351 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
8352
8353         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
8354
8355         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
8356         to reduce their size.
8357
8358 2007-01-19 Mark Mason <mason@broadcom.com>
8359
8360         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
8361         * mini-mips.c: more configuration macros, support long conditional branches, additional
8362         asserts, fix epilog instrumentation.
8363         * mini-mips.h: use standard stack walk
8364         * cpu-mips.md: increase size of div, rem and conditional branches
8365         
8366 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
8367
8368         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
8369         to cpu spec data.
8370
8371 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
8372
8373         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
8374         (compile_method): Ditto.
8375
8376         * aot-runtime.c (decode_klass_info): Ditto.
8377
8378         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
8379         needed by the code generated by inssel.brg. Also fix a warning.
8380
8381 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
8382
8383         * mini.c: deal with enums that become genericinsts by
8384         being nested in a generic class (bug #79956).
8385
8386 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
8387
8388         * mini.c: match the generic definition to check for
8389         private access with generic types (bug #78431).
8390
8391 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
8392
8393         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
8394         to make life easier for people cross-compiling that insist on not
8395         using scratchbox.
8396
8397 2007-01-17 Mark Mason <mason@broadcom.com>
8398
8399         * inssel-long.brg: patch to deal with mips missing flags
8400         * inssel-long32-mips.brg: implement overflow checks
8401         * insset-mips.brg: implement overflow checks
8402         * mini-mips.h: implement conditional exception handling
8403         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
8404           Remove unused code, minor cleanups.
8405         * exceptions-mips.c: minor cleanups
8406         * mini-ops.h: add mips conditional exception ops
8407         * cpu-mips.md: add mips conditional exception ops
8408
8409         
8410 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
8411
8412         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
8413         to deal with mips missing of flags.
8414
8415 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
8416
8417         * exceptions-ppc.c: execute fault handlers.
8418
8419 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
8420
8421         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
8422
8423 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8424
8425         * mini.c: handle also floating point values in initialize_array.
8426
8427 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
8428
8429         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
8430         array initialization and make it conditional on the intrins option.
8431
8432 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
8433
8434         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
8435         relocations and put the patch info names close to the enum definition.
8436
8437 2007-01-15 Mark Mason <mason@broadcom.com>
8438
8439         * basic.cs, exceptions.cs: break up large tests to increase debugability.
8440
8441 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
8442
8443         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
8444
8445 2007-01-12  Raja R Harinath  <rharinath@novell.com>
8446
8447         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
8448
8449 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
8450
8451         * Makefile.am: distribute the mips sources.
8452
8453 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8454
8455         * mini-codegen.h: handle bug #80489 here, by excluding ecx
8456         directly.
8457
8458 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
8459
8460         * cpu-x86.md: back out for now as this triggers other regressions.
8461
8462 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8463
8464         * cpu-x86.md: force src1 and dest regpair for long shift instructions
8465         to eax:edx, so ecx can't get allocated to them (bug #80489).
8466
8467 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
8468
8469         * mini.c, mini-exceptions.c: enabled running fault handlers
8470         (bug #80469).
8471
8472 2007-01-03  Miguel de Icaza  <miguel@novell.com>
8473
8474         * driver.c: If nothing fail, do not use the string "failed",
8475         because it makes it very annoying to view test result logs on the
8476         web. 
8477
8478 2006-12-30  Miguel de Icaza  <miguel@novell.com>
8479
8480         * debug-debugger.c (mono_debugger_main): Rename "main" to
8481         "main_method" to prevent a warning.
8482
8483         Remove a warning for unused field.
8484
8485 2006-12-28  Martin Baulig  <martin@ximian.com>
8486
8487         * debug-debugger.c
8488         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
8489
8490 2006-12-22  Martin Baulig  <martin@ximian.com>
8491
8492         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
8493         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
8494         seperate `.mdb_debug_info' section, so we can access it from the
8495         debugger even if the binary is stripped.
8496
8497         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
8498         from the `.mdb_debug_info' here to prevent the linker from
8499         removing that section.
8500
8501         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
8502         mdb-debug-info64.s.
8503
8504 2006-12-19  Robert Jordan  <robertj@gmx.net>
8505
8506         * mini-x86: enable the code to return small structures in
8507         registers for FreeBSD as well. Fixes bug #80278.
8508         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
8509
8510 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8511
8512         * mini-x86.c: align the stack when calling the profiler
8513         function instrumenting the prolog (on OSX).
8514
8515 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
8516
8517         * mini.c: emit a break opcode where Debugger.Break () is called.
8518
8519 2006-12-13  Miguel de Icaza  <miguel@novell.com>
8520
8521         * mini.c (mono_method_to_ir): Provide useful information on this
8522         assert, to prevent others from debugging like I did.
8523
8524 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8525
8526         * mini.c: enable code which was incorrectly commented
8527         (bug #80235).
8528
8529 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8530
8531         * mini-x86.c: enable on OSX, too, the code to return small
8532         structures in registers.
8533
8534 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8535
8536         * mini-x86.c: remove the use of the dynamic code manager here, too.
8537
8538 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8539
8540         * mini.h, debug-debugger.c, tramp-*.c: fixed 
8541         mono_debugger_create_notification_function() to use
8542         mono_global_codeman_reserve () instead of a dynamic code manager.
8543
8544 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8545
8546         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
8547         ves_array_element_address() jit icall and use a generated
8548         managed method instead (which is about 4 times faster for a rank 3
8549         array access).
8550
8551 2006-11-29  Mark Mason  <mason@broadcom.com>
8552
8553         * basic-calls.cs: additional tests for passing
8554         structures as function arguments.
8555
8556 2006-11-29  Mark Mason  <mason@broadcom.com>
8557
8558         * mini-mips.h: disable custom exception handling
8559         * mini-mips.c: throw/rethrow should use jalr to call
8560         exception stubs.  Fixed bug with passing structures
8561         by value. More support for tracing floating point
8562         functions.
8563
8564 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8565
8566         * mini.c: fixed typo in the soft-float ldind.r4 handling
8567         (bug #80086).
8568
8569 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8570
8571         * mini.c, mini.h, driver.c: added --runtime command line
8572         option to select a different runtime than the autodetected one.
8573         * jit.h: added API for embedders to initialize with a specific
8574         runtime version.
8575
8576 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8577
8578         * mini.c: handle also boxing of r4 values (bug #80024).
8579
8580 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8581
8582         * mini-ppc.c: force indirect calls until we reserve
8583         enough address space for all the generated code.
8584
8585 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
8586
8587         * exceptions-arm.c: workaround bugs in the libc definition
8588         of struct ucontext.
8589
8590 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8591
8592         * inssel.brg: fixes from me and Mark Mason.
8593
8594 2006-11-23  Dick Porter  <dick@ximian.com>
8595
8596         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
8597         semaphore display now we've fixed the initial value
8598
8599 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8600
8601         * inssel.brg: partially revert the last change to fix the build.
8602
8603 2006-11-21  Mark Mason  <mason@broadcom.com>
8604
8605         * inssel.brg: Add and use compare-and-branch macros to support
8606         architectures that do not have condition code registers (ie. MIPS).
8607         * *-mips.{c,brg,md}: Fix copyright statements
8608
8609 2006-11-20  Mark Mason  <mason@broadcom.com>
8610
8611         * Makefile.am: remove mini-codegen.c from list of MIPS sources
8612         * mini.c: Allow GET_CONTEXT to be specified by the arch port
8613         * mini.h: Added declaration for mono_print_ins()
8614         * mini-codegen.c: added ins_spec initializer for MIPS
8615         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
8616         vreg to be virtual and hreg to be non-virtual.
8617         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
8618         is not yet working/implemented correctly.
8619         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
8620         non-static, fixup calls to print_ins() from other parts in the file.
8621
8622 2006-11-20  Mark Mason  <mason@broadcom.com>
8623
8624         * basic-calls.cs: added tests for passing structures as arguments
8625         to calls.
8626
8627 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8628
8629         * inssel-long32.brg: optimize signed division by power of two.
8630
8631 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
8632
8633         * mini-arm.c: added support for interworking with thumb code
8634         (mono must be still be built using the ARM instruction encoding).
8635
8636 2006-11-19  Miguel de Icaza  <miguel@novell.com>
8637
8638         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
8639         verifier has different rules for it.   Fixes a few verifier issues
8640         in the test suite.
8641
8642         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
8643         at the end, so people know what happened.
8644
8645 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8646
8647         * brach-opts.c: in optimize_exception_target() make sure we
8648         are in a catch clause (fixes bug #79871).
8649
8650 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8651
8652         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
8653         more soft-float support fixes.
8654
8655 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
8656
8657         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
8658         that are passed half on the stack and half in registers.
8659
8660 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8661
8662         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
8663         more mips integration work from Mark E Mason 
8664         <mark.e.mason@broadcom.com>.
8665
8666 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8667
8668         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
8669         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
8670         tramp-mips.c: added sources for the mips port, not
8671         integrated in the build yet. Contributed by
8672         Mark E Mason <mark.e.mason@broadcom.com>.
8673
8674 2006-11-14  Neale Ferguson <neale@sinenomine.net>
8675
8676         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
8677
8678 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8679
8680         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
8681         put the soft-float rules in its own file since it seems to
8682         break s390 compilation.
8683
8684 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8685
8686         * mini-arm.c: fixed wrnings.
8687
8688 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
8689
8690         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
8691         inssel-arm.brg: ARM support for soft-float.
8692
8693 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8694
8695         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
8696         loads and stores of 32 bit fp values.
8697
8698 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
8699
8700         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
8701
8702         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
8703         works. Fixes #79852 and #79463.
8704
8705 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8706
8707         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
8708         more soft-float support WIP and fixes.
8709
8710 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
8711
8712         * mini-arm.c: some VFP updates.
8713
8714 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8715
8716         * mini-exceptions.c: 0 is a valid local var offset in some
8717         architectures, don't assert (bug #78508).
8718
8719 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
8720
8721         * exceptions-arm.c: fixed off by one error in stack walk code.
8722
8723 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
8724
8725         * mini.h, mini.c: more precise tracking of type load exceptions.
8726
8727 2006-11-03  Robert Jordan  <robertj@gmx.net>
8728
8729         * Makefile.am: [WIN32] Add monow.exe target.
8730         * driver.c: [WIN32] Don't detach the console when debugging.
8731         Fixes bug #79797.
8732         
8733 2006-10-30  Miguel de Icaza  <miguel@novell.com>
8734
8735         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8736
8737 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
8738
8739         * aot-compiler.c (emit_method_info): Add a case missed earlier.
8740
8741         * driver.c (mini_regression): Fix --regression with AOT.
8742
8743         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8744
8745 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
8746
8747         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8748
8749         * mini-sparc.h: Don't use sigaction on sparc/linux.
8750
8751         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8752
8753         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8754
8755         * mini-exceptions.c: Add proper include files for getpid ().
8756
8757 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
8758
8759         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8760         address instead of a MonoJitInfo* to avoid decoding the exception info for the
8761         method.
8762
8763         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8764         name cache to reduce its size.
8765
8766         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8767
8768 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
8769
8770         * mini-x86.c: Save/restore the current LMF structure more efficiently using
8771         the mono_lmf TLS variable.
8772
8773         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
8774         trampoline lmf frames.  
8775
8776         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8777
8778 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8779
8780         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8781         the mono_lmf TLS variable.
8782
8783         * mini-exceptions.c: Access the LMF structure through accessors.
8784
8785         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8786         variable instead of in jit_tls->lmf.
8787
8788         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8789         
8790         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8791         trampoline lmf frames.
8792
8793         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8794
8795 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8796
8797        * mini.c trace.c mini-x86.c: Revert these too.
8798         
8799        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8800        signature change.
8801
8802 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8803
8804         * genmdesc.c: removed now dead code.
8805
8806 2006-10-09  Robert Jordan <robertj@gmx.net>
8807
8808         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8809
8810 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8811
8812         * mini.h: do not leave gaps in the opcode values.
8813
8814 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8815
8816         * jit-icalls.h: flag functions as internal here, too.
8817
8818 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8819
8820         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8821         functions with the internal attribute.
8822
8823 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8824
8825         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8826
8827 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8828
8829         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8830         for soft-float.
8831
8832 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8833
8834         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8835         tail calls as on other platforms.
8836
8837         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8838
8839         * iltests.il: Add a few tailcall tests.
8840
8841 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8842
8843         * driver.c: fix loop for old compilers (bug #79521).
8844
8845 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8846
8847         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8848
8849         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8850
8851         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8852         metadata without any code.
8853
8854         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8855         more precise debugging information using gdb.
8856
8857 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8858
8859         * inssel-ia64.brg: Make the helper methods static.
8860
8861 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8862
8863         * inssel-x86.brg: make the helper methods static.
8864
8865 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8866
8867         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8868
8869 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8870
8871         * mini.c: updates for monoburg changes.
8872         * inssel.brg: make a few helper functions static as they should.
8873
8874 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8875
8876         * Makefile.am: Move mini-codegen.c to common_sources.
8877
8878 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8879
8880         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8881         instructions.
8882         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8883         mini-ppc.h: port to use the common local register allocator.
8884
8885 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8886
8887         * mini.h: Remove the comment too then.
8888
8889 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8890
8891         * mini.h: put back backend.data which is to be used shortly and
8892         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8893         pointers on 4 byte boundaries it'd have much bigger issues running
8894         and you can ifdef it out anyway.
8895
8896 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8897
8898         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8899         MonoInst size by 4 bytes on 64 bit machines.
8900
8901 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8902
8903         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8904         replacement with more meaningful field names. Arch maintainers, please
8905         check the assigned names are good enough for your arch.
8906
8907 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8908
8909         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8910         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8911
8912 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8913
8914         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8915         relocations and memory requirements, put the optimization flags
8916         definitions in their own file.
8917
8918 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8919
8920         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8921
8922         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8923
8924 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8925
8926         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8927
8928 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8929
8930         * inssel.brg: use the correct function to get the size of an item
8931         in an array, given an element class.
8932         * aot-compiler.c: do not access class->class_size directly.
8933
8934 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8935
8936         * mini.h, debug-mini.c: added a debugging function to print
8937         info about local variables and arguments in a jitted method.
8938
8939 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8940
8941         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8942
8943         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8944
8945 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8946
8947         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8948         inner and outer loops when passing vtypes.
8949
8950 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8951
8952         * mini-ppc.c: take into account the cpu errata for cache flushing
8953         which caused some random errors (bug #79381).
8954
8955 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8956
8957         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8958         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8959
8960 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8961
8962         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8963         loaded.
8964
8965         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8966         freebsd ports tree.
8967
8968         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8969         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8970
8971         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8972         displacement.
8973
8974 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8975
8976         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8977
8978 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8979
8980         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8981         macro does not have to be changed during debugging.
8982
8983         * 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>.
8984
8985         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8986
8987         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8988         
8989         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8990         MONO_ARCH_NO_EMULATE_MUL is defined.
8991
8992         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8993
8994         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8995
8996         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8997
8998         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8999         
9000 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
9001
9002         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9003         stuff to mini-exceptions.c where it is used.
9004
9005         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9006         setup code, the real one is in mini-exceptions.c.
9007
9008         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9009         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9010         some changes from the freebsd ports tree.
9011
9012         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9013         constants.
9014         
9015         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9016
9017 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9018
9019         * mini.c: on Linux, check for /proc to be mounted
9020         (bug# 79351, novell bug#201204).
9021
9022 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9023
9024         * mini.c: handle cases where pthread_attr_getstack() behaves
9025         incorrectly (bug #78096).
9026
9027 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9028
9029         * mini-arm.c: support larger stack frames (bug #79272).
9030
9031 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
9032
9033         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9034
9035         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
9036         tokens.
9037
9038         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
9039         mono_class_from_name () to find a class from its name.
9040
9041         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9042
9043 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
9044
9045         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9046
9047 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
9048
9049         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9050
9051 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
9052
9053         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9054         callinfo->trampoline.
9055
9056         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9057         fixes #79271.
9058         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9059         future.
9060
9061 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
9062
9063         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9064
9065 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
9066
9067         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9068         stats.method_trampolines, it is already done by the generic trampoline code.
9069
9070         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9071         
9072 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
9073
9074         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9075
9076         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9077
9078         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9079
9080         * mini.c (print_jit_stats): Print mscorlib mempool size too.
9081         
9082         * mini.c (print_jit_stats): Print new stats.
9083
9084         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9085
9086 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
9087
9088         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9089         Address on two dimensional arrays. Fixes #78729.
9090
9091         * mini.h (MonoCompile): Add a 'skip_visibility' field.
9092
9093         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9094         a method.
9095
9096         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
9097
9098         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
9099         #79130.
9100         
9101         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
9102         a race condition.
9103         (mini_get_ldelema_ins): Ditto.
9104
9105 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
9106
9107         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
9108         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
9109         Fixes #79213.
9110
9111 2006-08-29 Neale Ferguson <neale@sinenomine.net>
9112
9113         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
9114         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
9115
9116         * exceptions-s390x.c: Cosmetic change.
9117
9118         * tramp-s390.c: Fix warning.
9119
9120         * cpu-s390.md: Correct length of mul_imm.
9121
9122 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
9123
9124         * aot-compiler.c: added binary writer with ELF backend
9125         implementation (only on Linux/x86 for now).
9126
9127 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
9128
9129         * Makefile.am: Don't run net 2.0 AOT tests.
9130
9131         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
9132         (mono_compile_assembly): Skip net 2.0 assemblies as well.
9133
9134         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
9135
9136 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9137
9138         * aot-compiler.c: simplified and refactored the asm-writing code
9139         to allow different backends.
9140
9141 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
9142
9143         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
9144
9145         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
9146         little. Share patches of type TYPE_FROM_HANDLE as well.
9147
9148         * mini.c (mono_patch_info_equal): New helper function.
9149         (mono_patch_info_hash): Ditto.
9150
9151         * aot-compiler.c (emit_method_code): Fix s390 build.
9152
9153         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
9154         is not handled because it is stored as a flag and not as a type ctor. Fixes
9155         #79016.
9156
9157 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
9158
9159         * aot-compiler.c: Fix computation of GOT slot statistics.
9160         
9161         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
9162         Also remove support for not PIC AOT.
9163
9164         * mini.h: Bump AOT file format version.
9165
9166         * objects.cs: Add a test for #78990.
9167
9168         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
9169         (peter.dettman@iinet.net.au). Fixes #79087.
9170
9171         * basic-long.cs: Add a test for the above.
9172
9173 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
9174
9175         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
9176         
9177         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
9178         code somewhat.
9179
9180 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
9181
9182         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
9183         exceptions.
9184
9185 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
9186
9187         * mini.c: Don't verify COM proxy invoke calls
9188         
9189
9190 2006-08-10  Dick Porter  <dick@ximian.com>
9191
9192         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
9193         which process is holding semaphores locked.
9194
9195 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
9196
9197         * mini-ia64.c mini-amd64.c: Fix #79027.
9198
9199         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
9200
9201         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
9202
9203         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
9204         implicit arguments in a vararg call. Fixes #79027.
9205
9206 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
9207
9208         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
9209         (mono_get_array_new_va_signature): Ditto.
9210
9211 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
9212
9213         * aot-runtime.c: Call init_plt lazily.
9214
9215         * inssel-long.brg: Fix unsigned long->int conversion.
9216
9217         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
9218
9219         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
9220         that most data is now in the .rss/.data section.
9221
9222 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
9223
9224         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
9225
9226         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
9227
9228         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
9229
9230         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
9231
9232         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
9233         virtual call. Fixes #79010.
9234
9235         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
9236         and use the result as the this argument in the real call.
9237
9238         * generics.2.cs: Add a new test for #79010.
9239         
9240 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
9241
9242         * mini-x86.c: Fix a warning.
9243
9244         * aot-compiler.c: Add a bunch of statistics.
9245
9246         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
9247
9248 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
9249
9250         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
9251
9252 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
9253
9254         * 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>.
9255
9256 2006-07-13  Miguel de Icaza  <miguel@novell.com>
9257
9258         * mini.c (mono_method_to_ir): Obtain the original method in the
9259         CIL stream and use this to perform validation.
9260
9261         Fixed: #78816
9262
9263 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
9264
9265         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
9266         (mono_arch_call_opcode): Ditto.
9267
9268         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
9269         #78826.
9270
9271         * mini.c (mono_patch_info_dup_mp): New helper function.
9272         
9273         * aot-compiler.c (compile_method): Fix some of the memory allocated during
9274         compilation. Fixes #78827.
9275
9276 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
9277
9278         * declsec.c: Use original security informations for
9279           MONO_WRAPPER_MANAGED_TO_MANAGED.
9280
9281 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
9282
9283         * mini.c: Allow Com Interop methods/classes and
9284         don't verify COM wrapper calls
9285         
9286
9287 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
9288
9289         * inssel-long32.brg: Fix long->i4 checked conversion.
9290
9291         * exceptions.cs: Add a test for the above.
9292
9293 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
9294
9295         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
9296
9297         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
9298         leaks.
9299
9300         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
9301         #78775.
9302
9303 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
9304
9305         * mini.c: Fix solaris/x86 exception handling.
9306
9307         * Makefile.am: Get rid of $(ICU_LIBS).
9308
9309 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
9310
9311         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
9312         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
9313         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
9314
9315         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
9316
9317         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
9318         this function causes a SIGSEGV.
9319
9320 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
9321
9322         * mini.c: Remove unused solaris/x86 includes.
9323
9324 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
9325
9326         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
9327
9328 2006-06-20  Jb Evain  <jbevain@gmail.com>
9329
9330         * cpu-g4.md: fix max length of start_handler instruction.
9331
9332 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
9333         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
9334
9335 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
9336         * ssa.c: Fixed bug 78653 for SSA based deadce.
9337         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
9338         MonoInst.flags, used in SSA based deadce.
9339         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
9340         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
9341
9342 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
9343
9344         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
9345         it can end up using non executable memory on ppc64 systems
9346         running ppc32 userspace (fix from Johannes Berg).
9347
9348 2006-06-14  Dick Porter  <dick@ximian.com>
9349
9350         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
9351         4.1.1
9352
9353 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
9354         * mini.c: Made so that inline is locally disabled if it would
9355         trigger a .cctor, because too many apps depend on this behavior
9356         (which seems to be also the one of the MS CLR).
9357
9358 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
9359
9360         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
9361         No idea why this worked before.
9362
9363         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
9364         which branch to outer exception clauses since they could skip the
9365         inner finally clauses. Fixes #78633.
9366
9367         * exceptions.cs: Add a test for the above.
9368
9369         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
9370         Fixes #78629.
9371
9372         * iltests.il: Add a test for the above.
9373
9374 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
9375
9376         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
9377         after the end of a try bblock, to prevent asserts in mini_method_compile ().
9378
9379         * iltests.il: Add a test for the above.
9380
9381 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
9382
9383         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
9384         
9385         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
9386         methods as instrinsics.
9387
9388 2006-06-09  Wade Berrier <wberrier@novell.com>
9389
9390         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
9391         (simple-cee-ops.h ssapre-mini-ops.h)
9392
9393 2006-06-09  Neale Ferguson <neale@sinenomine.net>
9394
9395         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
9396         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
9397         instruction).
9398         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
9399         * cpu-s390x.md: Fix max. length values for a couple of instructions.
9400
9401 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
9402
9403         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
9404
9405 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
9406
9407         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
9408         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
9409         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
9410         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
9411         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
9412         of opcodes, so that bug 78549 should not happen again.
9413         * ssapre.c: Updated to use the renamed files.
9414
9415 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
9416
9417         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
9418         in OP_ATOMIC_EXCHANGE_I4.
9419
9420 2006-06-07  Wade Berrier <wberrier@novell.com>
9421
9422         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
9423         in mono_debugger_create_notification_function)
9424
9425 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
9426
9427         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
9428         
9429         * mini.c (type_from_stack_type): Disable some changes which do not
9430         seem to work.
9431
9432         * driver.c: Reenable opts.
9433
9434         * mini.h (MonoStackSlot): New structure to keep track of the verification state
9435         of the evaluation stack.
9436         
9437         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
9438         evaluation stack trace at entry to the bblock.
9439
9440         * mini.c (merge_stacks): New function to perform verification of stack merges.
9441         Turned off by default.
9442
9443         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
9444         STACK_MP.
9445         
9446 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
9447
9448         * local-propagation.c: Fixed bug 78549.
9449
9450 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
9451
9452         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
9453
9454 2006-06-02  Miguel de Icaza  <miguel@novell.com>
9455
9456         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
9457         tramp-arm.c, tramp-ia64.c
9458         (mono_debugger_create_notification_function): Update signature to
9459         new signature and use new protocol for creating the notification
9460         function.  
9461
9462         Should fix the build.
9463
9464 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
9465
9466         * exceptions-ppc.c (mono_jit_walk_stack)
9467         (ves_icall_get_frame_info): Fix the build
9468
9469 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
9470
9471         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
9472
9473 2006-05-31  Raja R Harinath  <rharinath@novell.com>
9474
9475         * il2tests.2.il: New file for generics CIL tests.  Add test for
9476         #78019.
9477         * Makefile.am: Update.
9478
9479         Fix #78019
9480         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
9481         to nullable types.
9482
9483 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
9484
9485         * aliasing.c: Fixed bug 78311.
9486
9487 2006-05-29  Martin Baulig  <martin@ximian.com>
9488
9489         * mini-exceptions.c (mono_find_jit_info): When computing the
9490         native offset, check whether we're actually inside the method's
9491         code; call mono_debug_print_stack_frame() to format the frame.
9492         (ves_icall_System_Exception_get_trace): Call
9493         mono_debug_print_stack_frame() to format the stack frame.
9494         (ves_icall_get_trace): Update to the new debugging API.
9495         (mono_jit_walk_stack_from_ctx): Likewise.
9496         (ves_icall_get_frame_info): Likewise.
9497
9498         * mini.c (get_method_from_ip): Use the new debugging API.
9499         (mono_print_method_from_ip): Likewise.
9500
9501         * exceptions-ppc.c
9502         (mono_jit_walk_stack): Use the new debugging API.
9503         (ves_icall_get_frame_info): Likewise.   
9504
9505 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
9506
9507         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
9508
9509 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
9510
9511         * mini.c: Added "limitator" to inline for debugging.
9512
9513 2006-05-24  Martin Baulig  <martin@ximian.com>
9514
9515         * debug-debugger.c (mono_debugger_init): Create a private,
9516         malloc()-based code manager for the notification function and
9517         intentionally leak it on exit.  This fixes the crash-on-exit race
9518         condition.
9519
9520         * tramp-amd64.c
9521         (mono_debugger_create_notification_function): Added
9522         `MonoCodeManager *' argument.
9523
9524         * tramp-x86.c
9525         (mono_debugger_create_notification_function): Added
9526         `MonoCodeManager *' argument.
9527
9528 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
9529
9530         * aliasing.c: Fixed 64 bit issue.
9531         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9532         default since all known bugs are fixed (one more time!).
9533
9534 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9535
9536         * mini.c: write barrier support.
9537
9538 2006-05-23  Martin Baulig  <martin@ximian.com>
9539
9540         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
9541         check at the top of the file.
9542
9543 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9544
9545         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
9546         reverting changes without reason and without changelog entries.
9547
9548 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
9549
9550         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
9551         to a few opcodes. Fixes #78439.
9552
9553         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
9554         consistency with other archs.
9555
9556         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
9557
9558 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9559
9560         * debug-debugger.c: fix the build.
9561
9562 2006-05-17  Martin Baulig  <martin@ximian.com>
9563
9564         * debug-debugger.c
9565         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
9566         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
9567         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
9568         (debugger_attach): Call GC_mono_debugger_add_all_threads().
9569
9570 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
9571
9572         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
9573
9574 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
9575
9576         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
9577         MONO_TYPE_GENERICINST.
9578         
9579         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
9580         MONO_TYPE_GENERICINST.
9581
9582 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
9583
9584         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
9585         #78325.
9586
9587 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
9588
9589         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
9590         mempool.
9591         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
9592
9593 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
9594
9595         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
9596         mono_trace_cleanup ().
9597
9598         * iltests.il: Fix problem with the newly added test.
9599
9600         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
9601         due to register constraints, free up the previous hreg. Fixes #78314.
9602
9603         * iltests.il: Add new test for #78314.  
9604
9605         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
9606         Interlocked.Add. Fixes #78312.
9607
9608         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
9609         
9610 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
9611
9612         * inssel.brg (mini_emit_virtual_call): Fix a warning.
9613
9614 2006-05-05  Martin Baulig  <martin@ximian.com>
9615
9616         * debug-mini.c (mono_debug_open_block): New method.
9617
9618         * mini-amd64.c
9619         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9620         the beginning of each basic block.
9621
9622         * mini-x86.c
9623         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9624         the beginning of each basic block.
9625
9626 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9627
9628         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9629         default until I understand why they break the build on amd64.
9630
9631 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
9632
9633         * mini.c (mini_cleanup): Call mono_cleanup ().
9634
9635         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
9636         errors.
9637
9638 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9639
9640         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
9641         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9642         default since all known bugs are fixed, and I cannot reproduce bug
9643         77944... I'm asking Matt Hargett to test again after this commit.
9644
9645 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
9646
9647         * mini-codegen.c: Fixed typo that thrashed inline.
9648
9649 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
9650
9651         * dominators.c (compute_dominators): Avoid using a worklist since
9652         it is not correct in some cases. Instead, iterate over all bblocks as
9653         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
9654
9655 2006-04-28  Miguel de Icaza  <miguel@novell.com>
9656
9657         * mini.c (mono_jit_compile_method_inner): Use
9658         mono_prepare_exception_from_error that resets the value
9659         internally.
9660
9661 2006-04-27  Miguel de Icaza  <miguel@novell.com>
9662
9663         * mini.c: Move the mini_loader_error_to_exception to metadata. 
9664         
9665 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9666
9667         * aliasing.c: Fixed bug 78210.
9668
9669 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9670
9671         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9672         default until all their problems (or the ones they trigger) are fixed.
9673
9674 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
9675
9676         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
9677         
9678         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
9679         as loaded only after resolving patches since that could invoke the same method.
9680
9681         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
9682
9683         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
9684         functions.
9685
9686         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
9687         AOT loader.
9688
9689         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
9690         stack.
9691
9692         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
9693         made from AOT code through the PLT table.
9694
9695         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
9696         holding the plt offset when a call is made to the aot plt trampoline.
9697         
9698 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9699
9700         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
9701         amd64 AOT support.
9702
9703         * Makefile.am (common_sources): Fix build breakage.
9704
9705         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
9706         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
9707         intra-assembly calls if possible.
9708         
9709         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
9710
9711         * mini-trampolines.c: Handle PLT entries.
9712
9713         * mini.c: Avoid creating a GOT var for calls.
9714
9715         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
9716         from mscorlib code.
9717
9718         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
9719         from mscorlib code.
9720
9721         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
9722         AOT code.       
9723
9724         * mini.h: Bump AOT file format version.
9725         
9726         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
9727         covers more cases.
9728
9729 2006-04-25  Martin Baulig  <martin@ximian.com>
9730
9731         * driver.c: Disable copyprop, consprop and inline when running
9732         inside the debugger.
9733
9734 2006-04-25  Martin Baulig  <martin@ximian.com>
9735
9736         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9737         with `get_current_thread' and added `detach'.
9738         (MonoDebuggerMetadataInfo): Added `thread_size',
9739         `thread_tid_offset', `thread_stack_ptr_offset' and
9740         `thread_end_stack_offset'.
9741
9742 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9743
9744         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
9745         aot-runtime.c.
9746
9747         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9748         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9749
9750         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9751
9752         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9753
9754         * aot.c: Add support for ADJUSTED_IID.  
9755
9756 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
9757
9758         * aot.c (emit_method_order): Don't align method_order_end.
9759
9760         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9761         the interface ID changes.
9762
9763 2006-04-21  Dick Porter  <dick@ximian.com>
9764
9765         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9766         cleaning up a thread.  Fixes the new part of bug 77470.
9767
9768 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
9769
9770         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9771         to managed wrapper.
9772                      
9773 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
9774
9775         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9776         
9777         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9778         SIGSEGV. Fixes #78072.
9779
9780         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9781         unregister our SIGABRT handler.
9782
9783 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9784
9785         * mini.c: Disabled inline where it can alter the call stack in a
9786         way visible from managed code.
9787         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9788         default.
9789
9790 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9791
9792         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9793         on other platforms. Fixes #78089.
9794
9795 2006-04-13  Martin Baulig  <martin@ximian.com>
9796
9797         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9798         determine whether we're inside the debugger.
9799
9800         * debug-debugger.h
9801         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9802
9803 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9804
9805         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9806         handler clauses. Fixes #78024.
9807
9808         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9809         in the CALL_MEMBASE opcodes. Fixes #78088.
9810         (mono_arch_get_vcall_slot_addr): Ditto.
9811
9812 2006-04-10  Martin Baulig  <martin@ximian.com>
9813
9814         * debug-debugger.c: The thread handling code has now been moved
9815         into ../metadata/threads.c.
9816
9817 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9818
9819         * driver.c (mono_main): Fix --with-gc=none build.
9820
9821         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9822         (mono_spillvar_offset_float): Ditto.
9823         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9824         hreg, not when its !global, since on ia64, there is a third category: stacked
9825         registers.      
9826
9827 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9828
9829         * mini.c: set MonoInst->klass for load field address and a few other
9830         places.
9831
9832 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9833
9834         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9835
9836 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9837
9838         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9839         the branch opt changes.
9840
9841 2006-04-06  Dick Porter  <dick@ximian.com>
9842
9843         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9844         
9845         * wapihandles.c (mini_wapi_seminfo): 
9846         * driver.c (mono_main): Add semaphore info option
9847
9848 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9849
9850         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9851         branch optimization changes. Fixes #78009.
9852
9853 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9854
9855         * mini.c: ignore accessibility of methods in managed->native wrappers.
9856
9857 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9858
9859         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9860         
9861         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9862
9863 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9864
9865         * mini.c: Modify the branch optimizations to preserve the invariant that
9866         the entries inside the in_bb and out_bb arrays are unique.
9867         (mono_unlink_bblock): Avoid creation of new arrays.
9868
9869 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9870
9871         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9872         change (#77992).
9873
9874 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9875
9876         * mini.c (optimize_branches): Remove the "optimizations" in
9877         the cbranch1/cbranch2 -> branch cases which were causing several
9878         problems in the past. Fixes #77986.
9879
9880 2006-03-31  Chris Toshok  <toshok@ximian.com>
9881
9882         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9883         default optimizations :(
9884
9885 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9886
9887         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9888         branch.
9889
9890 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9891
9892         * local-propagation.c: Added comments to structs and removed
9893         "Mono" prefixes from local tree mover types.
9894
9895 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9896
9897         * Makefile.am (arch_sources): Define this for each architecture so 
9898         libmono_la_SOURCES is defined in one place.
9899
9900 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9901
9902         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9903         from handles/.
9904
9905 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9906
9907         * driver.c: print the GC name supplied by configure.
9908
9909 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9910
9911         * local-propagation.c: Added tree mover, and moved here all the
9912         local propagation code from mini.c
9913         * mini.c: Added support for treeprop, and moved all the local
9914         propagation code to local-propagation.c
9915         * mini.h: Added support for treeprop
9916         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9917         treeprop, inline and deadce by default
9918         * Makefile.am: Added local-propagation.c
9919
9920 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9921
9922         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9923
9924 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9925
9926         * debug-debugger.c: make it compile without the Boehm GC.
9927
9928 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9929
9930         * mini.c: fixed issue with mismatch when an icall is registered
9931         with multiple names but same address.
9932
9933 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9934
9935         * declsec.c, mini-exceptions.c: use write barrier to set reference
9936         fields of managed objects.
9937
9938 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9939
9940         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9941         (can_access_internals): Fix a warning.
9942
9943         * mini.c (print_method_from_ip): Rename this to 
9944         mono_print_method_from_ip so it gets exported.
9945
9946         * trace.c: Deal with strings inside StringBuilder's containing garbage
9947         and fix memory leaks. Fixes #77848.
9948
9949 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9950
9951         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9952         fixes #77787.
9953
9954 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9955         
9956         * mini-s390.c: Remove OP_X86_TEST_NULL.
9957
9958 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9959
9960         * mini.c: use the correct GetHashCode() for the moving collector.
9961
9962 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9963
9964         * liveness.c: Regalloc spill cost tuning.
9965
9966 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9967         
9968         * mini-s390x.h: Correct S390_LONG macro.
9969
9970         * mini-s390x.c: Cleanup unused code.
9971
9972 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9973
9974         * jit-icalls.h: New file.
9975
9976         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9977         icalls and include that instead of including jit-icalls.c.
9978
9979         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9980         OP_X86 opcodes.
9981
9982 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9983
9984         * mini.c: when checking for member accessibility, also check for
9985         friend assemblies and for explicit interface implementations.
9986
9987 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9988
9989         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9990
9991         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9992
9993         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9994         common cases are done first.    
9995
9996         * mini-ops.h: Only define platform specific opcodes on the given platform.
9997
9998         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9999         branch.
10000         
10001 2006-03-14  Martin Baulig  <martin@ximian.com>
10002
10003         Revert Paolo's change from r57348:
10004
10005         * mini.h: don't use gboolean for bitfields.
10006         * mini.c: verifier changes for fields and methods accessibility.
10007
10008 2006-03-13  Neale Ferguson <neale@sinenomine.net>
10009
10010         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10011
10012         * mini-s390x.c: Fix conv_r_un.
10013
10014         * cpu-s390, cpu-s390x.md: Fix lengths.
10015
10016 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10017
10018         * mini.c: nested types have access to all the nesting
10019         levels, not just the enclosing types.
10020
10021 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10022
10023         * mini.c: added a few more verification checks.
10024
10025 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
10026
10027         * liveness.c: Merge optimizations from the linear-il branch.
10028
10029 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10030
10031         * mini-ia64.c (emit_call): Add a comment.
10032
10033         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10034
10035         * tramp-ia64.c: Fix some warnings.
10036
10037 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10038
10039         * mini.h: don't use gboolean for bitfields.
10040         * mini.c: verifier changes for fields and methods accessibility.
10041
10042 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10043
10044         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10045         lazy icall wrapper changes.
10046
10047         * dominators.c: Replace all the dominator algorithms with faster
10048         ones from the linear-il branch.
10049
10050         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10051         the mempool.
10052
10053         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10054         common cases are done first.
10055
10056         * mini-amd64.c: Fix some warnings.
10057
10058         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10059         from the mempool.
10060
10061         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10062         added code.
10063
10064         * mini.h: Add a missing prototype.
10065
10066 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
10067
10068         * mini.c: Compile icall wrappers lazily.
10069
10070         * mini-codegen.c: Use printf instead of g_print since its much faster.
10071
10072         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10073         function.
10074
10075         * mini.c (optimize_branches): Cache the negative result from 
10076         remove_block_if_useless ().
10077
10078         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
10079         Also fix some bblock linking issues.
10080
10081         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10082         assembly files.
10083
10084         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10085
10086         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10087         accessed fields first, for better cache behavior.
10088         
10089 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10090
10091         * mini.c: speedup IList<T> array accesses.
10092
10093 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
10094
10095         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
10096         inline_costs counter. Fixes #77190.
10097
10098 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
10099
10100         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
10101         trace messages. Fixes #77706.
10102
10103 2006-03-04  Martin Baulig  <martin@ximian.com>
10104
10105         * tramp-amd64.c, tramp-x86.c
10106         (mono_debugger_create_notification_function): Use
10107         mono_global_codeman_reserve() to allocate a buffer at runtime and
10108         return it.
10109
10110         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
10111
10112         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
10113         notification function at runtime and then call `initialize' in the
10114         `MONO_DEBUGGER__debugger_info' vtable.
10115
10116 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
10117
10118         * iltests.il: Fix a visibility problem.
10119
10120 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
10121
10122         * driver.c, mini.c: add hooks for the counters API.
10123
10124 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10125
10126         * driver.c: show disabled options.
10127
10128 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10129
10130         * linear-scan.c: always use cost-driven selection.
10131
10132 2006-02-28  Raja R Harinath  <rharinath@novell.com>
10133
10134         * jit-icalls.c (helper_compile_generic_method): Revert change from
10135         2006-02-24.
10136
10137 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
10138
10139         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
10140
10141 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
10142
10143         * inssel.brg: style fixes, mostly to force the updated monoburg
10144         to run for people using svn.
10145
10146 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
10147
10148         * mini.c: match monoburg changes.
10149
10150 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10151
10152         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
10153         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
10154         declaration in the header file.
10155
10156 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10157
10158         * helpers.c: reduce relocations and mem usage.
10159
10160 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
10161
10162         * mini.h, mini-codegen.c: disable logging features if
10163         requested by configure.
10164
10165 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
10166
10167         * mini.c: tiny verifier changes.
10168
10169 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10170
10171         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
10172         cpu-pentium.md: stack alignment changes for osx/x86,
10173         partially from Geoff Norton <gnorton@customerdna.com>.
10174
10175 2006-02-24  Raja R Harinath  <harinath@gmail.com>
10176
10177         * jit-icalls.c (helper_compile_generic_method): Update to changes
10178         in metadata/class.c.
10179
10180 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
10181         
10182         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
10183         
10184         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
10185         interface calls with large offsets.
10186
10187 2006-02-23  Raja R Harinath  <rharinath@novell.com>
10188
10189         * jit-icalls.c (helper_compile_generic_method): Document the
10190         special-case we depend on so that we can inflate the method twice
10191         with the same context with no bad side-effects.
10192
10193 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10194
10195         * mini-x86.c, mini-amd64.c: fix for case when xen support
10196         is disabled.
10197
10198 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
10199
10200         * mini-x86.c, mini-amd64.c: generate code to access tls items
10201         in a faster way for Xen systems.
10202
10203 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
10204
10205         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
10206         updates and compilation fixes for the OSX/x86 port, mostly from
10207         Geoff Norton <gnorton@customerdna.com>.
10208
10209 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
10210
10211         * inssel.brg: faster interface call implementation
10212         to sync with the interface_offsets MonoVTable changes.
10213
10214 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10215
10216         * mini.c: more verification checks.
10217
10218 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
10219
10220         * mini.c: added a few more verification checks.
10221
10222 2006-02-17      Neale Ferguson <neale@sinenomine.net>
10223
10224         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
10225         facility on the processor and use it if available.
10226
10227 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10228
10229         * driver.c, aot.c, mini.c: throw exception if the IL code is
10230         invalid or unverifiable.
10231
10232 2006-02-17  Raja R Harinath  <rharinath@novell.com>
10233
10234         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
10235         m.StructField.
10236
10237 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
10238
10239         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
10240
10241 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10242
10243         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
10244         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
10245         handling of instantiated generic valuetypes.
10246
10247 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
10248
10249         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
10250         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
10251         instead.
10252
10253         * generics.2.cs: Revert the nullable reftypes tests.
10254
10255 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
10256
10257         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
10258         using __builtin_frame_address (1) as it doesn't work in the presence
10259         of optimizations. Hopefully fixes #77273.
10260
10261         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
10262         -> generics.cs change as it doesn't work with some automake versions.
10263
10264 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10265
10266         * mini.c: handle systems that sue a different way to
10267         retrieve the stack address of the current thread.
10268
10269 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
10270
10271         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
10272         it specially in the makefile.
10273
10274         * generics.2.cs: Add tests for nullable reference types.
10275
10276 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10277
10278         * mini.c: always handle the case when mono_jit_init()
10279         is called in a thread different from the main thread,
10280         confusing libgc (bug #77309).
10281
10282 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
10283
10284         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
10285
10286 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
10287
10288         * mini.c: change optimize_branches () to use a single loop
10289         and introduce a new optimization to simplify some range checks.
10290
10291 2006-02-03  Martin Baulig  <martin@ximian.com>
10292
10293         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
10294         and merged with debugger_thread_manager_add_thread().
10295         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
10296         inform the debugger about the main thread.
10297
10298 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
10299
10300         * basic.cs: Add test for div.un/rem.un constant folding.
10301
10302 2006-02-03  Neale Ferguson <neale@sinenomine.net>
10303
10304         * cpu-s390x.md: correct int_xor_imm length
10305
10306 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
10307
10308         * generics.2.cs: New test for #77442.
10309
10310         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
10311         #77442.
10312
10313 2006-02-02  Martin Baulig  <martin@ximian.com>
10314
10315         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
10316         <mono/metadata/mono-debug-debugger.h>   
10317
10318         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
10319
10320 2006-02-02  Martin Baulig  <martin@ximian.com>
10321
10322         * debug-debugger.h: New header file for debug-debugger.c.
10323
10324         * debug-debugger.c: Big API cleanup; don't run the managed Main()
10325         function is a separate thread anymore; add support for attaching.
10326
10327 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
10328
10329         * tramp-x86.c: Fix a warning.
10330
10331 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
10332
10333         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
10334         on very large methods.
10335
10336         * aot.c (load_patch_info): Fix a warning.
10337
10338 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10339
10340         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
10341         mini-ops.h: alu membase optimizations.
10342
10343 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
10344
10345         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
10346         to speedup StringBuilder.
10347
10348 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
10349
10350         * dominators.c (mono_compute_natural_loops): Fix detection of
10351         loop body start blocks.
10352
10353         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
10354
10355 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
10356
10357         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
10358         #75145.
10359
10360 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
10361
10362         * aliasing.c: Fixed aliasing issue on 64 bit archs.
10363
10364 2006-01-25  Martin Baulig  <martin@ximian.com>
10365
10366         * debug-debugger.c: Moved the `MonoDebuggerManager' and
10367         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
10368         started to cleanup this file a little bit.
10369
10370 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
10371
10372         * mini.c: optimize a codepath frequently happening in generics code.
10373
10374 2006-01-23  Martin Baulig  <martin@ximian.com>
10375
10376         * Makefile.am: Only compile debug-debugger.c on supported platforms.
10377
10378         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
10379         functions directly.
10380
10381         * driver.c: debug-debugger.c is only available if
10382         `MONO_DEBUGGER_SUPPORTED' is defined.   
10383
10384 2006-01-23  Martin Baulig  <martin@ximian.com>
10385
10386         * debug-debugger.c: Only enable this on platforms where the Mono
10387         Debugger is working (x86 and x86_64).
10388
10389 2006-01-21  Martin Baulig  <martin@ximian.com>
10390
10391         The Mono Debugger is now using the normal `mono' instead of the
10392         `mono-debugger-mini-wrapper' when executing managed code.
10393
10394         * debug-debugger.c: New file; previously known as
10395         debugger/wrapper/wrapper.c.
10396
10397         * debug-mini.c (mono_init_debugger): Removed.
10398
10399         * driver.c (mono_main): Added new `--inside-mdb' command line
10400         argument which is used when running inside the debugger.
10401
10402 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
10403
10404         * liveness.c (mono_analyze_liveness): Remove some unused data
10405         structures.
10406
10407 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
10408
10409         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
10410
10411 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
10412
10413         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
10414         depends on implementation details of monobitset.
10415
10416         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
10417         Fixes #77271.
10418
10419 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
10420
10421         * liveness.c: Update after monobitset changes.
10422
10423 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
10424
10425         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
10426
10427 2006-01-11 Neale Ferguson <neale@sinenomine.net>
10428
10429         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
10430
10431         * mini-s390x.c: Remove warning messages.
10432
10433 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
10434
10435         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
10436
10437 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
10438
10439         * generics.2.cs: Add ldelem/stelem_any test.
10440
10441 2006-01-10 Neale Ferguson <neale@sinenomine.net>
10442
10443         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
10444
10445 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
10446
10447         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
10448         
10449 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
10450
10451         * generics.2.cs: Reenable vtype tests.
10452
10453         * inssel-x86.brg: Remove an icorrect valuetype rule.
10454
10455 2006-01-06 Neale Ferguson <neale@sinenomine.net>
10456
10457         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
10458         initial support for OP_ABS.
10459
10460 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10461
10462         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
10463
10464 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10465
10466         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
10467         conversion and implement LADD/LSUB.
10468
10469         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
10470         architectures.
10471
10472 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10473
10474         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
10475
10476         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
10477         architectures.
10478
10479 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10480
10481         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
10482         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
10483         (stack walk problem).
10484
10485 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
10486
10487         * aot.c (mono_aot_load_method): Fix a warning.
10488
10489 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10490
10491         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
10492
10493 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
10494
10495         * iltests.il: Add test for #77148.
10496
10497         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
10498         #77148.
10499
10500 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10501
10502         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
10503
10504 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10505
10506         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
10507         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
10508
10509         * basic-long.cs: Add lconv-to-r4/r8 tests.
10510
10511 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
10512
10513         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
10514
10515         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
10516         here as on other archs.
10517
10518 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10519
10520         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
10521
10522 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10523
10524         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
10525         
10526         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
10527
10528         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
10529         instrument_prolog; Add memory_barrier instruction.
10530
10531 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
10532
10533         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
10534
10535 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
10536
10537         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
10538
10539         * aliasing.c inssel.brg: Fix warnings.
10540
10541         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
10542         could skip initialization of some parts of memory.
10543
10544         * mini.c mini-ia64.c: Fix warnings.
10545
10546         * inssel-sparc.brg: Add an implementation of lneg which actually works.
10547
10548 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
10549
10550         * aliasing.c (mono_build_aliasing_information): Add a workaround for
10551         a crash seen on sparc.
10552
10553         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
10554         
10555         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
10556
10557 2005-12-21 Neale Ferguson <neale@sinenomine.net>
10558
10559         * mini-ops.h: Add s390_backchain instruction
10560
10561         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
10562
10563         * cpu-s390.md: Add s390_backchain instruction
10564
10565         * mini-s390.c: Significant ABI changes
10566
10567         * mini-s390.h: Cater for zero length structures
10568
10569 2005-12-20 Neale Ferguson <neale@sinenomine.net>
10570
10571         * mini-s390.c: ABI fixes
10572
10573         * inssel-s390.brg: Remove debug statements
10574
10575         * cpu-s390.md: Fix length of ATOMIC_xx operations
10576
10577 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
10578
10579         * basic-float.cs: Add float<->long conversion tests.
10580
10581 2005-12-16 Neale Ferguson <neale@sinenomine.net>
10582
10583         * mini-s390.c: Fix LOCALLOC processing.
10584
10585         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
10586
10587 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
10588
10589         * iltests.il: Add tests for some opcodes not covered by the other
10590         tests.
10591
10592 2005-12-15 Neale Ferguson <neale@sinenomine.net>
10593
10594         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
10595         register loading for Tail processing; Correct trace output.
10596
10597         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
10598
10599         * cpu-s390.md: Correct size of jmp instruction. 
10600
10601 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10602
10603         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
10604
10605 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10606
10607         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
10608           Bring s390 up to current level.
10609
10610 2005-12-12  Zltan Varga  <vargaz@gmail.com>
10611
10612         * generics.2.cs: Disable the newly added tests as they do not work yet.
10613         
10614         * generics.2.cs: Add valuetype tests.
10615
10616 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
10617
10618         * basic-long.cs: Add i4->u8 test.
10619
10620         * objects.cs: Add tests for JIT intrinsic.
10621
10622         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
10623         optimizations lost by a mistake.
10624
10625 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
10626
10627         * basic-long.cs: Remove a test moved to objects.cs.
10628
10629         * arrays.cs: Add more array tests.
10630
10631 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
10632
10633         * arrays.cs: Add new tests for multi-dimensional arrays.
10634
10635 2005-12-06  Raja R Harinath  <rharinath@novell.com>
10636
10637         * Makefile.am (test_sources2): Add generics.2.cs.
10638         (EXTRA_DIST): Add test_sources2.
10639
10640 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
10641
10642         Support for boxing and unboxing nullable types as well as the
10643         isinst operation on nullables, per the CLI ammendment.
10644
10645         * inssel.brg (CEE_ISINST): Special case for nullable
10646
10647         * mini.c (handle_unbox_nullable): new method
10648         (handle_box): Special case for nullable types
10649         (mono_method_to_ir): Call handle_unbox_nullable in correct
10650         places.
10651
10652         * generics.2.cs: New test suite
10653
10654         * Makefile.am: Support for regression tests with generics.
10655
10656 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
10657
10658         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
10659         allocated to registers. Fixes #76800.
10660
10661 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
10662
10663         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
10664
10665 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
10666
10667         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
10668         of platforms.
10669
10670 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
10671
10672         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
10673         objects.cs.
10674
10675         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
10676         
10677         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
10678 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
10679
10680         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
10681         single precision before storing to a single precision location.
10682
10683 2005-11-28  Raja R Harinath  <rharinath@novell.com>
10684
10685         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
10686
10687 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
10688
10689         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
10690         correct files.
10691
10692         * basic.cs: Remove test_0_byte_compares test which was moved to
10693         objects.cs a long time ago.
10694
10695 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
10696
10697         * aliasing.c: Fixed aliasing issue on 64 bit archs.
10698
10699 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
10700
10701         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
10702         handlers are called.
10703
10704         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
10705         throwing code.
10706
10707          * mini-ia64.c: Add support for the throw->branch exception 
10708         optimization.   
10709
10710         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
10711
10712 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10713
10714         * mini.c: Enabled "fastpath" deadce :-)
10715         
10716 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10717
10718         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
10719         alias analysis pass to support it.
10720         * mini.h: Likewise.
10721         * ssa.c: Likewise.
10722         * liveness.c: Likewise (liveness computation can use aliasing
10723         information to be more accurate).
10724         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
10725         moreover made so that "--compile-all" uses the given optimization
10726         flags and not the default ones.
10727         * aliasing.c: Alias analysis (new file).
10728         * aliasing.h: Likewise.
10729         * Makefile.am: added "aliasing.c" and "aliasing.h".
10730         
10731 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
10732
10733         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10734         OP_L opcodes.
10735
10736 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
10737
10738         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
10739         fp >= end_of_stack exit condition, as it is not needed, and it might
10740         become true for fp eliminated frames.
10741
10742 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
10743
10744         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10745         coded offsets.
10746
10747 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10748
10749         * mini-arm.c: fixed alignment of doubles/longs to match
10750         the C ABI (bug #76635).
10751
10752 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10753
10754         * aot.c: fix compilation with --enable-minimal=aot.
10755
10756 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10757
10758         * mini-arm.c: fixed compatibility with the new
10759         floating point emulator package for compares.
10760
10761 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
10762
10763         * mini.c : reverted sig->pinvoke changes (r51396-51397).
10764
10765 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
10766
10767         * mini-exceptions.c (print_stack_frame): Output to stderr.
10768         (mono_handle_native_sigsegv): Ditto.
10769
10770 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10771
10772         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10773         OP_LCONV_TO_OVF_I implementation.
10774
10775         * mini-amd64.c: Add support for the throw->branch exception 
10776         optimization.
10777
10778         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10779         when the catch clause catches a more general exception, i.e. Object.
10780
10781 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10782
10783         * cpu-ia64.md: Remove unused opcodes.
10784
10785         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10786         specific defines for architectures defining USE_SIGACTION.
10787
10788         * mini-ia64.c: Fix some warnings.
10789
10790         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10791         version seemed to skip a frame.
10792
10793 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10794
10795         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10796         only calls which are made to native code use this flag.
10797
10798 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10799
10800         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10801         varargs methods as well.
10802         
10803         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10804         which have save_lmf set. Reorganize methods prologs a bit.
10805
10806         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10807         debugger to the proper place.
10808
10809 2005-10-29  Martin Baulig  <martin@ximian.com>
10810
10811         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10812         when running inside the debugger until the debugger has support
10813         for it.
10814
10815 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10816
10817         * mini.h: Fix a warning.
10818
10819 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10820
10821         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10822         we expose publicly, this returns the string.
10823
10824 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10825
10826         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10827         with fp elimination.
10828
10829 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10830
10831         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10832         native stacktrace using the glibc 'backtrace' function if available.
10833
10834 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10835
10836         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10837
10838         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10839         handle SIGSEGVs received while in native code.
10840
10841         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10842         code, call mono_handle_native_sigsegv which will abort the runtime
10843         after printing some diagnostics, instead of converting it into a
10844         confusing NullReferenceException.
10845
10846 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10847
10848         * cpu-pentium.md: Remove unused opcodes.
10849
10850 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10851
10852         * mini-amd64.h (MonoLMF): Add rsp field.
10853
10854         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10855         the lmf too.
10856
10857 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10858
10859         * mini-codegen.c (get_register_spilling): Fix some warnings.
10860
10861 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10862
10863         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10864         elimination during exception handling. Enable fp elimination by
10865         default.
10866
10867         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10868         elimination.
10869
10870 2005-10-16  Martin Baulig  <martin@ximian.com>
10871
10872         * mini-exceptions.c
10873         (mono_debugger_run_finally): New public method for the debugger.
10874
10875 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10876
10877         * debug-mini.c (mono_debug_init_method): Fix warning.
10878
10879         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10880         the 'exname' parameter const to fix some warnings.
10881
10882 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10883
10884         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10885         introduced by the previous patch.
10886
10887 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10888
10889         * basic-float.cs: Add test for precision of float arithmetic.
10890
10891         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10892         when loading/storing single values from/to memory.
10893
10894         * mini.c (mono_jit_compile_method_with_opt): Create the function
10895         pointers in the correct domain.
10896
10897 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10898
10899         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10900         introduced by previous patch.
10901         
10902         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10903         when out_filter_idx is NULL.
10904
10905         * mini-exceptions.c: Don't run filter clauses twice during exception
10906         handling. Fixes #75755.
10907
10908 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10909
10910         * aot.c: Add support for ldflda wrappers.
10911
10912         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10913         #75902.
10914
10915 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10916
10917         * mini.c, mini.h: do not consider exception handlers blocks when
10918         setting up interface variables.
10919
10920 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10921
10922         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10923
10924 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10925
10926         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10927         causes a regression.
10928
10929         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10930
10931 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10932
10933         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10934         of the OP_P definitions.
10935
10936         * TODO: Add a proposal for dealing with the CEE/OP mess.
10937
10938         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10939         optimizations from the x86 port.
10940
10941         * cpu-amd64.md: Ditto.
10942
10943         * basic.cs basic-long.cs: Add tests.
10944
10945 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10946
10947         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10948         Patrik Torstensson's implementation of my exception-handling
10949         optimization idea, when the exception object is not used
10950         (bug #62150).
10951
10952 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10953
10954         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10955         of the mul_imm optimizations from the old jit.
10956
10957 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10958
10959         * mini.c, liveness.c: patch by Patrik Torstensson and
10960         Zoltan Varga to improve performance in methods with
10961         exception clauses.
10962
10963 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10964
10965         * driver.c: Remove 'Globalization' entry from --version.
10966
10967 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10968
10969         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10970         there is a profiler interested in JIT events.
10971
10972         * aot.c: Load profile files produced by the AOT profiling module, and
10973         reorder methods based on the profiling info. Add a 'method_order' table
10974         to the AOT file to make mono_aot_find_jit_info work with the reordered
10975         methods.
10976
10977         * mini.h: Bump AOT file version info.
10978
10979 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10980
10981         * mini-arm.h: work around what looks like a gcc bug when optimizations
10982         are enabled.
10983
10984 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10985
10986         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10987         conditionals.  Use ...
10988         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10989
10990 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10991
10992         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10993         to determine the amount of memory to copy when passing valuetypes.
10994
10995         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10996         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10997
10998 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10999
11000         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
11001         information about aot.
11002
11003 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
11004
11005         * *.c: Replace the use of {Enter,Leave}CriticalSection with
11006         macros. This will allow a deadlock debugger to easily be plugged
11007         in.
11008
11009 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11010
11011         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11012
11013 2005-09-27  Raja R Harinath  <rharinath@novell.com>
11014
11015         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11016         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11017         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11018         ($(arch_built)) [CROSS_COMPILING]: Error out.
11019
11020 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
11021
11022         * aot.c: Add support for the no_special_static flag for classes.
11023
11024 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11025
11026         * Reapply reverted patches.
11027
11028         * *: Revert r50174 as well.
11029
11030         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11031
11032 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11035
11036 2005-09-23  Miguel de Icaza  <miguel@novell.com>
11037
11038         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11039         part of the SIG_HANDLER_SIGNATURE.  
11040
11041 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
11042
11043         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11044         statistics.
11045
11046         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
11047         introduced by previous patch.
11048
11049 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
11050
11051         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11052         saved registers too.
11053
11054         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
11055         upon the information returned by get_call_info ().
11056         
11057         * mini-x86.c (add_float): Fix stack size calculation.
11058         (mono_arch_call_opcode): Rewrite this so it works based up the
11059         information returned by get_call_info ().
11060         (mono_arch_get_this_vret_args): Ditto.
11061
11062 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
11063
11064         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11065         in cinfo to determine the registers which need to be used.
11066
11067 2005-09-20  Miguel de Icaza  <miguel@novell.com>
11068
11069         * driver.c (mono_main): Add --server and --desktop flags. 
11070
11071 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
11072
11073         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11074         registers as global registers.
11075
11076         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
11077         longer needed with the new register allocator.
11078
11079         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11080
11081         * cpu-ia64.md: Remove unused opcodes.
11082         
11083         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11084         
11085 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
11086
11087         * cpu-amd64.md: Remove unused opcodes.
11088
11089         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11090         needed with the new register allocator.
11091
11092         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11093         reg-reg moves.
11094
11095 2005-09-16  Raja R Harinath  <rharinath@novell.com>
11096
11097         * Makefile.am (check-local): Don't invoke semdel-wrapper.
11098
11099 2005-09-16  Martin Baulig  <martin@ximian.com>
11100
11101         * exceptions-amd64.c
11102         (throw_exception): Don't call mono_debugger_throw_exception() if
11103         we're a rethrow - see the FIXME in the code.
11104
11105 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
11106
11107         * mini.c (mono_init_exceptions): This only works on some architectures.
11108         
11109 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
11110
11111         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
11112         on ia64.
11113
11114         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
11115
11116         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
11117         now in mini-exceptions.c.
11118
11119 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
11120
11121         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
11122         now in mini-exceptions.c.
11123
11124 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
11125
11126         * exceptions-x86.c: Applied patch from Patrik Torstensson 
11127         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
11128
11129         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
11130         code into mini-exceptions.c. Add some assertions to it.
11131
11132 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
11133
11134         * aot.c (emit_section_change): Applied patch from "The Software Team" 
11135         (<software@solmersa.com>). Fix as errors on windows.
11136
11137 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
11138
11139         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
11140         method info into the LMF.
11141
11142 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
11143         
11144         * mini-ia64.c: Add proper unwind info for method epilogs.
11145
11146         * exceptions-ia64.c: Add some code to help debugging.
11147         
11148         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
11149
11150         * mini-exceptions.c: Fix warning.
11151
11152 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
11153
11154         * mini.c: Really fix build.
11155
11156         * mini-x86.c mini-amd64.c: Fix build.
11157
11158 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
11159
11160         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
11161
11162         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
11163         some Interlocked methods as intrinsics.
11164
11165         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
11166         for Thread methods as well.
11167
11168         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
11169
11170         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
11171
11172         * mini-ia64.c mini-x86.c mini-amd64.c 
11173         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
11174         OP_MEMORY_BARRIER.
11175         
11176         * mini.c (mono_init_exceptions): Fix build breakage.
11177
11178 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
11179
11180         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
11181         of instructions. Use the new ia64_unw_op macros for emitting unwind
11182         info.
11183
11184         * mini.c (mono_init_exceptions): Initialize exception handling
11185         related trampolines at startup.
11186
11187 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
11188
11189         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
11190
11191 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
11192
11193         * mini.c: Handle type loading errors gracefully during compilation and
11194         throw the appropriate exception.
11195
11196 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
11197
11198         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
11199         for the mono binary.
11200
11201 2005-09-09  Martin Baulig  <martin@ximian.com>
11202
11203         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
11204         the release.
11205
11206 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
11207
11208         * mini-arm.h: use emulation for conv.r.un for the release.
11209
11210 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
11211
11212         * mini-arm.c, objects.cs: more fixes and tests for them.
11213
11214 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
11215
11216         * mini-arm.c: align structures to at least 4 bytes to be able
11217         to keep our current optimized memcpy.
11218
11219 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
11220
11221         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
11222
11223 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11224
11225         * mini.c: ignore SIGPIPE.
11226
11227 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
11228
11229         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
11230
11231         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
11232
11233 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
11234
11235         * mini.h: Add prototype for mono_allocate_stack_slots_full.
11236
11237 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
11238
11239         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
11240         exception handling support.
11241         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
11242         patch by Brian Koropoff <briank@marakicorp.com>).
11243
11244 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
11245
11246         * mini.c: revert another 'optimization' which breaks when
11247         items on the eval stack need to be saved at a basic block end
11248         (bug #75940).
11249
11250 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11251
11252         * jit-icalls.c: for arrays, ensure we always provide
11253         lower bounds.
11254
11255 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
11256
11257         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
11258         
11259         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
11260
11261 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
11262
11263         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
11264         arguments in their original register.
11265
11266 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
11267
11268         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
11269         memset/memcpy.
11270
11271         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
11272         when ssapre is enabled.
11273
11274         * inssel-long.brg: Fix bug in previous patch.
11275
11276         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
11277         multiplication by a constant.
11278
11279 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
11280
11281         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
11282         icc.
11283
11284         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
11285         saving registers.
11286
11287 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
11288
11289         * inssel-arm.brg: apply changes tested by Brian Koropoff
11290         <briank@marakicorp.com>.
11291
11292 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
11293
11294         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
11295         
11296 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
11297
11298         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
11299         to the same register if dreg is just a base register.
11300         (print_ins): Improve printing of membase opcodes.
11301
11302         * inssel-x86.brg: Add optimized ldind(reg) rules.
11303
11304         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
11305
11306 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
11307
11308         * mini.c: when running under valgrind, set the stack bottom for
11309         the GC at the actual approximate stack for the app (fixes running
11310         mono with valgrind).
11311
11312 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
11313
11314         * mini.c: do no break at the first valuetype to init found
11315         (fixes bug #75791).
11316
11317 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
11318
11319         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
11320
11321 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
11322
11323         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
11324
11325 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
11326
11327         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
11328
11329 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
11330
11331         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
11332
11333         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
11334         code.
11335
11336         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
11337         code.
11338
11339         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
11340         methods.
11341
11342 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
11343
11344         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
11345
11346 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
11347
11348         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
11349         in the tail recursion optimization.
11350
11351         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
11352         debug info into the assembly file.
11353
11354         * iltests.il: Add test for filter regions.
11355
11356         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
11357         initial stack of filter regions. Fixes #75755.
11358
11359 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
11360
11361         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
11362         stack requirements.
11363
11364 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
11365
11366         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
11367         the check for an already compiled method on non-ia64 platforms.
11368         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
11369         proper domain.
11370
11371         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
11372
11373         * inssel-x86.brg: Add some optimized call rules.
11374
11375 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
11376
11377         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
11378         method here.
11379
11380         * mini.h mini-trampolines.c: Pass the trampoline argument to 
11381         mono_arch_patch_delegate_trampoline.
11382
11383         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
11384
11385         * mini-trampolines.c: Fix build.
11386
11387         * mini-amd64.h: Add delegate trampolines.
11388
11389         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
11390
11391         * inssel-amd64.brg: Add optimized call rules.
11392         
11393         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
11394
11395         * inssel-ia64.brg: Add optimized ldind(reg) rules.
11396
11397 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
11398
11399         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
11400         change.
11401
11402         * mini-ia64.c: Remove LMF fixmes.
11403
11404         * mini-ia64.h: Remove most fields from LMF.
11405
11406         * inssel-ia64.brg (stmt): Fix unaligned access errors.
11407
11408         * mini-trampolines.c: Add support for IA64 function descriptors.
11409
11410         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
11411         for IA64 function descriptors.
11412
11413 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
11414
11415         * tramp-arm.c: patch the vtable for virtual calls. Added
11416         support code to register/unregister the LMF.
11417         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
11418         more LMF work.
11419
11420 2005-08-19  Dick Porter  <dick@ximian.com>
11421
11422         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
11423         bit value if needed.
11424
11425 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
11426
11427         * mini.c (mini_get_method): Move handling of wrapper data here.
11428
11429         * mini.c (mono_method_to_ir): Add support for dynamic methods.
11430
11431         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
11432         virtual.
11433
11434         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
11435         bblock->code does not remain empty.
11436
11437 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
11438
11439         * arrays.cs: Add regression test for #75832.
11440
11441         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
11442         rules. Fixes #75832.
11443
11444         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
11445         instruction scheduling.
11446
11447 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
11448
11449         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
11450
11451 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
11452
11453         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
11454
11455         * mini-codegen.c: Fix VC build.
11456
11457         * cpu-pentium.md: Increase length of atomic_exhange_i4.
11458
11459 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11460
11461         * mini.h: fix signature for mono_register_opcode_emulation.
11462
11463 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
11464
11465         * mini.c: Get rid of most of the helper_sig_... constants using
11466         mono_create_icall_signature ().
11467
11468 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
11469
11470         * jit-icalls.c (helper_ldstr): New helper function.
11471
11472         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
11473
11474         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
11475         throw, load the string using a helper call instead of creating a string object.
11476
11477         * aot.c: Update after LDSTR changes.
11478
11479         * mini.h: Bump AOT file version.
11480         
11481         * aot.c: Save class size info into the AOT file. Print more statistics during
11482         compilation.
11483
11484         * mini.h: Bump AOT file version.
11485
11486         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11487         ordering of disasm cases. Fixes #74957.
11488
11489 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
11490
11491         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
11492         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
11493         the generic code needed for the ARM port.
11494
11495 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
11496
11497         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
11498         inssel-arm.brg: more ARM features and fixes.
11499
11500 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
11501
11502         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
11503         ARM port work in progress.
11504
11505 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
11506
11507         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
11508
11509         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
11510
11511         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
11512
11513         * inssel.brg (mini_emit_memset): Add support for unaligned access.
11514
11515         * *-ia64.*: Ongoing IA64 work.
11516         
11517         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
11518
11519 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
11520
11521         * TODO: Remove out-of-data todo stuff.
11522
11523         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
11524         dead code.
11525
11526         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
11527
11528         * mini.h: Bump corlib version.
11529
11530 2005-07-27  Martin Baulig  <martin@ximian.com>
11531
11532         * mini-codegen.c
11533         (create_copy_ins): Added `const unsigned char *ip' argument; set
11534         `copy->cil_code' from it.
11535
11536 2005-07-27  Martin Baulig  <martin@ximian.com>
11537
11538         * mini-exceptions.c (mono_handle_exception): Don't call
11539         mono_debugger_handle_exception() for filters.
11540
11541 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
11542
11543         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
11544         as well.
11545
11546 2005-07-26  Martin Baulig  <martin@ximian.com>
11547
11548         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
11549
11550         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
11551         helper_compile_generic_method() if the method is actually virtual
11552         and non-final.
11553
11554 2005-07-26  Martin Baulig  <martin@ximian.com>
11555
11556         * mini.c
11557         (trampoline_code): Renamed to `mono_trampoline_code' and made it
11558         public; this is now accessed directly by the debugger.
11559         (mono_generic_trampoline_code): Removed.
11560
11561         * debug-mini.c
11562         (mono_debug_init_method): Also add interncalls and wrappers.
11563
11564 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
11565
11566         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
11567
11568 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
11569
11570         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
11571
11572 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
11575
11576 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11577
11578         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
11579         getting TLS offsets on AMD64 too.
11580
11581 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
11582
11583         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
11584
11585 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
11586
11587         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
11588         inssel-arm.brg, mini-arm.h: ARM port work in progress.
11589
11590 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11591
11592         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
11593
11594         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
11595         to mini.c.
11596
11597         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
11598         mono_sparc_is_virtual_call ().
11599         
11600         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
11601
11602         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
11603         trampoline parameters.
11604
11605         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
11606         
11607         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
11608         to mono_arch_get_vcall_slot_addr.
11609
11610         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
11611         trampoline code.
11612
11613         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
11614
11615 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11616
11617         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
11618
11619 2005-07-19  Martin Baulig  <martin@ximian.com>
11620
11621         * exceptions-amd64.c (throw_exception): Call
11622         mono_debugger_throw_exception() here like we're doing it on i386.
11623
11624 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11625
11626         * mini-ia64.c: Add optimized TLS access support.
11627
11628 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
11629
11630         * mini-exceptions.c: Ongoing IA64 work.
11631
11632         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
11633
11634         * mini.c: Use the default optimization set when embedding. Fixes
11635         #75194.
11636
11637 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
11638
11639         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
11640         of trampolines to a separate file.
11641
11642         * mini-trampolines.c: New file.
11643
11644         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
11645         separate file.
11646         
11647         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
11648         amd64/ia64 code.
11649
11650         * mini-codegen.c: Fix cygwin build.
11651
11652 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
11653
11654         * mini.c: Add some minor changes needed by the IA64 port.
11655
11656         * *-ia64.*: Ongoing IA64 work.
11657
11658 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
11659
11660         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
11661         trampolines into arch-independent and arch-dependent parts.
11662
11663         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
11664
11665 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
11666
11667         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
11668
11669         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
11670         the xp-regalloc-branch for amd64.
11671
11672         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
11673         xp-regalloc-branch for x86.
11674
11675 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
11676
11677         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
11678
11679 2005-07-06  Martin Baulig  <martin@ximian.com>
11680
11681         * mini.c
11682         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
11683         (mono_jit_runtime_invoke): Likewise.
11684
11685 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
11686
11687         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
11688         on x86 too.
11689         
11690         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
11691         without loading their metadata. Reorganize the file format so exception handling+
11692         debug info is kept separate from normal method info. Create MonoJitInfo 
11693         structures for methods lazily.
11694
11695         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
11696         loading metadata.
11697         (x86_class_init_trampoline): Patch AOT class init trampolines too.
11698
11699         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
11700
11701         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
11702         in AOT code.
11703
11704         * mini.h: Bump AOT file version.
11705
11706 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
11707
11708         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11709
11710 2005-07-01  Raja R Harinath  <rharinath@novell.com>
11711
11712         * Makefile.am (check-local): Call semdel-wrapper.
11713
11714 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
11715
11716         * mini-x86.c: Revert the last change as it seems to break the build..
11717
11718 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
11719
11720         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11721         
11722         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
11723
11724 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
11725
11726         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
11727         outside of the macro, so strange stuff doesn't happen with gcc4
11728         (NEW_AOTCONST_TOKEN): Likewise.
11729
11730 2005-06-28  Martin Baulig  <martin@ximian.com>
11731
11732         * mini.c (mini_class_is_system_array): New static method; use this
11733         instead of `klass->parent == mono_defaults.array_class' everywhere
11734         since this also works for the new generic array class.
11735
11736 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11737
11738         * inssel.brg: Remove warnings.
11739
11740 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
11741
11742         * mini-ia64.c: Ongoing IA64 work.
11743
11744         * basic-float.cs: Add float->i1 conversion test.
11745
11746         * iltests.il: Add conv.u4 test.
11747
11748 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * inssel-long.brg: Fix bug caused by last change.
11751
11752 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
11753
11754         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
11755         BSDs.  Allows the x86 JIT to work on OSX86
11756
11757 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
11758
11759         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11760         u4->i8 conversion.
11761
11762         * mini-ia64.c: Ongoing IA64 work.
11763
11764 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11765
11766         * mini-ia64.c: Ongoing IA64 work.
11767
11768         * driver.c: Clean up jit_code_hash as well when using --regression.
11769
11770         * inssel-long.brg: Fix long->i4/u4 conversion rules.
11771
11772         * basic-long.cs: Add tests for long->u4 conversion.
11773
11774 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
11775
11776         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11777         that we do not depend on undefined C behavior: the order stuff
11778         gets evaluated within an expression. Fixes mono when compiled on
11779         GCC 4.
11780
11781 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11782
11783         * *-ia64.*: Ongoing IA64 work.
11784
11785         * aot.c: Lower memory usage while loading AOT methods.
11786
11787         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11788
11789         * mini.h: Bump AOT file format version.
11790
11791 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11792
11793         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11794
11795 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11796
11797         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11798         not on callee assembly). Fixed some comments.
11799
11800 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11801
11802         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11803         it gets proper disassembly.
11804         (emit_method_info): Remove some dead code.
11805
11806         * mini.c (mini_method_compile): Allways allocate the GOT var in
11807         mono_method_to_ir for emulating opcodes.
11808
11809 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11810
11811         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11812         before freeing the code memory. Fixes #74990.
11813
11814         * objects.cs: Add regression test for #74992.
11815
11816         * liveness.c: Extend live ranges of arguments to the beginning of the
11817         method. Fixes #74992.
11818
11819         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11820         so it points into the faulting instruction.
11821
11822 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11825
11826         * *-ia64.*: Ongoing IA64 work.
11827
11828         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11829
11830 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11831
11832         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11833
11834         * *-ia64.*: Ongoing IA64 work.
11835
11836 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11837
11838         * basic-long.cs: Add tests for add/sub.ovf.
11839
11840         * basic.cs: Add tests for sub.ovf.
11841
11842         * *-ia64.*: Ongoing IA64 work.
11843
11844 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11845
11846         * *-ia64.*: Ongoing IA64 work.
11847
11848         * basic.cs: Add conv.ovf.i4.un test.
11849
11850 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11851
11852         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11853         
11854 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11855
11856         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11857
11858 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11859
11860         * *-ia64.*: Ongoing IA64 work.
11861
11862 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11863
11864         * trace.[ch]:
11865         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11866
11867 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11868
11869         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11870
11871 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11872
11873         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11874
11875         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11876         of a call is callable by a near call.
11877
11878 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11879
11880         * mini-ia64.c: Ongoing IA64 work.
11881
11882 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11883
11884         * genmdesc.c: Make the generated array non-static.
11885
11886         * inssel-long.brg: Fix LSHR_IMM rule.
11887
11888         * *-ia64.*: Ongoing IA64 work.
11889
11890         * *-ia64.*: Ongoing IA64 work.
11891
11892 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * *-ia64.*: Ongoing IA64 work.
11895
11896         * *-ia64.*: Ongoing IA64 work.
11897         
11898         * mini-ia64.c: Ongoing IA64 work.
11899
11900         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11901
11902 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11903
11904         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11905         
11906         * objects.cs basic-long.cs: Move some tests to objects.cs.
11907
11908 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11909
11910         * *-ia64.*: Ongoing IA64 work.
11911
11912         * iltests.il: Add a new test.
11913
11914         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11915         newobj. Fixes #75042.
11916
11917 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11918
11919         * *-ia64.*: Ongoing IA64 work.
11920         
11921         * *-ia64.*: Ongoing IA64 work.
11922         
11923         * *-ia64.*: Ongoing IA64 work.
11924
11925         * basic.cs objects.cs: Move tests accessing static variables as well.
11926
11927         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11928
11929 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11930
11931         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11932
11933         * driver.c: Always print failed tests.
11934
11935         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11936         frame pointer.
11937
11938         * *ia64*: Ongoing IA64 work.
11939
11940 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11941
11942         * basic.cs: Add tests for add.ovf. Fix warnings.
11943
11944 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11945
11946         * driver.c (mono_main): Avoid crash if no argument is passed to
11947         --break;  Do not use g_error, but f_printf.   And fix all other
11948         ocurrences of the same crash.
11949
11950 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11951
11952         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11953         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11954         Fixes #74742.
11955
11956 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11957
11958         * *-ia64.*: Add beginnings of IA64 backend.
11959
11960         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11961
11962 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11963
11964         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11965         Fixes #74925.
11966
11967         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11968
11969         * mini-amd64.c: Fix a warning.
11970
11971 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11972
11973         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11974         in float_neg. Fixes #74897.
11975
11976         * mini-amd64.c (emit_call): Fix another near call bug.
11977
11978 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11979
11980         * declsec.c: Keep the appdomain information in the structure. Added a 
11981         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11982         value gets overwritten).
11983         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11984         an MonoAppDomain member to MonoSecurityFrame.
11985         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11986         used in the stack walk. Now use a MonoArray which grow (double) when
11987         it gets full.
11988
11989 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11990
11991         * mini.c: Re-enabled runtime cleanup, since running threads should
11992         now properly stop when exiting.
11993
11994 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11995
11996         * mini-codegen.c: New file contaning the arch-independent local
11997         register allocator. Not used by any architectures yet.
11998
11999         * mini.h linear-scan.c: Merge some changes from the 
12000         mini-xp-local-regalloc branch.
12001
12002 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
12003
12004         * mini-amd64.c (emit_call): Fix calls to native functions when the
12005         runtime is compiled as a shared library. Fixes #74756.
12006
12007         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12008         on a literal field. Fixes #74751.
12009
12010 2005-04-25  Raja R Harinath  <rharinath@novell.com>
12011
12012         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12013
12014 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
12015
12016         * objects.cs: Add missing null casting test.
12017
12018 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
12019
12020         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12021         in wrapper methods. Also rename 'address' variable to 'offset'.
12022
12023 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
12024
12025         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12026         warnings.
12027         
12028         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12029
12030         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12031         work on windows.
12032
12033 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12034
12035         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12036
12037 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12038
12039         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12040         just the last bytes.
12041
12042 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12043
12044         * aot.c (mono_compile_assembly): Fix warning.
12045
12046         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12047         by the _MSC_VER stuff.
12048
12049 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
12050
12051         * inssel-long.brg: Fix #74588.
12052
12053         * cpu-amd64.md: Fix #74591.
12054
12055         * iltests.il: Add new regression tests.
12056
12057 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
12058
12059         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12060         valuetype.
12061
12062 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
12063
12064         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12065
12066         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
12067         from Bill Middleton <flashdict@gmail.com>.
12068
12069 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
12070
12071         * arrays.cs: Add new regression test. Fix warnings.
12072
12073 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
12074
12075         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12076         and leakage in CKFINITE.
12077
12078         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12079         this to a null op since it is called on amd64 too.
12080
12081         * exceptions-amd64.c (get_throw_trampoline): Align stack.
12082
12083         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12084         body since this is not used on amd64.
12085         
12086         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12087
12088         * mini-amd64.c: Remove obsolete fixmes.
12089
12090         * mini.c (print_method_from_ip): Fix debugging support.
12091
12092 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12093
12094         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12095         so that expressions that don't give much gain are not reduced.
12096         * ssapre.h: Likewise.
12097
12098 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
12099
12100         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
12101
12102         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
12103
12104         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
12105
12106 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
12107
12108         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
12109
12110         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
12111
12112 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
12113
12114         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
12115         stack touching.
12116
12117         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
12118
12119         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
12120
12121         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
12122
12123         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
12124         MONO_ARCH_USE_SIGACTION. Fixes #74252.
12125
12126         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
12127
12128         * mini-x86.c: Fix up stack overflow handling.   
12129
12130         * exceptions.cs: Add new regression test.
12131
12132 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
12133
12134         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
12135         mono_jit_thread_attach.
12136
12137         * mini.c (mono_method_to_ir): Verify called method is not abstract.
12138
12139 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
12140
12141         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
12142         avoid calling constructors using callvirt.
12143
12144         * inssel.brg: Fix #74073.
12145
12146 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
12147
12148         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
12149         compilation with non-GCC compilers.
12150         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
12151         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
12152
12153 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
12154
12155         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
12156         klass->interface_offsets (will likely fix bug#74073).
12157
12158 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
12159
12160         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
12161
12162 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
12163
12164         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
12165         to amd64_div_reg_size ().
12166         
12167         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
12168
12169 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
12170
12171         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
12172
12173 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
12174
12175         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
12176
12177 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
12178
12179         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
12180         
12181         * mini.c (mono_precompile_assembly): Load and precompile referenced
12182         assemblies as well. Fixes #74015.
12183
12184 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
12185
12186         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
12187
12188 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
12189
12190         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
12191         a lot of checks and (anyway) permissions cannot work until corlib is 
12192         loaded.
12193
12194 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini-ppc.c: fixed ABI issue on sysv/ppc.
12197
12198 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
12199
12200         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
12201         calls (fixes bug#72824).
12202
12203 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12204
12205         * mini.c: fix tail recursion elimination (see test in bug#73936).
12206
12207 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
12208
12209         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
12210         some fp functions in sse2 mode.
12211
12212 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
12213
12214         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
12215
12216 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
12217
12218         * mini.h mini.c: Add mono_get_jit_tls_key ().
12219
12220         * mini-x86.c: Enable fast TLS support on windows.
12221
12222 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
12223
12224         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
12225         * mini.c: Check for p/invoke method when generating code. If a
12226         p/invoke method, or it's class, isn't decorated with [Suppress
12227         UnmanagedCodeSecurity] then generate code to call System.Security.
12228         UnmanagedDemand (only if the security manager is active).
12229
12230 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
12231
12232         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
12233         last change as it seems to cause strange crashes.
12234         
12235 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12236
12237         * *.c: handle unsafe function pointers where needed.
12238
12239 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
12240
12241         * mini.c (mono_jit_free_method): Remove the fixme too.
12242
12243 2005-03-15  Miguel de Icaza  <miguel@novell.com>
12244
12245         * mini.c: As discussed, make the code actually free the delegate
12246         thunk now, to enable the debugging of delegate problems, use
12247         MONO_DEBUG=1 when running Mono. 
12248
12249         This takes also care of parts of the leaks as seen by Joe.
12250
12251 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
12252
12253         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
12254         thread_tls_offset calculation.
12255
12256 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
12257
12258         * declsec.c: Reworked linkdemand checks for icall. The previous code
12259         was using the declaration code (untrusted) and didn't work as expected
12260         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
12261         specific case.
12262
12263 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * iltests.il: Add new localloc test.
12266
12267         * mini-amd64.c: Handle large stack allocations the same way as on
12268         windows if stack overflow handling is working.
12269         
12270         * mini-amd64.c: Allocate the signal stack using mmap.
12271
12272         * mini.c (sigsegv_signal_handler): Fix reading of context.
12273
12274         * mini-exceptions.c: Fix up stack overflow handling.
12275
12276         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
12277
12278         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
12279
12280         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
12281
12282         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
12283
12284         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
12285         tramp_init functions as they are no longer needed.
12286
12287 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
12288
12289         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
12290         
12291         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
12292
12293         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
12294         
12295         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
12296         support that now.
12297
12298         * mini-ops.h: Add OP_LMUL_IMM.
12299
12300         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
12301         long mul/div opcodes as intrinsic.
12302
12303         * mini-amd64.c (emit_call): Handle the case when the callee might be
12304         an AOT method.
12305
12306 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
12307
12308         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
12309         extra safe.
12310         
12311         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
12312
12313         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
12314
12315 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
12316
12317         * mini.c (mono_codegen): Don't leak here, to help people running
12318         monogrind.
12319
12320 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
12321
12322         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
12323         conversions in sse2 mode.
12324
12325         * basic-float.cs: Add regression test.
12326         
12327         * mini-amd64.c: Reenable sse2.
12328
12329 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * mini-amd64.c: Disable sse2 until some regressions are fixed.
12332
12333 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
12334
12335         * driver.c: Copyright text should include 2005.
12336         
12337 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
12338
12339         * cpu-amd64.md (load_membase): Fix more max lengths.
12340
12341 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
12342
12343         * cpu-amd64.md (load_membase): Fix max length.
12344
12345         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
12346
12347         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
12348
12349         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
12350         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
12351
12352         * basic-float.cs: Add rounding regression test.
12353
12354         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
12355
12356 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
12357
12358         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
12359         structures in registers for pinvoke wrappers.
12360
12361 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
12364
12365 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
12366
12367         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
12368         wrapper to mono_jit_thread_attach.
12369
12370         * mini.c (mini_jit_thread_attach): New jit icall.
12371
12372         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
12373         native->managed wrappers.
12374
12375         * exceptions.cs: Add new regression test.
12376
12377         * mini.c (optimize_branches): Check regions in the cbranch to throw
12378         block case as well. Fixes #73242.
12379
12380 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
12381
12382         * mini.c: thread safety fixes.
12383
12384 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
12387         patching stuff, since delegates use jump trampolines so there is
12388         no caller.
12389
12390         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
12391         jump trampolines.
12392         
12393         * tramp-amd64.c: Fix build.
12394
12395         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
12396         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
12397
12398         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
12399         Rename this to mono_arch....
12400         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
12401
12402         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
12403
12404         * mini-amd64.c (emit_call): If both the caller and the callee is
12405         guaranteed to have 32 bit addresses, emit a normal call.
12406
12407         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
12408
12409         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
12410         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
12411         method_ptr inside delegates.
12412
12413 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
12414
12415         * mini.c (mono_jit_free_method): Free the method info even if the native code is
12416         invalidated. Fixes #73001.
12417
12418         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
12419
12420         * mini-x86.c: Only use stdcall for pinvokes on windows.
12421
12422 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
12423
12424         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
12425         * mini-x86.c: remove unreliable __thread var offset detection,
12426         use the correct accessors and enable by default.
12427
12428 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
12429
12430         * mini.c (mono_jit_free_method): Fix memory leak.
12431
12432 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
12433
12434         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
12435
12436 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
12437
12438         * cpu-amd64.md: Fix lengths of atomic opcodes.
12439
12440 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
12441
12442         * driver.c: try to not imply using ICU is any good.
12443
12444 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
12445
12446         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
12447         functions as inline ops.
12448
12449         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
12450         some Interlocked functions as inline ops.
12451
12452         * mini.c (move_basic_block_to_end): Fix bug in last patch.
12453
12454         * mini.h (MonoBasicBlock): Reorganize fields a bit.
12455
12456         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
12457
12458         * mini.c: Add support for OP_NOT_TAKEN.
12459
12460         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
12461         structures in registers for pinvoke wrappers.
12462
12463         * mini-amd64.c: Fix warnings.
12464
12465 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
12468
12469         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
12470
12471         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
12472         address instead of loading the address from it.
12473
12474         * mini-x86.c: Add support for returning small structs in registers
12475         on Win32. Fixes part of #70864.
12476         
12477 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
12478
12479         * trace.c (get_token): Improve error checking.
12480
12481 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
12484
12485 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
12486  
12487         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
12488         it can be reused for MonoClass.
12489         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
12490         _LINKDEMAND.
12491
12492 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
12493
12494         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
12495         instead of a MonoReflectionMethod. The method information wasn't used
12496         when displaying SecurityException details (but will be now).
12497
12498 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
12499
12500         * Makefile.am : windows build fix.
12501
12502 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
12503
12504         * iltests.il: Add new regression test.
12505
12506         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
12507         #72522.
12508
12509 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
12510  
12511         * mini.c: Moved linkdemand check into helper function check_linkdemand
12512         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
12513         LDFTN, LDVIRTFTN).
12514
12515 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
12516
12517         * declsec.c: Added statistics counter for different kinds of 
12518         LinkDemands.
12519         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
12520         (and commented) declaration.
12521         * mini.c: Added statistics counter for security Demand code 
12522         generation. Added display of security statistics.
12523
12524 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
12525
12526         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
12527         Fix compilation errors under gcc-2.95.
12528
12529 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
12530
12531         * mini.c, driver.c: Use the new jit trampoline hashtable
12532
12533 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12534
12535         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
12536
12537 2005-02-11  Martin Baulig  <martin@ximian.com>
12538
12539         * debug-mini.c (mono_debug_close_method): Free the line number array.
12540
12541 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12542
12543         * aot.c: Break up large methods into smaller ones. Share GOT slots for
12544         icalls.
12545
12546         * mini.h: Bump AOT file format version. 
12547
12548 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
12549
12550         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
12551         APTC and P/Invoke.
12552         * declsec.h: Added macros to get/set lazyly initialized security 
12553         informations about assemblies. Added new enum for different type of
12554         possible LinkDemand violation. Added function to check LinkDemands.
12555         * mini.h: Added a field to MonoCompile to hold any security violation
12556         detected when JITting a method (so it can be thrown later).
12557         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
12558         and CEE_CALLVIRT. Added code to throw exception at the end of
12559         mini_method_compile (note: the exception is unhandled right now).
12560
12561 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
12562
12563         * mini.c, jit-icalls.c: use the managed implementation of
12564         memset for initobj and memset, to avoid managed <-> unmanaged
12565         transitions.
12566
12567 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12568
12569         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
12570         optimization if it would need a GOT var.
12571
12572         * basic.cs: Add tests for constant propagation and switch statements.
12573
12574         * ssa.c: Fix out-of-range constant propagation and switch statements.
12575
12576 2005-02-09    <vargaz@freemail.hu>
12577
12578         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
12579
12580 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
12581
12582         * cpu-amd64.md (load_membase): Fix max length of load_membase.
12583
12584 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12585
12586         * mini.c: update to new signature of mono_class_get_allocation_ftn().
12587
12588 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
12589
12590         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
12591         arithmetic operations.
12592
12593 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
12594
12595         * mini-ppc.c: add a workaround for broken user code that
12596         DllImports vararg functions with non-vararg signatures.
12597
12598 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * mini.c (mono_jit_compile_method_inner): Add detection and a 
12601         meaningfull error message for assemblies written in Managed C++.
12602
12603         * tramp-amd64.c mini-amd64.h: Add support for 
12604         create_trampoline_from_token ().
12605
12606         * aot.c mini-x86.c abcremoval.c: Applied patch from
12607         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12608
12609 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
12610
12611         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
12612         which takes a MonoImage/token as parameter instead of a MonoMethod.
12613
12614         * aot.c: Use the new trampoline for initializing vtables.
12615
12616         * aot.c: Add support for ldfld/stfld_remote wrappers.
12617
12618         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
12619         rules for compare <MEM>, IMM.
12620
12621         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
12622
12623         * aot.c: Handle inherited finalizers correctly.
12624
12625 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
12626
12627         * inssel.brg (stmt): Add a missing _setup_... ().
12628
12629         * aot.c: Save some parts of the class state to the AOT file and use it
12630         to recompute that state when a class is initialized.
12631
12632         * mini.c: Install AOT hooks into the runtime.
12633
12634         * mini.h: Bump AOT file format version.
12635         
12636         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
12637         Fixes #72148.
12638
12639         * iltests.il: Add new test.
12640
12641 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12642
12643         * mini.c: fix typo.
12644
12645 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
12646
12647         * mini.c: setup the statistical profiler in the thread attach
12648         callback to cope with the new single thread code.
12649
12650 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12651
12652         * mini-ppc.c: ensure we have enough room for the profiler
12653         calls (fixed bug#72084).
12654
12655 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
12658         it.
12659
12660 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12661
12662         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
12663
12664 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12665
12666         * ssapre.c: Fixed an issue with down safety (this allows IronPython
12667         to succesfully execute parrotbench).
12668         * ssapre.h: Likewise.
12669
12670 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12671
12672         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
12673         variable for stores to method arguments (fixes a SSAPRE issue).
12674
12675 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12676
12677         * mini.c: handle value types in dup, fixes gen-112.cs.
12678
12679 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
12680
12681         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
12682         sequence for calls in dynamic methods to avoid thunks.
12683
12684 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12685
12686         * mini.c: correctly remove dynamic methods from the hashtable.
12687
12688 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12689
12690         * driver.c: Disabled SSAPRE until fix the bug that appears
12691         in IronPython's parrotbench.
12692
12693 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
12694
12695         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
12696
12697         * mini.c (mono_method_to_ir): Revert the previous change.
12698         
12699         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
12700         when AOT compiling.
12701
12702         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
12703         mono_jit_info_table_find () etc. when running under valgrind.
12704
12705         * inssel.brg: Fix warnings.
12706
12707         * mini-exceptions.c: Fix warnings.
12708
12709 2005-01-31  Martin Baulig  <martin@ximian.com>
12710
12711         * driver.c (compile_all_methods_thread_main): Don't try to compile
12712         generic methods or anything which has type parameters.
12713
12714 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
12715
12716         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
12717
12718         * TestDriver.cs: Add --verbose flags.
12719
12720         * graph.c ssa.c: Fix 64 bit warnings.
12721         
12722         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
12723         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
12724         Fix 64 bit warnings.
12725
12726         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
12727         variable not spotted by gcc.
12728         
12729         * mini-amd64.c inssel-amd64.brg: Applied patch from  
12730         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
12731         X86_COMPARE_MEMBASE opcodes.
12732
12733         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12734
12735 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
12736
12737         * *: MonoMethod->signature might be NULL now. You *MUST* use
12738         mono_method_signature.
12739
12740 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12741
12742         * driver.c (compile_all_methods_thread_main): Compile the methods
12743         without invoking cctors.
12744
12745 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12746
12747         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12748         * basic-calls.cs: test for the above.
12749
12750 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12751
12752         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
12753         MonoJitInfo changes.
12754
12755 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12758         eagerly if it contains dynamic methods.
12759         
12760         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12761
12762         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12763         trace, it is now computed by an icall from trace_ips.
12764         
12765         * mini-exceptions.c: Fix a warning.
12766
12767 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12768
12769         * mini-exceptions.c: don't bother getting stack trace info if
12770         it's not going to be used.
12771
12772 2005-01-27  Raja R Harinath  <rharinath@novell.com>
12773
12774         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12775         ssapre-mini-ops.h.
12776
12777 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12778
12779         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12780
12781         * aot.c: Avoid calling mono_method_get_header () if not needed.
12782
12783         * mini.h: Bump AOT file format version.
12784         
12785         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12786
12787         * mini.c (mono_print_tree): Print more info for calls.
12788
12789 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12790
12791         * declsec.h: Remove warning by adding missing include for marshal.h
12792
12793 2005-01-26  Martin Baulig  <martin@ximian.com>
12794
12795         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12796         `ip' twice.
12797
12798 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12799
12800         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12801         flags.
12802
12803         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12804
12805         * aot.c (mono_compile_assembly): Fix a warning.
12806
12807 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12808
12809         * declsec.c: Look for security attributes on the original MonoMethod 
12810         (and not the wrapped one). This fix permissions on icalls.
12811
12812 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12813
12814         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12815
12816         * mini.c (mono_allocate_stack_slots): Add a fixme.
12817
12818         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12819
12820 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12821
12822         * inssel.brg: optimize casts of sealed types (more
12823         optimizations waiting for fixes in remoting).
12824
12825 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12826
12827         * inssel.brg (stmt): Add another dummy rule.
12828
12829         * driver.c: Fix warnings.
12830
12831         * driver.c (mono_main): If running under valgrind, instruct glib to use
12832         the system allocation functions so valgrind can track the memory
12833         allocated by the g_... functions.
12834
12835         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12836
12837         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12838
12839         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12840
12841         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12842         variables in try regions.
12843
12844         * mini.c (mini_method_compile): Don't disable optimizations on large
12845         methods when AOT compiling.
12846
12847         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12848         allocate stack slots. Not yet used.
12849
12850 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12851
12852         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12853
12854 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12855
12856         * mini-ppc.c: make the branch info relative as the code
12857         buffer can be reallocated.
12858
12859 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12860
12861         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12862         * driver.c: Removed the AOT/security restriction. Now initialize the
12863         security manager (in metadata) if --security is used.
12864         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12865         rather than the pointer to declarative security, when AOT is used.
12866
12867 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12868
12869         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12870         basic blocks, reduced intrinsic exception throwing code size.
12871
12872 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12873
12874         * driver.c (mini_usage): Reorder the usage screen.
12875
12876 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12877
12878         * mini.c (mono_resolve_patch_target): Fix warning.
12879
12880 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12883         previous patch.
12884
12885         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12886
12887         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12888         breaks the amd64 build.
12889
12890         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12891         register allocation. Fixes #71454.
12892
12893         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12894
12895         * arrays.cs: Add new regression test.   
12896
12897 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12898
12899         * ssapre.c: Turned usage of snprintf to GString.
12900         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12901         (I left it on by mistake in my previous commit).
12902
12903 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12904
12905         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12906         on cond branch optimization (fixes bug# 71515).
12907
12908 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12909
12910         * abcremoval.c: Fixed bug 71062.
12911         * abcremoval.h: Likewise.
12912
12913 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12914
12915         * mini.c: Added a new functionality to optimize_branches, the removal
12916         of useless basic blocks, and fixed some problem in the removal of
12917         critical edges; some utility functions added for both purposes.
12918         * ssapre.c: Added complex expression support, and fixed bug 70637.
12919         * ssapre.h: Likewise.
12920         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12921         enabled in SSAPRE.
12922         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12923         * driver.c: Re-enabled SSAPRE.
12924
12925 2005-01-19  Martin Baulig  <martin@ximian.com>
12926
12927         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12928         the result of mono_get_method_constrained().
12929
12930 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12931
12932         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12933         manager.
12934
12935 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12936
12937         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12938         be detected.  Fixes #59296.
12939
12940 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12941
12942         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12943         which can happen. Fixes #71361.
12944
12945 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12946
12947         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12948         manager.
12949
12950 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12951
12952         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12953         appdomain-unload.exe to fail.
12954         
12955         * mini.c: Fix some memory leaks.
12956
12957 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12958
12959         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12960         Fixed bug and sped up some codepaths.
12961
12962 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12963
12964         * mini.c: Fix some memory leaks.
12965
12966         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12967         conversion.
12968
12969         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12970
12971         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12972         #71320.
12973
12974         * iltests.il: Add regression test for #71320.
12975
12976 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12977
12978         * mini.c (mono_codegen): Fix installation of profiler hooks.
12979
12980         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12981
12982 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12983
12984         * mini.h, mini.c, cfold.c: optimize access to enum
12985         readonly fields, too. Eval conditional branches if possible
12986         to perform unreachable code removal in more cases.
12987
12988 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12989
12990         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12991
12992         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12993         code manager.
12994
12995         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12996         WinXP DEP. Fixes #71244.
12997
12998 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13001
13002 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
13003
13004         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13005
13006 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13007
13008         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
13009         changes.
13010
13011         * mini.h: Bump AOT version.
13012
13013         * mini.h (MonoCompile): Change exvar to a hash table.
13014
13015         * mini.c: Allocate a separate exvar for each handler block.
13016
13017         * mini.c: Get rid of the computation of filter_lengths, its not needed.
13018
13019         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13020         ex var with the pending exception and only throw if the two are equal.
13021         Fixes #68552.
13022         
13023         * exceptions.cs: Add tests for rethrow and nested catch clauses.
13024
13025         * mini-x86.c: Fix warnings.
13026
13027         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13028         used by all the ports now.
13029
13030         * aot.c: Add write-symbols and save-temps options.
13031
13032 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13033
13034         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13035
13036 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13037
13038         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
13039         operations.
13040
13041         * tramp-s390.c: Check vtable slot belongs to the domain.
13042
13043         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13044         as per other platforms.
13045
13046         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13047
13048 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13049
13050         * driver.c: we don't run the Main() code in a subthread anymore.
13051
13052 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13053
13054         * mini.c: added experimental rtc support in the statistical
13055         profiler: if the user has the permission, more accurate statistics
13056         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13057         The MONO_RTC value must be restricted to what the linux rtc allows:
13058         power of two from 64 to 8192 Hz.
13059
13060 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13061
13062         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13063
13064 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13065
13066         * mini-ppc.c: better icache flush for smp.
13067
13068 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
13069
13070         * mini-amd64.c (emit_move_return_value): Fix memory leak.
13071
13072         * mini-x86.c (get_call_info): Add the get_call_info () code from the
13073         amd64 port, not yet used.
13074
13075 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13076
13077         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13078         a struct type.
13079
13080 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
13081
13082         * driver.c: Added --security option to activate the security manager.
13083         Right now this will allow code generation for declarative demands and
13084         is disabled when AOT is specified.
13085         * mini.c: Add code generation for declarative security demands.
13086         * mini.h: Add mono_use_security_manager as an extern gboolean.
13087
13088 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13089
13090         * aot.c (mono_compile_assembly): Speed up compilation a bit by
13091         emitting more dense assembly code.
13092
13093         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13094         exception throwing stuff.
13095
13096 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
13097
13098         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
13099         dead code.
13100
13101         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
13102         left in by mistake.
13103
13104         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
13105         fixed.
13106
13107         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
13108
13109         * tramp-*.c: Only patch vtable slots if the object is in the current
13110         domain. Fixes appdomain-unload.exe.
13111
13112         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
13113         
13114         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
13115         x86 branch.
13116
13117 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
13118
13119         * mini.c (reverse_branch_op): New helper function.
13120
13121         * mini.c (optimize_branches): Run the new optimization only on 
13122         platforms which support it. Also reverse all kinds of branches.
13123
13124         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
13125
13126         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
13127         a throw statement.
13128
13129         * mini.c (optimize_branches): Reverse not-equals branches if the false
13130         bblock is a throw. This happens a lot of time with argument checking in
13131         corlib.
13132
13133         * mini.c (mono_codegen): Add support for placing basic blocks after
13134         the function epilogue.
13135
13136         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
13137         function epilogue.
13138         
13139 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
13140
13141         * mini.c (setup_stat_profiler): Only set this up if the platform
13142         supports ITIMER_PROF.
13143
13144 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
13145
13146         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
13147         previous patch.
13148
13149         * inssel.brg: Fix a warning.
13150
13151 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
13152
13153         * mini.c: added support for statistical profiler 
13154         (run with: --profile=default:stat).
13155
13156 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
13159
13160         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
13161
13162         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
13163         related to global registers from the amd64 port.
13164
13165 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
13166
13167         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
13168
13169         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
13170         with global registers.
13171         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
13172
13173         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
13174
13175 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
13176
13177         * debug-mini.c (encode_value): Fix off-by-one.
13178
13179         * aot.c (encode_value): Likewise.
13180
13181         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
13182
13183 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
13184
13185         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
13186         AOT.
13187
13188         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
13189         
13190         * aot.c (emit_method_info): Increase size of temp buffer.
13191
13192         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
13193         the AOT case.
13194
13195 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
13196
13197         * aot.c (emit_method_info): Fix build.
13198         
13199         * aot.c: Further rework of the AOT file format to reduce the size of
13200         the method info data.
13201
13202         * mini.h: Bump AOT file format version.
13203
13204 2004-12-27  Martin Baulig  <martin@ximian.com>
13205
13206         * mini.c (mini_get_method): New static method; call
13207         mono_get_method_full() and mono_get_inflated_method().
13208         (mono_method_to_ir): Use mini_get_method() instead of
13209         mono_get_method_full(). 
13210
13211 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
13212
13213         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
13214
13215 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
13216
13217         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
13218
13219         * inssel-amd64.brg: Add some optimization rules.
13220
13221 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
13222
13223         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
13224         standard not GC'd stuff is fine.
13225
13226 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
13227
13228         * aot.c: Rework the AOT file format to get rid of most of the global
13229         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
13230
13231         * mini.h: Bump AOT file format version.
13232         
13233 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
13234
13235         * mini.h: Bump AOT file format version.
13236
13237         * aot.c (mono_aot_is_got_entry): New function to determine if an 
13238         address is inside a GOT.
13239
13240         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
13241
13242         * cpu-pentium.md: Increase the maximum size of some instructions which
13243         might involve a got access.
13244         
13245         * mini.c (get_method_from_ip): Another debug helper function.
13246
13247         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
13248         when got var accesses are created during the decompose phase.
13249
13250         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
13251
13252         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
13253         argument mini_compile_method and to MonoCompile, and use this to
13254         determine whenever a given method is compiled for AOT. This allows the
13255         other methods compiled during AOT compilation to be free of AOT stuff,
13256         so the backends does not need to add special support for them by
13257         creating a fake GOT etc.
13258
13259         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
13260         longer needed.
13261
13262 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
13263
13264         * mini.c (mono_method_to_ir): It turns out that some of the
13265         x-appdomain wrappers are lax with types, so just ignore this for
13266         all wrappers.
13267
13268         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
13269         at the vtable->klass. If it is non-shared code we can just use the
13270         vtable.
13271
13272 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
13273
13274         * mini-ppc.c: access MonoDomain from tls, too.
13275
13276 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
13277
13278         * declsec.c: Removed unused variable (and related warning ;-)
13279
13280 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
13281
13282         * iltests.il: New test for LDELEMA on an array of ref types.
13283
13284         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
13285         all ldelema's on reftypes.
13286         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
13287         it was the wrong place to put it.
13288
13289         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
13290         register to pop to make this cleaner, at the request of Paolo.
13291
13292 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
13293
13294         * mini-ops.h (OP_GETHASHCODE): New op.
13295
13296         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
13297
13298         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
13299         operation.
13300
13301         For a microbenchmark, this reduces the cost of Hashtable.get_Item
13302         by 25%.
13303         
13304         * mini-x86.c (mono_arch_output_basic_block): Rather than
13305
13306         add ebp, 4
13307
13308         Emit
13309
13310         pop edx
13311
13312         The first is 3 bytes while the second is 1. This saves 36 kb on
13313         mscorlib, quite a big saving. When bootstraping mcs, I was able to
13314         see a small boost because of icache locality.
13315
13316         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
13317
13318 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
13319
13320         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
13321         started code sharing with the generic code.
13322
13323 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
13324
13325         * mini-ppc.c, cpu-g4.md: added code for direct access to
13326         tls data slots.
13327
13328 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
13329
13330         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
13331          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
13332         to OP_TLS_GET.
13333
13334 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
13335
13336         * declsec.c|h: Added functions to cache the declarative stack modifiers
13337         in MonoJitInfo and to create a security frame from a MonoJitInfo 
13338         structure.
13339         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
13340         created. Register internal calls for System.Security.SecurityFrame::
13341         _GetSecurityFrame and _GetSecurityStack.
13342         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
13343         the definitions for the new stack walk/callback mechanism.
13344         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
13345         first security frame for LinkDemands and InheritanceDemands) and
13346         GetSecurityStack for Demands. Both use the new mono_walk_stack code
13347         from lupus.
13348         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
13349         walk initialization (lupus).
13350
13351 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
13352
13353         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
13354         idiom.
13355         (handle_loaded_temps): Do not create a temporary variable for
13356         things that we know are temps. They will never be modified.
13357         (mono_spill_call): Set MONO_INST_IS_TEMP
13358         (mono_emulate_opcode): ditto
13359         (emit_tree): ditto
13360         (mono_method_to_ir.CEE_DUP): ditto
13361
13362 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
13363
13364         * mini.c (type_to_eval_stack_type): Make this handle the void type
13365         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
13366         (emit_tree): use ip_in_bb to special case some common idioms
13367         Update all callers to pass in the IP.
13368         (mono_method_to_ir): Make CEE_CALL* do the above as well.
13369
13370         This gives us a nice 2% speedup in mcs bootstrap.
13371
13372         * mini-x86.c (peephole_pass): Peephole pass to make
13373         mov  [foo], eax
13374         push [foo]
13375
13376         into
13377
13378         mov [foo], eax
13379         push eax
13380
13381         * mini.c (ip_in_bb): new method.
13382         (mono_method_to_ir): use this method rather than doing the hash
13383         lookup ourselves.
13384
13385         * linear-scan.c (mono_linear_scan): When expiring actives, you
13386         don't need to keep around variables that expire on this
13387         instruction. This makes it so that:
13388              a = b + 1
13389         will turn into:
13390              store (ebx add (ebx, 1))
13391         which will become
13392              add ebx, 1
13393
13394 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
13395
13396         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
13397         combination to avoid doing two copies. Fix up problems with previous
13398         patch.
13399
13400         * mini.c: Fix 64 bit warnings.
13401
13402         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
13403
13404 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
13407         changes from the x86 code.
13408
13409         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
13410
13411 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
13412
13413         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
13414         throwing code to reduce its size, unify the AOT and non-aot code and 
13415         get rid of relocations in the AOT case.
13416
13417         * mini-x86.h mini.c exceptions-x86.c 
13418         (mono_arch_get_throw_corlib_exception): New arch specific function to 
13419         raise corlib exceptions which doesn't require relocations in the 
13420         caller.
13421
13422         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
13423
13424 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
13425
13426         * mini.c (mono_emit_method_call): Only allocate the got var when it is
13427         needed.
13428
13429         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
13430         in the AOT case.
13431
13432 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
13433
13434         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
13435         with add function when used from Inc/dec atomic 
13436         functions. Re-enabled optimization on x86.
13437         * mini-ops.h: renamed atomic_add functions to
13438         allow _add to match the Interlocked::Add and
13439         _add_next to match Interlocked::Inc/Dec.
13440
13441 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
13442
13443         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
13444         linking of BBs to the end BB, and enabled SSAPRE also with
13445         consprop and copyprop (which was prevented by that bug).
13446
13447 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
13448
13449         * mini-x86.c: disabling the Interlocked optimizing code. 
13450
13451 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
13452
13453         * aot.c (load_aot_module): Move reading of got_addr after the AOT
13454         file version check.
13455         
13456 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
13457
13458         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
13459         interlocked optimization due lack of support on x86, rewrote 
13460         exchange to take into account that base may be in eax.
13461         
13462         xsp works again; activated Interlocked optimizing code.
13463         
13464 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
13465
13466         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13467
13468 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
13469
13470         * mini-ops.h: Add new opcodes.
13471
13472         * mini.h: Add new patch types. Add got_var to MonoCompile.
13473
13474         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
13475         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
13476         make it work with all kinds of patchable code.
13477
13478         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
13479         address of the GOT, and referencing entries in the GOT.
13480
13481         * mini.c: Add code to load the GOT address if needed by an opcode.
13482
13483         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
13484         independent AOT code on the x86 using an elf-style Global Offset Table.
13485
13486 2004-12-14  Raja R Harinath  <rharinath@novell.com>
13487
13488         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
13489
13490 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13491
13492         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
13493         when running xsp.
13494
13495 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
13496
13497         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
13498         of Interlocked:Increment/Decrement/Add as inline ops.
13499         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
13500
13501 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
13502
13503         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
13504         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
13505
13506 2004-12-12  Duncan Mak  <duncan@ximian.com>
13507
13508         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
13509         again. `patch_info->table_size' is no longer valid after Zoltan's
13510         commit #37636.
13511
13512 2004-12-12  Martin Baulig  <martin@ximian.com>
13513
13514         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
13515         if we are the "real" method, ie. not an inlined method inside it.
13516
13517 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
13518
13519         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
13520         before we look in the special fields table. This fixes
13521         ../tests/thread-static-init.cs.
13522
13523 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13524
13525         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
13526         for Array get_Rank and get_Length. Fixes bug #70465.
13527
13528 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
13531         separate structure to reduce the size of MonoJumpInfo.
13532
13533 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
13534
13535         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
13536
13537 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
13538
13539         * mini.c (mini_get_inst_for_method): Changed to allow ports
13540         to return a MonoInst instead of opcode 
13541         (renamed mini_get_opcode_for_method to better reflect the new functionality)
13542         
13543         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
13544         Allow ports to return a created MonoInst instead of op-code, will enable
13545         new optimizations.
13546         (renamed mini_get_opcode_for_method to better reflected the functionality)
13547
13548 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
13549
13550         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
13551
13552 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13553
13554         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
13555         Fixes #69985.
13556
13557 2004-12-08  Martin Baulig  <martin@ximian.com>
13558
13559         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
13560         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
13561
13562 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13563
13564         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
13565         correctly.
13566
13567         * exceptions.cs: Disable some tests which depend on properties of x86 fp
13568         arithmetic.
13569
13570 2004-12-08  Raja R Harinath  <rharinath@novell.com>
13571
13572         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
13573
13574 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
13575
13576         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
13577         bug introduced by the previous patch.
13578
13579 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13580
13581         * mini-ppc.c, objectc.cs: handle large structs passed by value
13582         (fixes bug #69972).
13583
13584 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13585
13586         * mini-ppc.c: OP_ARGLIST implementation from
13587         Geoff Norton  <gnorton@customerdna.com>.
13588
13589 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13590
13591         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
13592         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
13593
13594 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13595
13596         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
13597
13598 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13599
13600         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
13601         support.
13602
13603 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
13604
13605         * mini-sparc.c: Zero out localled-ed memory.
13606
13607         * iltests.il: Add tests for zeroing out localloc-ed memory.
13608
13609 2004-12-04  Martin Baulig  <martin@ximian.com>
13610
13611         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
13612         mono_method_get_signature_full().       
13613
13614 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
13615
13616         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
13617         and some utility functions (always for SSAPRE), integrated SSAPRE.
13618         * mini.h: Likewise.
13619         * driver.c: Added ssapre option.
13620         * ssa.c: Small fix on OP_ARG handling.
13621         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
13622         * Makefile.am: Likewise.
13623
13624 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
13625
13626         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
13627         now in the xp code.
13628
13629         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
13630         icall.
13631
13632 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13633
13634         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
13635         
13636         * cpu-s390.md : Increase instruction length of oparglist.
13637
13638         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
13639
13640 2004-11-30  Martin Baulig  <martin@ximian.com>
13641
13642         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
13643         virtual generic methods.  We call a special helper_compile_generic_method()
13644         icall to retrieve the method from the vtable, inflate and compile
13645         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
13646
13647         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
13648
13649 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
13650
13651         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
13652
13653 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
13654
13655         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
13656         Fixes #69929.
13657
13658 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
13659
13660         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
13661         platforms with PIC aot.
13662
13663 2004-11-28  Martin Baulig  <martin@ximian.com>
13664
13665         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
13666         Fixes gen-112.cs.
13667
13668 2004-11-28  Martin Baulig  <martin@ximian.com>
13669
13670         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
13671         the result of mono_type_get_underlying_type() to check whether
13672         we're byref.
13673
13674 2004-11-26  Martin Baulig  <martin@ximian.com>
13675
13676         * mini.c
13677         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
13678         in the g_assert().
13679
13680 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
13681
13682         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
13683         the same way as the other arguments so they won't get clobbered.
13684
13685         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
13686         calls through R11 since it is clobbered by the trampoline code.
13687
13688 2004-11-26  Raja R Harinath  <rharinath@novell.com>
13689
13690         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
13691         pick up in-tree mscorlib.dll.
13692
13693 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
13694
13695         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
13696
13697         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
13698         runtime data/code are now stored in a table similar to the GOT in ELF. 
13699         This allows the code itself to be position independent.
13700
13701         * aot.c: Fix loading of referenced assemblies after the lazy assembly
13702         loading changes.
13703
13704         * aot.c: Attach ELF type (object/function) directives to all global
13705         symbols.
13706
13707         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
13708
13709         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
13710
13711         * mini-amd64.h: Turn on PIC AOT code.
13712
13713         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
13714         returning the offset within an OP_AOTCONST instruction where the GOT
13715         offset needs to be added.
13716
13717         * mini.h: Bump AOT file format version.
13718
13719 2004-11-25  Martin Baulig  <martin@ximian.com>
13720
13721         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
13722         uninflated generic methods.
13723
13724 2004-11-25  Martin Baulig  <martin@ximian.com>
13725
13726         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
13727
13728 2004-11-24  Martin Baulig  <martin@ximian.com>
13729
13730         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
13731         original klass (this only applies for generic instances).
13732
13733 2004-11-24  Martin Baulig  <martin@ximian.com>
13734
13735         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13736         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13737         that array).
13738
13739 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
13740
13741         * mini.c (mono_method_to_ir): Disable inlining for methods containing
13742         localloc. Fixes #69678.
13743
13744         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13745         
13746 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
13747
13748         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13749         used SSE registers on pinvoke calls. Fixes #69774.
13750
13751 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
13752
13753         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13754         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
13755
13756 2004-11-23  Raja R Harinath  <rharinath@novell.com>
13757
13758         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13759         Refer directly to the mcs/ tree.
13760
13761 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13762
13763         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13764         Check if a trampoline for a synchronized method is required. 
13765
13766 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13767
13768         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13769         with localloc if needed. Throe arithmetric exception in
13770         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13771         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
13772
13773 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
13774
13775         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13776         types before switching on type.  Fixes #69622.
13777
13778 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13779
13780         * Makefile.am (check-local): New.  Integrate into 'make check'.
13781         (MCS,RUNTIME): Define using in-tree mono and mcs.
13782         (ILASM): New.
13783         (%.exe): Use $(ILASM).
13784
13785 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13786
13787         * mini-ppc.c: adjust initial prolog size (bug #69691).
13788
13789 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13790
13791         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13792         #69664.
13793
13794 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13795
13796         * Makefile.am (clean-local): Rename from 'clean'.
13797
13798 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13799
13800         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13801         to mono_arch_is_int_overflow. 
13802         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13803         SIGFPE events.
13804
13805 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13806
13807         * declsec.c|h: New files to support declarative security attributes.
13808         Added function to check if a method has (applicable) security.
13809         * mini.c|h: Add check for declarative security attributes in
13810         mono_method_check_inlining.
13811         * Makefile.am: Added declsec.c and declsec.h to the build.
13812
13813 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13814
13815         * mini.c, mini.h: update to keep dynamic code info per-domain.
13816
13817 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13818
13819         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13820         (mini_init): Get rid of it from here too.
13821
13822 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13823
13824         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13825         implemented OP_RETHROW (patch by Geoff Norton
13826         <gnorton@customerdna.com>).
13827
13828 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13829
13830         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13831         between appdomains.  Fixes appdomain-unload on PPC.
13832
13833 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13834
13835         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13836         mini-exceptions.c: handle the new wrapper types.
13837         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13838         token value as a MonoClass* when compiling a wrapper.
13839         mono_jit_create_remoting_trampoline now takes an additional
13840         MonoRemotingTarget parameter.
13841         
13842 2004-11-10  Martin Baulig  <martin@localhost>
13843
13844         * mini.c (mono_method_to_ir): Use `generic_container->context'
13845         rather than creating a new one.
13846
13847 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13848
13849         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13850
13851         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13852
13853 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13854
13855         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13856         the experimental aot cache stuff.
13857
13858 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13859
13860         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13861         mini-exceptions.c: update to exception clause structure changes.
13862
13863 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13864
13865         * exceptions-x86.c (throw_exception): Fix warnings.
13866
13867         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13868         for OP_RETHROW.
13869
13870 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13871
13872         * exceptions-sparc.c (get_throw_exception): Really fix this.
13873
13874 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13875
13876         * tramp-*.c: we no longer support icalls without wrappers, so
13877         a bit of code can be removed here
13878
13879 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13880
13881         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13882         patch.
13883
13884         * cpu-sparc.md: Add op_rethrow.
13885
13886         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13887
13888         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13889
13890         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13891         * mini-ops.h: Add OP_RETHROW.
13892
13893         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13894
13895         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13896
13897 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13898         
13899         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13900         Makes the output much easier to read
13901
13902 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13903
13904         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13905         prevents another huge leak when compiling with ssa. Secondly, the
13906         performance of doing this rather than freeing the lists is much
13907         better. GList does a lock every time you allocate a list link,
13908         so that it can use a memory pool. So, it is better to just use
13909         a memory pool of our own.
13910         
13911         * ssa.c, linear-scan.c: replace g_list_remove_link with
13912         g_list_delete.  The remove one does not free the GList, so we were
13913         leaking memory. On -O=all --compile-all with corlib, this cut down
13914         3 MB of allocations.
13915
13916 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13917
13918         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13919
13920         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13921
13922         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13923         into a new function mono_create_jit_trampoline ().
13924
13925 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13926
13927         * trace.c (get_spec): Allow tracing of classes without a namespace.
13928
13929 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13930
13931         * mini.c: Fix pointer overwrite in mini_method_compile.
13932
13933 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13934
13935         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13936         The darwin ABI needs some special handling for 1 and 2 byte structs
13937         Lets use lbz/lhz instead of lwz everywhere.
13938         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13939         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13940         Use stb/sth for the former, and put the latter always on stack instead of in
13941         argument registers.
13942
13943 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13944
13945         * trace.c (is_filenamechar): Add '_'.
13946
13947 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13948
13949         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13950
13951         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13952
13953 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13954
13955         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13956         depends on libmonogc. Fixes #68805.
13957
13958 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13959
13960         * mini.c (mono_jit_free_method): Provide extra information for
13961         this error.  Currently this leaks, but will be turned into a
13962         developer option in the future.
13963
13964 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13965
13966         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13967
13968 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13969
13970         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13971         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13972         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13973
13974 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13975
13976         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13977         trampolines for AOT code.
13978
13979 2004-10-22    <vargaz@freemail.hu>
13980
13981         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13982         constructed types. Fixes #68136.
13983
13984 2004-10-21  Martin Baulig  <martin@ximian.com>
13985
13986         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13987         if it returns true, unwind the stack to the call instruction.
13988
13989 2004-10-21    <vargaz@freemail.hu>
13990
13991         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13992
13993         * mini.h: Bump AOT version number.
13994
13995         * objects.cs: Add another test for unbox trampolines.
13996
13997         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13998         valuetype methods.
13999
14000 2004-10-20    <vargaz@freemail.hu>
14001
14002         * driver.c: Add SHARED to the set of optimizations tested.
14003
14004         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14005
14006         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14007         used by CEE_NEWARR.
14008
14009         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14010
14011 2004-10-20  Martin Baulig  <martin@ximian.com>
14012
14013         * mini-exceptions.c (mono_handle_exception): Call
14014         mono_debugger_handle_exception() to tell the debugger about
14015         catch/finally clauses.
14016
14017 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
14018
14019         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14020
14021         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14022         #68447.
14023
14024 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
14025
14026         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14027         methods as their native size, fixed bug #57543, #57545.
14028         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14029         This saves a temporary register and mullw call down into 1 (minor perf
14030         increase for cases like sum = sum * 5;  This use to translate into:
14031             li r11,5
14032             mullw r28,r28,r11
14033         It now translates to
14034             mulli r28,r28,5
14035
14036 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
14037
14038         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14039         #68388.
14040
14041 2004-10-11  Martin Baulig  <martin@ximian.com>
14042
14043         * mini.c (mono_method_to_ir): If we're a generic method, get the
14044         MonoGenericContainer from our MonoMethodNormal and create a
14045         MonoGenericContext from it.
14046
14047 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
14048
14049         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14050
14051         * basic-long.cs: Add test for checked i8->i2 cast.
14052
14053 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14054
14055         * inssel-ppc.brg: added a couple of speedup rules.
14056
14057 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
14058
14059         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14060         to speed up rebuilds.
14061
14062 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14063
14064         * mini-s390.c: Minor fix to OP_OR_IMM.
14065
14066 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
14067
14068         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14069         better. Fixes appdomain-unload.exe on sparc.
14070
14071 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
14072
14073         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14074         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14075         see bug 67324.
14076
14077 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
14078
14079         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14080
14081 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
14082
14083         * mini.c: Always generate a field read/write wrapper for members
14084         of the class MarshalByRefObject since the actual instance could
14085         be a CBO.
14086
14087 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14088
14089         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14090
14091 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14092
14093         * driver.c mini.h trace.c: Move the setting of the main assembly into
14094         a separate function called mono_trace_set_assembly () and call it after
14095         actually loading the main assembly. Fixes #66872.
14096
14097 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
14098
14099         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
14100         using the code manager.
14101
14102 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
14103
14104         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
14105
14106 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
14107
14108         * cpu-amd64.md: Fix bug in previous patch.
14109         
14110         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
14111         #66650.
14112
14113 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
14114
14115         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14116         mini-exceptions.c: updates for changed stack walk interface.
14117
14118 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14119
14120         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
14121
14122 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
14123
14124         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
14125
14126 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * driver.c (mini_regression_list): Do not call mono_assembly_close 
14129         since assemblies can't be unloaded.
14130         
14131 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
14132
14133         * cpu-amd64.md: Fix more instruction lengths.
14134
14135         * cpu-amd64.md: Fix lengths of some instructions.
14136
14137 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
14138
14139         * inssel.brg: Make the array ldelema check aot friendly.
14140
14141 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
14142
14143         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
14144
14145         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
14146
14147 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
14148
14149         * mini-x86.c: Fix build.
14150
14151         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
14152         mono_type_get_underlying_type () helper function to simplify code.
14153         
14154 2004-09-09  Martin Baulig  <martin@ximian.com>
14155
14156         * mini-amd64.c: Don't access `type->data.klass' directly, call
14157         mono_class_from_mono_type() instead since the type may be a
14158         generic instance.
14159
14160 2004-09-09  Martin Baulig  <martin@ximian.com>
14161
14162         * mini-amd64.c (get_call_info): Fix support for generic instances.
14163         (add_valuetype): Use mono_class_from_mono_type() to get the class
14164         since we can be a generic instance.
14165
14166 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
14167
14168         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
14169
14170 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14171
14172         * liveness.c: reset spill costs on each scan: bug 62107
14173
14174 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
14175
14176         * exceptions-sparc.c (mono_arch_find_jit_info): remove
14177         unnecessary line that doesn't compile
14178
14179 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
14180
14181         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
14182         trampolines, make them call an error function so people can fix their
14183         code.
14184
14185 2004-09-06  Martin Baulig  <martin@ximian.com>
14186
14187         * mini.c (mono_method_to_ir): When initializing locals, handle a
14188         generic instances like a valuetype if it's a valuetype and like a
14189         class if it's a class.
14190
14191 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
14192
14193         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
14194         stack. Fixes #64674.
14195
14196         * exceptions.cs: Add test for unwinding of call arguments.
14197
14198 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
14199
14200         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
14201         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
14202         set the carry/borrow flag). The sparc and s390 implementations
14203         can now use optimized versions (and simplify the code). ppc bugfixes.
14204
14205 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
14206
14207         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
14208
14209 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
14210
14211         * inssel-amd64.brg: Remove leftover 32 bit rule.
14212
14213         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
14214
14215 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
14216
14217         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
14218         mono_arch_find_jit_info functions into a new function. Fix a memory
14219         leak.
14220
14221         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
14222         refactored code.
14223         
14224 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
14225
14226         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
14227         as well.
14228         
14229         * exceptions.cs: Add array size tests.
14230
14231         * mini.c: Allocate a separate icall wrapper for each arity of 
14232         mono_array_new_va. Fixes #59509.
14233
14234         * exceptions.cs: Add testcase for 64578.
14235
14236         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
14237
14238         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
14239         
14240 2004-09-02  Martin Baulig  <martin@ximian.com>
14241
14242         * mini.c (mono_method_to_ir): When initializing the locals, call
14243         handle_initobj() on the generic instance itself, not its
14244         underlying type.
14245
14246 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
14247
14248         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
14249         MonoJitInfo for dynamic methods.
14250
14251         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
14252
14253         * mini.c: Add support for freeing JIT data for dynamic methods.
14254         
14255 2004-09-01  Martin Baulig  <martin@ximian.com>
14256
14257         * mini-x86.c (is_regsize_var): Added support for generic
14258         instances.
14259         (mono_arch_emit_prolog): Make this compile again, use
14260         `x86_push_imm_template (code)'.
14261
14262 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
14263
14264         * mini-x86.c: make all push_imm instructions that get
14265         patched always emit the long form
14266
14267 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
14268
14269         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
14270         in a per-domain hash.
14271
14272         * mini-amd64.c (merge_argument_class_from_type): Handle generic
14273         types.
14274
14275 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
14276
14277         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
14278         work.
14279         
14280         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
14281         work.
14282
14283         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
14284         Beginnings of SSE2 support.
14285
14286         * exceptions.cs: Add more tests for checked int<->uint casts.
14287
14288 2004-08-28  Martin Baulig  <martin@ximian.com>
14289
14290         * mini-x86.c (mono_arch_instrument_epilog): Added support for
14291         generic instances.
14292
14293         * mini.c
14294         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
14295         Handle generic instances recursively.
14296
14297 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
14298
14299         * iltests.il: test for conv.u8 on a constant
14300
14301 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
14302
14303         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
14304         LCONV_x4 (shrun_32 (membase)).
14305
14306 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
14307
14308         * inssel-x86.brg: c&p rules for push/setret of long
14309
14310 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
14311
14312         * inssel-x86.brg: c&p rules for compare (base, regvar) and
14313         compare (regvar, base)
14314
14315         * inssel-x86.brg: more burg love
14316
14317         * inssel.brg: more cleanup
14318
14319         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
14320
14321 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
14322
14323         * basic-long.cs, basic-calls.cs: new tests for optimization.
14324
14325 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
14326
14327         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
14328         patch.
14329
14330 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
14331
14332         * mini-amd64.c (read_tls_offset_from_method): Add another case.
14333         
14334 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
14335
14336         * inssel.brg (mini_emit_memcpy): use 
14337         NO_UNALIGNED_ACCESS to disable memcpy optimization
14338
14339 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
14340
14341         * mini-amd64.c: Handle generic types in various places.
14342
14343         * mini.c (mono_method_to_ir): Handle generic types in init locals.
14344
14345 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
14346
14347         * mini.c (handle_box): Fix warning.
14348
14349         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
14350
14351         * mini-amd64.h: Enable the emit_state optimization.
14352
14353         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
14354
14355         * mini-amd64.c: Add some new 64 bit peephole opts.
14356
14357         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
14358
14359         * cpu-amd64.md: sreg1 of div instructions must be %rax.
14360
14361         * mini-amd64.c: Register allocator fixes.
14362
14363         * mini.c: Add an optimization to emit_state to avoid allocation of new
14364         registers on some platforms.
14365
14366 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
14367
14368         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
14369
14370         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
14371         allocation. Fixes #63085.
14372
14373         * basic-long.cs: Add new regression test.
14374
14375         * mini-amd64.c: Register allocator improvements.
14376
14377 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
14378
14379         * mini-amd64.c (read_tls_offset_from_method): Add another code
14380         sequence.
14381
14382         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
14383         instruction sequence for nullifying class init trampolines.
14384
14385         * objects.cs: Add new regalloc test.
14386
14387         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
14388
14389 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
14390
14391         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
14392         
14393         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
14394         arguments.
14395
14396         * driver.c: Fix profiling after TLS changes.
14397         
14398         * driver.c (mono_main): Set mono_stats.enabled if needed.
14399
14400         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
14401         CEE_BOX.
14402
14403 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
14404
14405         * mini-x86.c: use a 1 op rather than a 2 op tls access
14406         instruction -> faster.
14407
14408 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
14409
14410         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
14411         x86 backend.
14412
14413 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
14414
14415         * exceptions-sparc.c (throw_exception): fix typo
14416
14417 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14418
14419         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
14420         set tree->dreg correctly with tls. Allow any
14421         register to be used.
14422
14423         * mini-x86.c (read_tls_offset_from_method): add new code
14424         generation pattern seen with GCC.
14425
14426
14427 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14428
14429         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
14430         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14431         exceptions-sparc.c: fix some performance issues in exception
14432         handling and setting of the stack trace for exceptions that were
14433         already thrown.
14434
14435 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
14436
14437         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
14438         x86 backend.
14439         
14440         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
14441         registers.
14442
14443 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14444
14445         This patch inlines tls access, when possible.
14446         
14447         * mini.h: new arch functions for TLS intrinsics.
14448         All platforms updated with a stub.
14449
14450         * mini.c: use the new intrinsics
14451
14452         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
14453         arch specific intrinsic for tls variables
14454
14455 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
14456
14457         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
14458         under windows.
14459
14460 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14461
14462         * mini.c: thread local allocation
14463
14464 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
14465
14466         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
14467
14468         * Makefile.am: Link against the static version of libmonogc.
14469         
14470         * Makefile.am: Link the static versions of the convenience libraries
14471         into the mono executable.
14472
14473         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
14474
14475 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
14476
14477         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
14478         on integer overflow.
14479
14480         * mini-amd64.c: Reorganize function call code.
14481
14482         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
14483
14484 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14485
14486         * inssel-x86.brg: use xor eax,eax.
14487         
14488         * basic.cs: new tests
14489
14490 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14491
14492         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
14493         in exception throwing code.
14494         
14495 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14496
14497         * inssel-x86.brg: use xor esi,esi.
14498
14499 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14500
14501         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
14502         can trace methods compiled during mini_init () too.
14503
14504         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
14505         CEE_CONV_U4.
14506
14507 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14508
14509         * Makefile.am: static link on x86 (r=zoltan)
14510
14511 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14512
14513         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
14514         code since it causes some programs to fail.
14515
14516 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
14517
14518         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
14519
14520 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
14521
14522         * mini.c: ovfops_op_map - add STACK_OBJ case for
14523         CONV_I 
14524         * basic.cs: add test_0_pin_string as test
14525         case for above.
14526
14527 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
14528
14529         * Makefile.am: build C# if srcdir != builddir
14530
14531 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14532
14533         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
14534         fall-through blocks.
14535
14536 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14537
14538         * driver.c: enable loop by default again and include abcrem in -O=all.
14539
14540 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
14541
14542         * iltests.il: Add some localloc tests.
14543
14544         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
14545
14546         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
14547         Fixes #62574.
14548
14549         * inssel-amd64.brg: Add some optimizations.
14550
14551         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
14552         for gcc-3.4.
14553
14554         * Makefile.am: Statically link mono against libmono on AMD64.
14555         
14556         * mini-amd64.c inssel-amd64.brg: Optimizations.
14557
14558 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
14559
14560         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
14561
14562         * tramp-amd64.c: Patch calling code in trampolines.
14563
14564 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
14565
14566         * mini-amd64.c: pinvoke struct passing fixes.
14567
14568 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
14569
14570         * mini-sparc.c: redo change, make mono_arch_cpu_init call
14571         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
14572
14573 2004-08-05  Duncan Mak  <duncan@ximian.com>
14574
14575         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
14576         CEE_LDELEM_ANY.
14577
14578 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14579
14580         * mini-amd64.c (emit_move_return_value): Move return value for normal
14581         calls too.
14582
14583 2004-08-05  Martin Baulig  <martin@ximian.com>
14584
14585         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
14586         `type->type'; just modify `type' itself when dealing with enums
14587         and generic instances.
14588         (check_call_signature): Make `simple_type' a `MonoType *'.
14589
14590 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14591
14592         * mini.c: Use OP_PADD to add offsets to addresses.
14593
14594         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
14595
14596 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
14597
14598         * mini-sparc.c (mono_arch_emit_epilog): fix check
14599         for folding last op into restore instruction
14600
14601 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14602
14603         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
14604         helper methods using the code manager.
14605         
14606         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
14607
14608         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
14609
14610 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14611         
14612         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
14613           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
14614
14615         * mini-s390.c: fix tail processing
14616
14617 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
14618
14619         * mini-ppc.c: mul.ovf.un exception name fix.
14620
14621 2004-08-03  Martin Baulig  <martin@ximian.com>
14622
14623         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
14624         instances; before jumping to `handle_enum', also modify `ptype'.
14625
14626 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
14627
14628         * cpu-sparc.md: fcall maximal length too small.
14629
14630 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
14631
14632         * mini-amd64.c mini.h: Add initial support for passing/returning 
14633         structures to/from pinvoked methods.
14634
14635 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
14636
14637         * mini-ppc.c: reg allocator fix.
14638
14639 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
14640
14641         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
14642
14643         * inssel.brg: Optimize memset on 64 bit machines.
14644
14645         * mini-amd64.c: Fix some vararg cases.
14646
14647 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14648
14649         * mini-s390.c: Corrected macro in emit_float_to_int
14650
14651         * s390-abi.cs: Tests to exercise the s390 ABI
14652
14653 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14654
14655         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
14656         caller saved regs.
14657
14658         * basic.cs: Add a test for add.ovf.un.
14659
14660 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
14661
14662         * mini-sparc.c: add case for OP_IDIV_UN
14663
14664 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14665
14666         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
14667         
14668         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
14669
14670 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
14671
14672         * basic.cs: regression tests.
14673
14674         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
14675         regressions.
14676
14677 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14678
14679         * basic.cs: Add a new test.
14680
14681         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
14682         and AOT. Various fixes and optimizations.
14683
14684         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
14685
14686 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
14687
14688         * mini-ppc.c: make sure temp regs are not used for global reg
14689         allocation.
14690
14691 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
14692
14693         * cpu-sparc.md: conv_i8 fix for 64bits
14694
14695         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
14696
14697 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
14698         
14699         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
14700         add opcode for cmp BYTE PTR [eax], imm.
14701
14702         * inssel.brg: Make memcpy and memset takes bases.
14703
14704 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14705
14706         * *-amd64.*: More AMD64 work.
14707         
14708 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14709
14710         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
14711         add a compare-not-equal opcode.
14712         
14713 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
14714
14715         * mini.c: Use mono_init_from_assembly instead of mono_init.
14716         
14717 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14718
14719         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
14720
14721         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
14722
14723         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
14724
14725         * inssel.brg: 64 bit fixes.
14726
14727         * mini.h (MonoCallInst): Add some AMD64 specific data.
14728
14729         * mini.h: Add some OP_P opcodes.
14730
14731 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14732
14733         * basic.cs: tests for 61797 and 61740
14734
14735 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14736
14737         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14738         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14739
14740 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
14741
14742         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14743
14744         * *-amd64*.*: Ongoing AMD64 work.
14745
14746 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14747
14748         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14749
14750         * *-amd64*: Ongoing AMD64 work.
14751
14752         * mini-arch.h: Add AMD64 support.
14753
14754         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14755
14756         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14757
14758         * mini-ops.h: Add new opcodes.
14759
14760         * Makefile.am: Add AMD64 support.
14761
14762         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14763         rules into the inssel-long*.brg files.
14764
14765         * *-amd64.*: Add beginnings of AMD64 backend.
14766
14767 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
14768
14769         * mini.c (print_dfn): commenting out the code that prints
14770         the cil. With -O=deadce, this makes -v -v crash.
14771         
14772         * cpu-pentium.md: make checkthis have a length of 2
14773
14774 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
14775
14776         * mini-sparc.h: fix implementations of __builtin
14777         functions for Sun compiler for V9.
14778
14779 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14780
14781         * mini.c: use the new stelem.ref wrapper
14782         * exceptions.cs, arrays.cs: new stelem.ref tests
14783
14784 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14785
14786         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14787         new XSP should work with these changes).
14788
14789 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14790         
14791         * inssel-{long32,x86,}.brg: trivial optimizations.
14792         
14793 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14794
14795         * mini.c: load value when emitting box operation in
14796         constrained calls.
14797
14798 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14799
14800         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14801         is one byte shorter than cmp DWORD PTR [eax], 0.
14802
14803 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14804
14805         * inssel-ppc.brg: arguments on the stack are always
14806         relative to the stack pointer (spotted by Neale Ferguson).
14807
14808 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14809
14810         * exceptions-x86.c: delay appending the method name to the trace until
14811         after mono_jit_info_table_find is called, as this gets the real
14812         MonoMethod.
14813
14814 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14815
14816         * aot.c: register roots
14817
14818 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14819
14820         * aot.c : I could just use PLATFORM_WIN32 flag.
14821
14822 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14823
14824         * aot.c : Reverting the previous fix. This time it broke linux build.
14825
14826 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14827
14828         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14829
14830 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14831
14832         * mini.c (handle_stack_args): Remove some more debugging code.
14833         
14834         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14835
14836         * driver.c mini.h aot.c: Allow additional options to be specified with
14837         --aot and pass them to mono_compile_assembly.
14838
14839         * aot.c: Add experimental code to AOT compile all loaded assemblies
14840         on demand and save the code into a cache in the filesystem.
14841
14842         * aot.c: Add support for more wrapper methods.
14843         
14844         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14845         58863.
14846
14847         * cpu-*.md: Remove removed opcodes.
14848
14849         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14850         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14851         related icalls to marshal.c.
14852
14853 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14854
14855         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14856
14857         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14858
14859         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14860
14861 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14862         * liveness.c: If liveness is recomputated we need to reset the information
14863         for each variable. This way, if the liveness range has been narrowed
14864         by optimizations that happened after the last computation, we can return
14865         a smaller range.
14866         
14867         For example, if you have
14868         
14869         {
14870                 int i = 0;
14871                 
14872                 // Tons of code that does not affect i
14873                 
14874                 i = foo ();
14875                 ...
14876         }
14877         
14878         i = 0 is dead code and will be removed by SSA. However, when
14879         linear scan gets to the code, i will still appear to be live
14880         throughout the entire block. This prevents good register allocation.
14881
14882 2004-07-06  Martin Baulig  <martin@ximian.com>
14883
14884         * debug-mini.c (mono_debug_init_method): Allow
14885         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14886         (mono_debug_add_icall_wrapper): New method.
14887
14888         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14889
14890 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14891
14892         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14893         optimization.
14894
14895 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14896
14897         * aot.c (mono_aot_load_method): Fix loading of debug info.
14898
14899 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14900
14901         * aot.c: Add logging support.
14902
14903 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14904
14905         * mini.h: Add prototype for mono_print_method_from_ip.
14906
14907         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14908
14909         * inssel.brg: 64 bit fixes.
14910
14911         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14912         inssel-long32.brg.
14913
14914         * Makefile.am: Add SPARC64 support.
14915
14916 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14917
14918         * aot.c: Fix alignment problems on 32 bit platforms.
14919
14920 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14921
14922         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14923         SPARC64.
14924
14925         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14926         problems.
14927
14928         * mini.h: Bump AOT file version. Some 64 bit fixes.
14929
14930 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14931
14932         * inssel-sparc.brg: Add new rule to avoid register moves.
14933
14934         * inssel.brg: Add ldind_to_load_membase helper function.
14935
14936 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14937
14938         * mini.c: OffsetToStringData intrinsic.
14939         
14940 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14941
14942         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14943
14944         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14945         regression tests.
14946
14947         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14948 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14949
14950         * mini.c: reinstated mono_compile_get_interface_var()
14951         on x86, too, since the change breaks the Gtk# build there as well.
14952
14953 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14954
14955         * driver.c: remove loop from the default optimizations: it seems to
14956         interact badly with some of the other options (see bug #60613).
14957
14958 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14959
14960         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14961         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14962
14963 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14964
14965         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14966         vararg-using methods.
14967
14968 2004-06-21  Martin Baulig  <martin@ximian.com>
14969
14970         * mini/mini-exceptions.c
14971         (mono_handle_exception): Added `gpointer original_ip' argument.
14972         After calling mono_unhandled_exception(), call
14973         mono_debugger_unhandled_exception() and if that returns true,
14974         restore the context and return.
14975
14976 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14977
14978         * mini-ppc.c: prefer the use of relative branches so
14979         they won't need to be patched in aot code (patch from Patrick Beard).
14980
14981 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14982
14983         * aot.c: patch from Patrick Beard to make the output assembly
14984         more correct for the MacOSX assembler. Small tweak to
14985         generate sane images on Linux/PPC, too.
14986
14987 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14988
14989         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14990         case until bug #59509 is fixed (shows up in #60332).
14991
14992 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14993
14994         * mini.c: make sure the needed wrappers are compiled, too, with
14995         precomp.
14996
14997 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14998
14999         * driver.c: remove NPTL reference in --version output.
15000
15001 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15002
15003         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15004         generate valid assembly for the Mach-O assembler.
15005
15006 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15007
15008         * driver.c: don't include abcrem in the all optimization specifier
15009         since it slows down jit compilation too much for now.
15010
15011 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
15012
15013         * mini.c: use BIGMUL only if both operands have the same signage.
15014         * iltests.il: Test for bug 60056. (errors related to signage in
15015         BIGMUL).
15016
15017         r=lupus.
15018
15019 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15020
15021         * mini.c, aot.c: memory leak fixes.
15022
15023 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15024
15025         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15026
15027 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15028
15029         * Makefile.am: remove the -static hack completely, it links in
15030         statically glib as well.
15031
15032 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15033
15034         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15035         * exceptions.cs: make it compile with new mcs/csc.
15036
15037 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15038         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15039         and added relevant test case.
15040
15041 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15042
15043         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15044         regressions in gtk-sharp.
15045
15046 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
15047
15048         * exceptions.cs: New regression tests.
15049
15050         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15051
15052 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15053
15054         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15055
15056 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
15057
15058         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15059
15060         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15061
15062 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
15063
15064         * mini.c (mono_jit_runtime_invoke): Init class in this
15065         method instead of trusting mono_jit_compile_method to
15066         do the work (because wrappers can be in object class)
15067
15068 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
15069
15070         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15071
15072         * basic-long.cs: New regression test.
15073
15074 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15075
15076         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15077         and div/rem checks.
15078
15079 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15080
15081         * Makefile.am: fix miguel's change to build mono statically against
15082         libmono (track build dependencies).
15083
15084 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15085
15086         * cfold.c: Some glib versions do not have G_MININT32.
15087
15088 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
15089
15090         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15091         with precision of tan, atan, sin and cos, and implemented related
15092         regressions tests (fixes bug 54467, but one new problem appeared and
15093         is not fixed yet).
15094
15095 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15096
15097         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
15098
15099         * exceptions.cs: Add test for constant folding && division by zero.
15100
15101         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
15102         since driver.c is in libmono too, so the optimization was useless.
15103
15104         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
15105         variable to driver.c so the compiler can emit more efficient code to
15106         access them.
15107
15108 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15109
15110         * Makefile.am: don't distribute generated inssel.[ch] files.
15111
15112 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
15113
15114         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
15115         into the default appdomain. Fixes #58707.
15116
15117         * jit-icalls.c: Remove the broken approximation for truncl, doing
15118         no conversion is better.
15119
15120         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
15121         Fixes #58863.
15122
15123 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15124
15125         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
15126         of the mcrxr instruction which is not available on some processors
15127         even if it's documented to be. Implement add and sub overflow correctly
15128         (still not complete for long unsigned). Speed up icalls a bit.
15129
15130 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
15131
15132         * mini.c (mono_jit_compile_method_with_opt): Make sure that
15133         we run .cctor in the current domain instead of target_domain.
15134         
15135         Fixes bug #58558, .cctor not being called in -O=shared.
15136
15137 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15138
15139         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
15140
15141 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
15142
15143         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
15144         which can be done with an imm8, do it that way.
15145         (mono_arch_output_basic_block): ditto for a jmp
15146         (mono_arch_emit_prolog): Computate maximum offset of a label.
15147
15148 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
15149
15150         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
15151         now tries to allocate prefered physical reg's for virtual
15152         regs. This reduces the number of emited spills/loads with
15153         20-30% on our core assemblies.
15154
15155 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15156
15157         * jit-icalls.c: truncl() is not needed and trunc() is
15158         the correct thing to do anyway (bug #58287).
15159
15160 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
15161
15162         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
15163         if available.
15164
15165 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
15166
15167         * driver.c: enable loop optimizations by default.
15168
15169 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15170
15171         * mini-x86.c: fix calc of max loop size when aligning loops start.
15172
15173 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
15174
15175         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
15176         the stack.
15177
15178 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
15179
15180         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
15181         should set carry.
15182
15183         * basic-long.cs: Add tests for add/subtract of immediates with carry.
15184
15185         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
15186         
15187         * mini.c (inline_method): Allways inline some wrappers even if the cost
15188         is too large. Fixes #58785.
15189
15190         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
15191         
15192 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
15193
15194         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
15195         (crichton@gimp.org). Beginning of support for sparc/linux.
15196
15197         * mini-sparc.c: Optimize retrieval of LMF address.
15198
15199 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
15200
15201         * exceptions-ppc.c:  handle alloca in methods with clauses.
15202
15203 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
15204
15205         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
15206
15207 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
15208
15209         * mini.c: Delegate most of the abort signal work to 
15210           mono_thread_request_interruption, which also handles Stop and Suspend
15211           states.
15212
15213 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
15214
15215         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
15216         supports the save/restore lmf opcodes.
15217
15218 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
15219
15220         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
15221         by gcc-3.4 as well.
15222
15223         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
15224
15225 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
15228         methods which contain array accesses.
15229
15230         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
15231         boundaries. Fixes #58537.
15232
15233         * iltests.il: Add regression test for #58537.
15234
15235 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
15236
15237         * mini-x86.c (mono_arch_local_regalloc): Last part of
15238         fix for bug #58633 (releasing register to early).
15239
15240 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
15241
15242         * basic-long.cs: Add new regression test.
15243
15244 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
15245
15246         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
15247         register too early on the chain.
15248
15249 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
15250
15251         * mini.c (create_helper_signature): Use a helper function to reduce
15252         the code which needs to be written. Also set the calling convention of
15253         icalls on windows. Fixes #57840.
15254
15255 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15256
15257         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
15258         exceptions-ppc.c: added helper function to get the instruction address
15259         from a signal handler context.
15260
15261 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15262
15263         * helpers.c: use g_get_tmp_dir. Invokes happyness 
15264         from gonzalo.
15265
15266 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15267
15268         * helpers.c: Add new env variable to pass args to objdump.
15269         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
15270
15271 2004-05-17  Radek Doulik  <rodo@ximian.com>
15272
15273         * Makefile.am (common_sources): added abcremoval.h so it get
15274         disted and daily mono packages on go-mono.com will build again
15275
15276 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
15277
15278         * abcremoval.c: Fixed coding style, added copyright header.
15279
15280         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
15281
15282         * mini.h: Added prototype for abc removal main function.
15283
15284         * build_relations_propagation_table.pl: Added copyright header.
15285
15286 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
15287
15288         * basic-long.cs: reg test for complex ceq_long bug.
15289
15290 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
15291
15292         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
15293         reg in long and clob case (bug #58343). Fixed/added comments.
15294
15295 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
15296
15297         * mini.c (mono_jit_runtime_invoke): Follow new convention
15298         of calling the invoke method with an function pointer.
15299
15300 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
15301
15302         * ChangeLog: Fix author of memory leak patch.
15303
15304 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
15305
15306         * Makefile.am: fix make dist as well...
15307
15308
15309 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
15310
15311         * cfold.c: Made so that conversions from pointer to int4 are no-ops
15312         on archs where pointers are 4 bytes long.
15313
15314         * Makefile.am: Added abcremoval.c source file.
15315
15316         * abcremoval.c: Added abcremoval.c.
15317
15318         * abcremoval.h: Added abcremoval.h.
15319
15320         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
15321
15322         * inssel.brg: Enabled bounds check removal.
15323
15324         * mini.c: Added support for abcrem optimization.
15325
15326         * mini.h: Added abcrem optimization label.
15327
15328         * driver.c: Added support for abcrem optimization.
15329
15330         * propagated_relations_table.def: Added propagated_relations_table.def.
15331
15332 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
15333
15334         * mini.c, cfold.c: fix style.
15335
15336 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15337
15338         * mini.c: handle issue with the low-level implementation of
15339         some long opcodes (bug #54209).
15340
15341 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
15342
15343         * basic.cs: test for my new cmov stuff.
15344
15345 2004-05-13      Patrik Torstensson
15346
15347         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
15348         opt and added peephole documentation.
15349
15350 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
15351
15352         * tramp-ppc.c: rewrote the generic trampoline code.
15353
15354 2004-05-11      Patrik Torstensson
15355
15356         * mini-x86.c: optimize long shl/shr asm code (one less branch)
15357
15358 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
15359
15360         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
15361
15362         * mini.h mini.c dominators.c: Applied patch from Derek Woo
15363         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
15364
15365         * mini.c: Add new icalls for AsAny marshalling.
15366
15367 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15368
15369         * tramp-ppc.c, mini-ppc.c: more cleanups.
15370
15371 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15372
15373         * mini.c: no warnings.
15374
15375 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15376
15377         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
15378
15379 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
15380
15381         * mini.c: In the thread abort signal handler, if the thread is in the
15382         process of being stoped, don't throw the Abort exception, just stop the
15383         thread.
15384
15385 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
15386
15387         * tramp-ppc.c: removed old code.
15388
15389 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15390
15391         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
15392         do some simple speed optimizations on ppc.
15393
15394 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15395
15396         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
15397         and large offsets in load/store.
15398
15399 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
15400
15401         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
15402         it causes regressions.
15403
15404 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
15405
15406         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
15407         support.
15408
15409 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15410
15411         * jit-icalls.c: remove warnings.
15412         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
15413         speedups for unsafe code.
15414
15415 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15416
15417         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
15418
15419 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
15420
15421         * basic-calls.cs: Add new regression test.
15422
15423         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
15424         more portable.
15425
15426         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
15427
15428         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
15429         is no longer used.
15430
15431 2004-05-06      Patrik Torstensson
15432
15433         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
15434         long reg allocation in any reg (not only eax:edx) and implemented 
15435         long shl/shr ops in asm instead of helpers.
15436
15437 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
15438
15439         * mini-sparc.h: Fix warnings.
15440
15441         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
15442         stack.
15443
15444         * mini-exceptions.c (mono_handle_exception): Call the filter in a
15445         separate statement for clarity.
15446
15447         * mini-sparc.c: Update status.
15448
15449 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
15450
15451         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
15452         here.
15453
15454 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15455
15456         * inssel-ppc.brg: another small pre-release workaround:
15457         we don't do overflow detection for long_sub_un.
15458
15459 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15460
15461         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
15462         (also works around a weird ppc bug: 57957).
15463
15464 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
15465
15466         * tramp-ppc.c: trampoline fixes.
15467
15468 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
15469
15470         * mini-ppc.c: fixed typos.
15471
15472 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15473
15474         * mini-ppc.c, exceptions-ppc.c: more code saves registers
15475         at the top of the stack. Fixed typos. Use a frame registers
15476         for all the methods with exception clauses.
15477
15478 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15479
15480         * exceptions-ppc.c: restore fp registers.
15481
15482 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15483
15484         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
15485         order from the stack top (moved the stack room to save the
15486         return value for trace after the param area). Fixed corruption
15487         in restoring registers on unwind.
15488
15489 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15490
15491         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
15492
15493 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15494
15495         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
15496         and prolog/epilog for methods that use it. Allow
15497         enough param area room for varargs methods. Fix miguel's
15498         breakage in exception handling.
15499
15500 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15501
15502         * Makefile.am: run genmdesc only on current arch.
15503
15504 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15505
15506         * exceptions-x86.c:
15507         * mini-x86.h: fix the build on windows.
15508
15509 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
15510
15511         * 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.
15512
15513         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
15514
15515         * mini-exceptions.c: New file.
15516         
15517         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
15518         Move some parts of the x86 exception handling code to an 
15519         arch-independent file so it can be shared with other ports.
15520
15521 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
15522
15523         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
15524
15525 2004-04-26  David Waite  <mass@akuma.org>
15526
15527         * driver.c: remove comma from end of enumeration declaration
15528
15529 2004-04-26  Jackson Harper  <jackson@ximian.com>
15530
15531         * driver.c: parse config file before loading first assembly. This
15532         allows the user gac to be enabled/disabled. 
15533         
15534 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
15535
15536         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
15537         simpler mechanism: we do not care what is encoded initially
15538         (branch absolute or relative), we care about the code and its
15539         target.  I kept the old code for reference for now.
15540
15541         The new code tries first to determine if the jump is anywhere in
15542         the -/+32 absolute meg range, if it succeeds, it encodes using the
15543         absolute branch;  If not, it tried to find something in the
15544         relative range, if not, it uses the handle_thunk code. 
15545
15546 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
15547
15548         * exceptions-ppc.c: use the correct ip register on macosx.
15549
15550 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
15551
15552         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
15553
15554 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
15555
15556         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
15557         Raise exception on integer divide by zero by hand since the hw
15558         doesn't support it. Handle NaNs in FP compares.
15559
15560 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15561
15562         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
15563         code reducing duplication between the platforms and enabled
15564         signal exception handling (on linux for now).
15565
15566 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
15567
15568         * exceptions-ppc.c: more macosx support.
15569
15570 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15571
15572         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
15573
15574 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
15575
15576         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
15577
15578 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15579
15580         * iltests.il: more tests.
15581
15582 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15583
15584         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
15585         vars as well.
15586
15587 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15588
15589         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
15590
15591 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15592
15593         * liveness.c: Mark variables as volatile in all basic blocks reachable
15594         from exception clauses.
15595
15596 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
15597
15598         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
15599         inlining.
15600
15601 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15602
15603         * iltests.il, basic.cs: more tests for regalloc.
15604
15605 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15606
15607         * iltests.il: Some tests for register allocation modifications
15608         I have locally.
15609
15610 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
15611
15612         * exceptions.cs: Add regression test for bug #56782.
15613
15614         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
15615         original stack trace if an exception is rethrown. Fixes #56782. Oh,
15616         the beauty of fixing the same thing in 5 different files...
15617
15618 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
15619
15620         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
15621         methods.
15622
15623 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
15624
15625         * mini.c: Add support for STRWLPARRAY marshalling convention.
15626
15627 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15628
15629         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
15630         to init the context to setup the regs pointer).
15631
15632 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15633
15634         * exceptions-ppc.c: more exceptions work.
15635
15636 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15637
15638         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
15639         not allowed.
15640
15641 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15642
15643         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
15644         can use the memory directly.
15645
15646         * cpu-pentium.md: Update documentation from a post from Zoltan. 
15647
15648         add x86_add_membase, x86_sub_membase, x86_mul_membase
15649
15650 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15651
15652         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
15653         GENERAL_REGS they were also hardcoded for all PPC ports.
15654
15655         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
15656
15657         Remove hard-coded limit for floating point registers, use
15658         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
15659
15660         Notice that in MacOS X calling conventions you can fit a lot more
15661         floating point values in registers, so I should update the PInvoke
15662         test to excercise the passing of floating point values on the
15663         stack (currently broken).
15664         
15665 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
15666
15667         * tramp-ppc.c (create_trampoline_code): Added
15668         JUMP_TRAMPOLINE_SIZE. 
15669         (ppc_magic_trampoline): Follow the pattern from
15670         x86_magic_trampoline: if code is set to zero, return. 
15671         (create_trampoline_code): Always pass MonoMethod to the jump
15672         trampoline, before it was passing a null.
15673         (mono_arch_create_jump_trampoline): Implement the jump stub, could
15674         share the code with mono_arch_create_jit_trampoline. 
15675
15676         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
15677         implemented.
15678         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
15679         implemented.  
15680
15681         * cpu-g4.md: Added length for jmp instruction, the worst case
15682         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
15683         for save_lmf).
15684
15685 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
15686
15687         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
15688
15689 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
15690
15691         * mini.c: Only set bblock->real_offset when adding a new bblock, and
15692         before each IL instruction.
15693
15694         * mini.c (CEE_BOX): Fix warnings.
15695
15696 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15697
15698         * mini.c: removed a few unused vars and extra whitespace.
15699
15700 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
15701
15702         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
15703         checks.
15704         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
15705         index.
15706         (OP_GETCHR): use the above
15707         (CEE_LDELEMA): use the above.
15708
15709         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
15710         version of the generic impl.
15711         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
15712         (CEE_LDELEMA): use the above.
15713
15714 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15715
15716         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
15717         Fixes #56317.
15718
15719         * iltests.il: Added new regression test for #56317.
15720
15721 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15722
15723         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
15724         under NetBSD. Fixes #56450.
15725
15726         * liveness.c (update_gen_kill_set): Fix previous patch.
15727
15728 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15729
15730         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
15731
15732 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
15733
15734         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15735         ldsfld and ldsflda.
15736
15737         * inssel-sparc.brg: Add more optimizations.
15738
15739         * mini-sparc.c: Replace multiply/divide with shifts if possible.
15740
15741 2004-04-01  Martin Baulig  <martin@ximian.com>
15742
15743         * mini.c (handle_box): New static function; moved the
15744         implementation of CEE_BOX here.
15745         (mono_method_to_ir): Added `constrained_call' variable.
15746         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15747         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15748         mono_method_get_constrained() to get the method.
15749
15750 2004-04-01  Martin Baulig  <martin@ximian.com>
15751
15752         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15753         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15754         (mono_method_to_ir): We don't need these macros anymore since
15755         mono_class_get_full() already takes care of it. 
15756
15757 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15758
15759         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15760         use @function (as doesn't accept #function here) and check the return
15761         value of system and stop if fails.
15762
15763 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15764
15765         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15766
15767 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
15768
15769         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15770
15771         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15772
15773         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15774         #56223.
15775
15776         * basic-long.cs: Add test for negation of Int64.MinValue.
15777
15778 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15779
15780         * mini-sparc.c: Update status.
15781
15782         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15783
15784         * exceptions-sparc.c: Fix return value in filters.
15785
15786         * inssel-sparc.brg: Fix register allocation in some rules.
15787
15788 2004-03-28  Martin Baulig  <martin@ximian.com>
15789
15790         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15791         if neccessary.  
15792
15793 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15794
15795         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15796         
15797         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15798         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15799         remove unused conv_u4 opcode.
15800
15801         * mini-x86.c: Remove valgrind workaround since it slows down things
15802         even when mono is not run under valgrind.
15803
15804 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15805
15806         * mini-sparc.c: Update status.
15807
15808         * inssel-sparc.brg: Add some optimizations.
15809
15810         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15811         future delay slot filling. Add support for varargs, tail calls and JMP.
15812
15813         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15814         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15815
15816         * inssel.brg: Fix register allocation in OP_ARGLIST.
15817
15818         * inssel.brg: Fix warnings.
15819
15820 2004-03-25  Martin Baulig  <martin@ximian.com>
15821
15822         * mini.c (inflate_generic_field): Removed.
15823         (mini_get_method): Removed, use mono_get_method_full(),
15824         (mini_get_class): Removed, use mono_class_get_full().
15825         (mono_method_to_ir): Pass our generic context to
15826         mono_field_from_token().        
15827
15828 2004-03-25  Martin Baulig  <martin@ximian.com>
15829
15830         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15831         of a `MonoMethod *'.
15832         (mini_get_method): Take a `MonoGenericContext *' instead
15833         of a `MonoMethod *'.
15834         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15835         a new local variable called `generic_context' which holds the
15836         current `MonoGenericContext *'; use it to lookup things.
15837
15838 2004-03-24  Martin Baulig  <martin@ximian.com>
15839
15840         * mini.c (mini_get_class): New static method; if we're inside a
15841         generic instance, inflate the class if neccessary.
15842         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15843
15844 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15845
15846         * iltests.il: New regression test for #55976.
15847
15848         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15849         #55976.
15850
15851 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15852
15853         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15854         output.
15855
15856 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15857
15858         * liveness.c: Consider SSA stores as well as loads when making vars
15859         volatile.
15860
15861         * exceptions.cs: New regression tests for register allocation.
15862         
15863 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15864
15865         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15866         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15867           domain lock only to protect puntual access to data structures.
15868           Added access lock for sighash, jit_icall_hash_name, 
15869           jit_icall_hash_addr and domain->code_mp.
15870
15871 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15872
15873         * driver.c: Print SIGSEGV handling method.
15874
15875         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15876
15877         * mini.c (setup_jit_tls_data): Handle case when this is called
15878         multiple times for a thread.
15879
15880         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15881         is different from fbxx_un. Fixes #54303. Also use constants instead of
15882         magic numbers in a lot of places.
15883
15884 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15885
15886         * exceptions.cs: Fix cctor test when --regression is used.
15887
15888 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15889
15890         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15891         for Linux/ppc.
15892
15893 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15894
15895         * inssel-ppc.brg: fixed register assignments for some rules.
15896
15897 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15898
15899         * exceptions.cs: Add test for exceptions in static constructors.
15900
15901         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15902         static constructors outside the domain lock. Fixes #55720.
15903
15904 2004-03-17  Martin Baulig  <martin@ximian.com>
15905
15906         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15907         (inflate_generic_field): Take the `MonoMethod *' instead of the
15908         `MonoClass *' and added support for generic method.
15909         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15910         have a `field->parent->gen_params', only inflate the field if it's
15911         an open constructed type.
15912
15913 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15914
15915         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15916         exception object instead of the preconstructed ones.
15917
15918 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15919
15920         * mini.c: reverted changed to sigsegv_signal_handler commited
15921         accidentally in the previous patch.
15922
15923 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15924
15925         * mini.c:
15926         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15927         running --aot with an old assembly.
15928
15929 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15930
15931         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15932         point values.
15933
15934         * mini-sparc.c: Add support for v9 branches with prediction.
15935
15936 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15937
15938         * mini.c (mini_init): #warning is GNUC only
15939
15940         * mini-sparc.h: implement __builtin_frame_address
15941         and __builtin_return_address for Sun C compiler
15942
15943 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15944
15945         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15946
15947 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15948
15949         * basic-calls.cs: Add test for unaligned byref long argument passing.
15950
15951         * mini-ops.h: Add sparcv9 compare and branch instructions.
15952
15953         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15954         v9 instructions if we have a v9 cpu.
15955
15956         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15957         registers for global allocation.
15958
15959         * exceptions-sparc.c: Fixes.
15960         
15961 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15962
15963         * liveness.c (mono_analyze_liveness): Optimized version.
15964
15965         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15966
15967         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15968         sparc work.
15969
15970         * basic-float.cs basic-calls.cs: New regression tests.
15971
15972 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15973
15974         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15975         sigaltstack implementation.
15976
15977         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15978         
15979         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15980         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15981
15982 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15983
15984         * mini.c: Fix warnings.
15985         
15986         * mini.c (mono_resolve_patch_target): New function which contains the
15987         arch independent part of the patching process.
15988
15989         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15990         patching code to a separate function.
15991
15992 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15993
15994         * mini.c (add_signal_handler): ifdef out on Windows
15995
15996 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15997
15998         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15999         cpu-sparc.md: Add exception handling support + other fixes.
16000
16001         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16002         typed GC detection in --version.
16003
16004         * basic.cs exceptions.cs: New regression tests.
16005
16006         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16007         the arch specific code can store data during a compilation.
16008
16009         * mini-ops.h: Add OP_SETFRET.
16010
16011         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16012         function, register a separate icall for each arity, so the icalls can
16013         get a wrapper.
16014         
16015         * mini.c (mono_print_tree): Print negative offsets in a more readable
16016         form.
16017         
16018         * mini.c: Make signal handling work on sparc.
16019         
16020         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16021
16022         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16023
16024         * jit-icalls.c: Emulate truncl by aintl on solaris.
16025
16026         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16027
16028 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
16029
16030         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16031
16032 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
16033
16034         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16035         a MarshalByRef type, inline a method that performs the check, taking into
16036         account that the object can be a proxy. Also implemented tow new opcodes:
16037         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16038         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
16039         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16040
16041 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16042
16043         * mini-ppc.c: if a relative branch displacement is too big
16044         but it points to and area reachable with an absolute branch, 
16045         avoid the thunks.
16046
16047 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16048
16049         * mini.c: optimize small copies in cpblk.
16050
16051 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
16052
16053         * basic-calls.cs basic-float.cs: New regression tests.
16054
16055         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
16056         negative offsets from %fp. Implement localloc. Fix local register 
16057         allocation. Fix the case when the this argument needs to be saved to
16058         the stack. Implement some missing opcodes.
16059
16060 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
16061
16062         * mini.c (mini_method_compile): Reenable global regalloc in methods
16063         with exception handlers.
16064
16065         * linear-scan.c (mono_varlist_sort): Fix warning.
16066
16067         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16068
16069         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16070         regalloc costs.
16071
16072         * liveness.c: Make all variables uses in exception clauses volatile, to
16073         prevent them from being allocated to registers. Fixes #42136.
16074
16075 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
16076
16077         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16078         causes regressions.
16079
16080         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16081         argument to mono_arch_regalloc_cost.
16082
16083         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
16084         precisely.
16085
16086 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
16087
16088         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
16089         Make the cost of allocating a variable to a register arch dependent.
16090
16091         * basic-calls.cs: Fix compilation of tests.
16092         
16093         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16094         helper function to cut back on the number of #ifdefs needed.
16095
16096         * mini-ppc.c: Fix compilation.
16097
16098         * basic-calls.cs: New regression tests.
16099
16100         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
16101
16102         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
16103         of l0 since that is callee saved.
16104
16105         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
16106         to virtual calls.
16107
16108         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
16109         of delay instruction.
16110
16111         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
16112
16113         * mini.h (MonoCallInst): Add 'virtual' flag.
16114
16115         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
16116
16117 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
16118
16119         * *.cs: New regression tests.
16120
16121         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
16122         work.
16123
16124         * mini.c (mono_runtime_install_handlers): Fix build.
16125
16126         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
16127         'signal_stack_size' members.
16128
16129         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
16130         alternate signal stack.
16131
16132         * exceptions-x86.c: Add stack overflow handling.
16133
16134         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
16135         functions to arch independent code.
16136
16137         * mini.c (mono_print_tree): Print more detailed info for load_membase
16138         opcodes.
16139         
16140 2004-02-23  Martin Baulig  <martin@ximian.com>
16141
16142         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
16143
16144 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16145
16146         * mini-x86.c: fixed reg allocation for div/rem.
16147
16148 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
16149
16150         * driver.c (mono_main): Report some configuratio options on --version.
16151
16152 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
16153
16154         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
16155         low in the address space. Correctly flush memory in thunks where we
16156         output native code.
16157
16158 2004-02-20  Martin Baulig  <martin@ximian.com>
16159
16160         * mini.c (mini_get_method): New static method; inflate all generic
16161         methods and methods in open generic instances.
16162         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
16163         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
16164
16165 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
16166
16167         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
16168
16169         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
16170
16171 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
16172
16173         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
16174
16175         * mini-sparc.c (flushi mono_arch_output_basic_block): make
16176         it compile using Sun's compiler.
16177
16178 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
16179
16180         * 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.
16181
16182         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
16183
16184 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
16185
16186         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
16187         code.
16188         * mini-ppc.c: handle calls outside of the allowed range with thunks
16189         allocated using the code manager.
16190         * tramp-ppc.c: use the code manager to hold generated native code.
16191         Fixed the magic trampoline to just patch vtable entries.
16192
16193 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
16194
16195         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
16196         independent file.
16197
16198 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
16199
16200         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
16201         PPC.
16202
16203         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
16204         if we have a working __thread implementation.
16205
16206         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
16207         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
16208
16209 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
16210
16211         * mini-x86.c: Fix compilation under gcc 2.
16212         
16213 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
16214
16215         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
16216         contains a call to the wrapped function.
16217
16218         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
16219         OP_<CALL>_IMM opcodes, and use them under X86.
16220         
16221         * mini.c (mono_jit_find_compiled_method): Fix warning.
16222
16223         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
16224
16225         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
16226
16227         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
16228         functionality to mini.c.
16229
16230         * mini.c (mono_create_jump_trampoline): New function to create a jump
16231         trampoline. Return a compiled method instead of a trampoline if it
16232         exists. Add a cache for jump trampolines.
16233
16234         * mini.c (mono_jit_find_compiled_method): New function to return a
16235         compiled method if it exists.
16236
16237         * mini-x86.c: Call mono_create_jump_trampoline instead of 
16238         mono_arch_create_jit_trampoline.
16239
16240         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
16241         a jump trampoline. Fixes #52092.
16242         
16243 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
16244
16245         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
16246         which is not up-to-date. Add check_corlib_version () instead.
16247
16248         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
16249         have to call it.
16250         
16251         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
16252         since newer valgrind versions do not need it.
16253
16254         * mini.c (mono_jit_compile_method_with_opt): New helper function to
16255         compile a method with a given set of optimizations.
16256
16257         * mini.c: Compile icall wrappers on-demand instead of at startup.
16258
16259         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
16260         wrapper for an icall.
16261
16262 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
16263
16264         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
16265         #54063.
16266
16267         * iltests.il: Add test for non-empty stack before switch instruction.
16268
16269 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
16270
16271         * mini.c: Add support for new stringbuilder marshalling conventions.
16272
16273         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
16274
16275 2004-02-01  Martin Baulig  <martin@ximian.com>
16276
16277         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
16278         in `ginst->mtype_argv'.
16279
16280 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
16281
16282         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
16283         facilitate grepping.
16284
16285 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
16286
16287         * mini.c: fixed buglet in initobj generic implementation for references.
16288
16289 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
16290
16291         * Makefile.am: make the version script conditional.
16292         * jit-icalls.c: handle missing truncl().
16293
16294 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
16295
16296         * exceptions.cs: Add more tests for double->int conversion.
16297
16298         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
16299         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
16300
16301 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
16302
16303         * driver.c: make --verbose --version emit an error
16304         if the loaded corlib doesn't match the runtime version.
16305
16306 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
16307
16308         * mini-ppc.h: export ppc_patch().
16309         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
16310         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
16311         on par or better than on MacOSX.
16312
16313 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
16314
16315         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
16316         mono_lookup_pinvoke_call.
16317
16318         * mini-x86.c: Under windows, the default pinvoke calling convention is
16319         stdcall. Fixes #52834.
16320
16321         * mini.c (optimize_branches): Add an upper bound to the number of
16322         iterations to prevent infinite loops on strange loops. Fixes #53003.
16323
16324 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
16325
16326         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
16327         and ISINST. Fixes #52093.
16328
16329         * objects.cs (test_0_vector_array_cast): New tests.
16330         
16331 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
16332
16333         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
16334         checking in Array.Set ().
16335
16336         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
16337         #52590.
16338
16339         * object.cs (test_0_multi_array_cast): New regression test.
16340
16341 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
16342
16343         * exceptions-ppc.c: fix build on Linux/PPC.
16344
16345 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
16346
16347         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
16348         running under valgrind.
16349         (x86_magic_trampoline): Fix build bustage.
16350
16351         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
16352         negative values as well. This is needed for the encoding of the line number
16353         info, since sometimes the line numbers are not in increasing order.
16354
16355 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * cpu-pentium.md (localloc): Increase the size of the localloc 
16358         instruction since it is a loop under Win32.
16359
16360         * debug-mini.c (record_line_number): Get rid of unneccesary memory
16361         allocation.
16362
16363 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
16364
16365         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
16366         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
16367         Max Horn (max@quendi.de). Fix file names in comments.
16368
16369 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
16370
16371         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
16372         avoid stack overflow.
16373         (replace_usage): Avoid uninitialized variable warnings.
16374
16375         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
16376         and taking the address of valuetype variables.
16377
16378 2004-01-03  Patrik Torstensson
16379
16380         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
16381         for other purposes than FP later on.
16382
16383 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
16384
16385         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
16386         of tail calls.
16387
16388 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
16389
16390         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
16391
16392 2003-12-30  Patrik Torstensson <p@rxc.se>
16393
16394         * mini-x86.h: Decreased number of availiable fp regs.
16395         Solves corner cases with FP spilling.
16396
16397 2003-12-23  Patrik Torstensson <p@rxc.se>
16398
16399         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
16400         for floating point stack tracking / spilling on x86. 
16401         Fixes bug #49012.
16402         
16403         * basic-float.cs: added float mul overflow test.
16404
16405 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
16406
16407         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
16408
16409 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16410
16411         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
16412         supports for cond branches that overflow the immediate
16413         overflow offset. mcs can compile simple programs.
16414
16415 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16416
16417         * exceptions-ppc.c: exception handling support wip:
16418         finally handlers get run on exception.
16419
16420 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
16421
16422         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
16423         profiling.
16424
16425 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16426
16427         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
16428         initial support for stack walking and unwinding.
16429
16430 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
16431
16432         * driver.c (mono_main): Make corlib-out-of-sync message more 
16433         descriptive. Also remove verify_corlib call.
16434
16435 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16436
16437         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
16438         not overlap with other call's arguments, too.
16439
16440 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
16441
16442         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
16443         move to arch-specific code the choice of arch-specific
16444         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
16445         * mini.c: ensure emulation calls will not interleave
16446         with other calls.
16447
16448 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
16449
16450         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
16451         the magic trampoline stack frame is dropped before executing
16452         the new method.
16453
16454 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16455
16456         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
16457         and integer to fp conversions. Added support for overflowing
16458         arguments on the stack. Reserve a couple more registers as temps.
16459         Added support for aot compilation (as output still needs to be
16460         tweaked, though).
16461
16462 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16463
16464         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
16465         Don't overwrite return register in some corner cases.
16466
16467 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
16468
16469         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
16470         static constructors when AOT compiling.
16471
16472         * driver.c (mono_main): Call mono_check_corlib_version.
16473
16474 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16475
16476         * cpu-g4.md, basic.cs: fixed div target register.
16477
16478 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16479
16480         * mini-ppc.c, basic.cs: shl_imm fix with test.
16481
16482 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16483
16484         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
16485         structures by value. Misc fixes.
16486         * objects.cs: more tests.
16487
16488 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
16489
16490         * mini-ppc.c: lconv.ovf.i implemented.
16491
16492 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16493
16494         * mini.c:
16495         (mini_init): don't error out if someone already called g_thread_init.
16496
16497 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16498
16499         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
16500         to be any type per the spec. Fix abnormal memory usage when
16501         the same object is repeatedly thrown.
16502
16503 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
16504
16505         * mini.c: check for overruns in IL code.
16506
16507 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
16508
16509         * TODO: Add/remove some todo entries.
16510
16511 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
16512
16513         * driver.c (mono_main): Call mono_verify_corlib.
16514
16515 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
16516
16517         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
16518         This has been moved to mini.c
16519         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
16520         type being casted is marshalbyref it could be a proxy, so instead of
16521         emitting the type check code, emit a call to a runtime method that will
16522         perform the check by calling CanCastTo if needed.
16523
16524 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
16525
16526         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
16527         methods with large stack frames under Win32.
16528
16529 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16530
16531         * Makefile.am: Distribute regression tests.
16532
16533         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
16534         at the end instead of inserting each variable into the sorted list.
16535
16536         * linear-scan.c (mono_varlist_sort): New helper function.
16537         
16538 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16539
16540         * mini.c: ensure arguments and locals are within bounds.
16541
16542 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16543
16544         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
16545         related fixes.
16546
16547 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16548
16549         * mini.c (mono_cprop_copy_values): Fix crash.
16550
16551         * aot.c: Set verbosity back to 0.
16552         
16553 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16554
16555         * regalloc.c: complete memory leak fix by Laurent Morichetti
16556         (l_m@pacbell.net).
16557
16558 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16559
16560         * driver.c (main_thread_handler): Revert the previous patch.
16561
16562         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
16563         under valgrind.
16564
16565         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
16566         memory from the memory pool.
16567
16568         * driver.c (main_thread_handler): Turn on all optimizations when
16569         --aot is used.
16570
16571         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
16572         an array for better performance.
16573
16574         * regalloc.c (mono_regstate_assign): Fix memory leak.
16575
16576         * debug-mini.c (mono_debug_serialize_debug_info): New function to
16577         serialize the debug info.
16578
16579         * debug-mini.c (mono_debug_add_aot_method): New function to load the
16580         debug info from the serialized representation.
16581
16582         * aot.c: Save debug info into the generated file and load it when 
16583         loading a method.
16584
16585         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16586
16587 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16588
16589         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
16590         More FP-related fixes.
16591
16592 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16593
16594         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
16595         and register allocation buglet. Hello world now runs.
16596
16597 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16598
16599         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
16600         * tramp-ppc.c: fixed class init trampoline.
16601         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
16602
16603 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16604
16605         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
16606         mini.c: more ppc changes/fixes.
16607
16608 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16609
16610         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
16611         Also optimize the case when the arguments are the same in the caller 
16612         and in the callee.
16613
16614         * iltests.il: Add tests for tail calls with valuetype arguments.
16615
16616 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16617
16618         * mini-ppc.c: fixes for struct return type.
16619
16620 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
16621
16622         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
16623         mono_spillvar_offset() to arch-specific code.
16624
16625 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16626
16627         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
16628
16629 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16630
16631         * exceptions-x86.c: Fix stack space leaks.
16632         
16633         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
16634         registers from the lmf if the method has save_lmf set.
16635
16636 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16637
16638         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
16639         of icall wrappers into InvokeInDomain, since these are now per-domain.
16640
16641 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
16642
16643         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
16644         make some opcode emulation and intrinsic ops enabled/disabled 
16645         according to the architecture. More fixes.
16646
16647 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16648
16649         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
16650
16651 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16652
16653         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
16654         arch-specific handling for 'this' and struct return type to
16655         arch-specific code.
16656
16657 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16658
16659         * aot.c: prevent divide by zero error when reporting (it happened with
16660         Accessibility.dll).
16661
16662 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
16663
16664         * mini.h (inst_switch): Remove unused macro.
16665
16666 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16667
16668         * aot.c:
16669         (load_aot_module): free 'info->methods' and 'info' properly. No more
16670         "free(): invalid pointer blah" messages when you have an old aot
16671         compiled assembly.
16672
16673 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
16674
16675         * jit-icalls.c, mini.c: Added support for context static fields.
16676
16677 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16678
16679         * mini.c (mono_method_blittable): Methods which set LastError are not 
16680         blittable either. Fixes #51108.
16681         
16682 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16683
16684         * mini.c: flush icache.
16685         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
16686
16687 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16688
16689         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
16690
16691 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16692
16693         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
16694         safe on IA32.
16695
16696         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
16697         vararg calls.
16698
16699         * inssel.brg (CEE_MKREFANY): Fix AOT case.
16700
16701 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16702
16703         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
16704         instruction when the result is discarded.
16705
16706         * iltests.il (test_0_div_regalloc): New regression test.
16707
16708         * arrays.cs: Fix compilation error.
16709
16710 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16711
16712         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
16713         float rules to inssel-x86.brg: sane architectures with FP registers
16714         don't need to implement these rules.
16715
16716 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16717
16718         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
16719
16720 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16721
16722         * mini.h, inssel-long32.brg: fixed endianess issues in int64
16723         implementation of 32 bit systems.
16724
16725 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16726
16727         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
16728         (Jeroen Zwartepoorte).
16729
16730 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16731
16732         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
16733         the caller and the callee matches.
16734         
16735         * mini.c (mono_method_to_ir): Add comment.
16736
16737         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16738         signbit is missing on some platforms.
16739
16740 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16741
16742         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16743
16744         * mini.c (setup_jit_tls_data): Call the new function.
16745         
16746         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16747
16748         * mini-x86.c: Add experimental support for fast access to the lmf
16749         structure under NPTL/Linux 2.6.x.
16750
16751 2003-11-06  Martin Baulig  <martin@ximian.com>
16752
16753         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16754         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16755         the debugger.
16756
16757 2003-11-02  Martin Baulig  <martin@ximian.com>
16758
16759         * mini.c (inflate_generic_field): New static method.
16760         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16761         generic instance and the field is declared in a generic type, call
16762         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
16763
16764 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16765
16766         * mini.h mini.c (mono_method_same_domain): New function to return
16767         whenever the caller and the callee are in the same domain.
16768
16769         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
16770
16771 2003-10-30  Martin Baulig  <martin@ximian.com>
16772
16773         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16774         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16775         method parameters.
16776         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16777         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16778
16779 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16780
16781         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16782         propagation.
16783
16784         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16785         object here, so it is in the correct appdomain etc.
16786
16787 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16788
16789         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16790         already done.
16791         (mono_method_to_ir): Avoid freeing the type created returned from
16792         mono_type_create_from_typespec, since it is put into an internal cache
16793         by the function. Fixes pointer.exe.
16794
16795         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16796         trampolines for icalls and pinvokes as well. Fixes #33569.
16797
16798 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16799
16800         * mini.c: Update after appdomain changes.
16801
16802         * mini.c (mono_jit_compile_method_inner): Allways compile native
16803         method wrappers in the root domain, since there can only be one
16804         instance of them, whose address is stored in method->info.
16805
16806 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16807
16808         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16809         environment variable. Instead detect automatically whenever running
16810         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16811         valgrind.h.
16812
16813 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16814
16815         * trace.c, trace.h: New files that implement the new trace option
16816         parsing. 
16817
16818         * driver.c: Document new --trace options.
16819
16820         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16821         mini-x86.c: Apply:
16822
16823         -       if (mono_jit_trace_calls)
16824         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16825
16826         * mini.h: prototypes.
16827         
16828 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16829
16830         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16831
16832         * mini.c inssel.brg: Implement typedefbyref opcodes.
16833
16834         * mini.c (mono_jit_compile_method): Remove unused local variable.
16835
16836         * mini.c (mono_jit_compile_method_inner): Ditto.
16837         
16838 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16839
16840         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16841         
16842         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16843
16844 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16845
16846         * mini.c (mono_no_aot): Remove unused global variable.
16847
16848         * mini.c: Thread safety fixes.
16849
16850 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16851
16852         * mini.c (mono_create_class_init_trampoline): Add a lock around
16853         class_init_hash_addr.
16854
16855         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16856         #30073.
16857
16858         * mini.c: Decompose the NEWARR instruction before decomposing its
16859         arguments. Fixes #30073.
16860
16861 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16862
16863         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16864         convention.
16865
16866 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16867
16868         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16869
16870         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16871
16872         * driver.c: Add support for compiling icall wrappers to --compile.
16873
16874 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16875
16876         * inssel.brg: The empty value in class->interface_offsets is -1, not
16877         0. Fixes #49287.
16878
16879 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16880
16881         * objects.cs: New test for 'is' operator on an array of interfaces.
16882
16883 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16884
16885         * tramp-ppc.c: update trampoline code to support jumps
16886         and class initialization.
16887
16888 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16889
16890         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16891
16892         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16893
16894         * inssel.brg (OP_UNBOX): Remove unused rule.
16895
16896         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16897         region instead of one for each method. Fixes #47813.
16898
16899 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16900
16901         * exceptions.cs (test_0_nested_finally): New regression test for
16902         nested exception handlers.
16903
16904         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16905
16906         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16907
16908         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16909         inlining.
16910
16911         * mini.c (mono_method_check_inlining): Make the inlining limit 
16912         configurable by an environment variable.
16913         
16914         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16915
16916         * mini.h: Bump AOT file version.
16917
16918         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16919         token, store the image along with the token, since the token might not 
16920         refer to the same image as the method containing the relocation, 
16921         because of inlining.
16922
16923 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16924
16925         * mini.c (mono_precompile_assemblies): New function to compile
16926         all methods in all loaded assemblies.
16927
16928         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16929
16930         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16931         iassign and fassign to int*, since they can contain large negative
16932         values if the register is spilled. Also added some comments. Fixes
16933         #45817.
16934
16935         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16936         under Win32. Fixes #42964.
16937
16938 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16939
16940         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16941
16942         * aot.c: Added support for AOT compiling methods which contain calls
16943         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16944         handled.
16945         
16946         * driver.c (compile_all_methods): Run the compilation in a thread
16947         managed by mono. Fixes #44023.
16948
16949         * mini.c (mono_codegen): Print full method name in verbose output.
16950
16951         * mini-x86.c (mono_arch_patch_code): Fix warning.
16952         
16953         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16954         jumps, since the method we are jumping to might be domain-specific.
16955
16956         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16957
16958 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16959
16960         * inssel.brg: string chars are unsigned.
16961
16962 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16963
16964         * TODO: New todo item.
16965
16966         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16967         which calls mono_runtime_class_init and patches the call site to
16968         avoid further calls.
16969         (mono_arch_create_class_init_trampoline): New arch specific function 
16970         to create a class init trampoline.
16971         (create_trampoline_code): Generalized so it can create
16972         class init trampolines as well.
16973
16974         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16975         (mono_create_class_init_trampoline): New function to create and cache
16976         class init trampolines.
16977         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16978         vtable given the address of a class init trampoline. Used by the
16979         patching process.
16980         (mono_codegen): Generate a call to a trampoline instead of
16981         mono_runtime_class_init in LDSFLD[A].
16982         (mono_codegen): Add relocations for the new trampoline.
16983         
16984         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16985         MONO_PATCH_INFO_CLASS_INIT.
16986
16987         * mini.h: Bump AOT version number.
16988
16989         * aot.c: Create a copy of the loaded code instead of using the original
16990         so methods which call each other will be close in memory, improving
16991         cache behaviour.
16992         
16993         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16994         patch since it breaks the regression tests.
16995         
16996         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16997         for the register saving instruction sequence since the 
16998         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16999
17000 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
17001
17002         * TODO: Fix todo item && remove another.
17003
17004 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
17005
17006         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17007         previous checkin.
17008
17009         * aot.c: Moved the check for MONO_LASTAOT into the initialization
17010         function of the module.
17011
17012         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17013         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17014         --no-aot command line option.
17015
17016 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17017
17018         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17019         by Bernie Solomon (bernard@ugsolutions.com).
17020
17021         * inssel.brg: Refactor the interface offset table related code into
17022         its separate functions and add support for the AOT case.
17023
17024 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17025
17026         * aot.c (mono_aot_get_method_inner): Fix memory leak.
17027         
17028         * aot.c: Added mono_aot_verbose variable and made all debugging
17029         output depend on the value of this variable.
17030
17031         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17032         method_label and info_label.
17033
17034         * mini.h mini-x86.c aot.c: Added a new relocation type 
17035         MONO_PATCH_INFO_IID for klass->interface_id.
17036
17037         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17038         the MonoJitInfo structure.
17039
17040         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17041         a non-root appdomain in shared mode.
17042
17043 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17044
17045         * aot.c: make aot loader less verbose. Remove free of unused variable.
17046
17047 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17048
17049         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17050
17051         * .cvsignore: Added *.dll.
17052
17053         * mini.c (mono_print_tree_nl): New function callable while debugging.
17054
17055         * mini.c (mono_print_code): Export this.
17056
17057         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17058         patched code.
17059
17060 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
17061
17062         * mini.h (MonoCompile): Added 'jit_info' field.
17063
17064         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17065         the cfg structure, since it is needed by the AOT compiler.
17066
17067         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17068
17069         * aot.c: A major rewrite. Changes include:
17070         - save exception tables for methods which have them.
17071         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
17072         to g_module_symbol.
17073         - reworked the file format so it is now much smaller and needs
17074         fewer relocation entries.
17075         
17076 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17077
17078         * aot.c (load_aot_module): Fix build bustage on platforms without
17079         Boehm GC.
17080
17081 2003-09-04  Martin Baulig  <martin@ximian.com>
17082
17083         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17084
17085 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17086
17087         * TODO: Some new optimization ideas.
17088
17089         * aot.c: Move AOT module loading logic here from mono_assembly_open.
17090
17091         * aot.c: Save the optimization flags used to compile the code into
17092         the AOT module.
17093
17094         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17095         support emitting domain specific code.
17096         
17097         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
17098         no longer domain neutral. It can be made domain neutral by compiling 
17099         with --optimize=shared.
17100
17101         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
17102         between appdomains.
17103
17104         * driver.c mini.h mini.c: New --no-aot debugging option which disables
17105         loading of AOT code.
17106
17107         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
17108         
17109         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
17110         if there is no domain neutrality information.
17111
17112 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
17113
17114         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
17115         format version into the generated library.
17116
17117         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
17118         callee method into the caller since one of them could be shared.
17119
17120         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
17121         system exceptions from AOT code now works.
17122
17123         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
17124         method if it is domain neutral and the callee is not.
17125
17126         * graph.c (cfg_emit_one_loop_level): Fix warning.
17127
17128 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
17129
17130         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
17131         last checkin.
17132
17133 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
17134
17135         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
17136         is needed  by code which is executed before mono_runtime_init ().
17137         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
17138         
17139         * mini.c (mono_thread_abort): Fix warning.
17140         (mono_jit_compile_method): Call static constructor in the AOT case too.
17141
17142         * aot.c (mono_compile_assembly): Fix warning.
17143
17144 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17145
17146         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
17147
17148 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
17149
17150         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
17151
17152         * cpu-pentium.md: Fix the length of call opcodes so they include the
17153         ESP restoring instruction. Fixes #47968.
17154
17155 2003-08-28  Martin Baulig  <martin@ximian.com>
17156
17157         * mini-x86.c (mono_arch_call_opcode): Added support for
17158         MONO_TYPE_GENERICINST.
17159
17160         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
17161
17162 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
17163
17164         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
17165         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
17166
17167         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
17168         metadata_section.
17169
17170 2003-08-26  Martin Baulig  <martin@ximian.com>
17171
17172         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
17173         when reporting an error, set this to the actual error location.
17174         (mono_method_to_ir): Report the correct error location if
17175         get_basic_blocks() returned an error.
17176
17177 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
17178
17179         * mini.c (mono_type_blittable): OBJECT is not blittable.
17180         (mono_method_blittable): Methods which have marshalling descriptors
17181         are not blittable either. Fixes #47842.
17182
17183 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
17184
17185         * driver.c mini.c: Use an environment variable instead of a global 
17186         variable. Also fix the build.
17187
17188         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
17189         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
17190         reporting this. 
17191
17192         * driver.c mini.c: Added --with-valgrind option to turn off some
17193         code which prevents mono from running under valgrind.
17194
17195         * mini.c (mono_emit_call_args): Fixed warning.
17196
17197         * mini.c (mono_emulate_opcode): Fixed warning.
17198
17199 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200
17201         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
17202         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
17203         regalloc.c, regalloc.h: specify available registers in arch-specific
17204         code and support floats in the regallocator (patch by Laurent Morichetti 
17205         <l_m@pacbell.net>)
17206
17207 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17208
17209         * mini.c: mono_thread_current() can be called only after
17210         mono_runtime_init(): rearrange code to not call it early on.
17211
17212 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17213
17214         * mini.c: allocate jump tables in the code mempools.
17215
17216 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17217
17218         * mini.c, mini.h: make sure per-thread data allocated by the jit is
17219         freed.
17220
17221 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
17222
17223         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
17224         12 to 16.  This fixes bug #47453.
17225
17226
17227 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17228
17229         * mini-ppc.c: fixed indexed load and unsigned compares.
17230
17231 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
17232
17233         * mini.c: reenabled installation of handler for
17234           thread abort signal.
17235
17236 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17237
17238         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
17239         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
17240         until it's fixed and actually useful.
17241
17242 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17243
17244         * inssel-long32.brg: couple more opcodes implemented.
17245
17246 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
17247         
17248         * mini-sparc.c: Even more opcodes implemeted.
17249
17250 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
17251
17252         * mini-sparc.c: More opcodes implemented.
17253
17254 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
17255
17256         * mini-sparc.c: More opcodes implemented.
17257
17258 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
17259
17260         * inssel-sparc.brg: Add some needed rules.  Direct
17261         copy from PPC.
17262         * Makefile.am: Use inssel-sparc.brg
17263         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
17264         an assert happy for now.
17265
17266 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
17267
17268         * mini-sparc.c: Fixed compile errors.
17269         * exceptions-sparc.c: Same.  We now produce a mono binary 
17270         on sparc-linux.  Yea.
17271
17272 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
17273
17274         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
17275         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
17276         They compile, but do not work.
17277
17278 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17279
17280         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
17281         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
17282         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
17283         (ct@gentoo.org).
17284
17285 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17286
17287         * mini.c: more opcodes implemented and better support for generics.
17288
17289 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17290
17291         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
17292         * mini.c, mini.h: first cut at generics support: some new instructions 
17293         added and changed the behaviour of some of the existing ones.
17294
17295 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
17296
17297         * mini.c: Removed definition of metadata_shared mutex here.
17298
17299 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17300
17301         * mini-x86.c: make vararg calls work for instance methods.
17302
17303 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
17304
17305         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
17306         returns the arguments in a separte list, now.
17307
17308 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17309
17310         * aot.c, mini.c: updates for array type representation changes.
17311
17312 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
17313
17314         * mini.c: register function to perform jit shutdown.
17315
17316 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17317
17318         * mini.c: use a faster allocator if possible.
17319
17320 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17321
17322         * aot.c: some cleanups and portability changes.
17323
17324 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17325
17326         * mini.c: use faster allocation for CEE_BOX if possible.
17327
17328 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17329
17330         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
17331         Moved inlined mempcy code to its own function so that is can be
17332         reused. Added an inline memset function as well (optimized initobj).
17333         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
17334
17335 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17336
17337         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
17338
17339 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
17340
17341         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
17342         arch code can setup the cpu for CLR execution, if needed.
17343         We use it on x86 to set the precision of FP operations.
17344
17345 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17346
17347         * mini.c: disable some optimizations if we can guess they'll cost too
17348         much for a given method.
17349
17350 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
17351
17352         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
17353         
17354 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
17355         * mini.h mini.c mini-x86.c: Added instruction level coverage 
17356         info collection support.
17357
17358 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17359
17360         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
17361         is now implemented in the profiling API. Get rid of a couple of
17362         unnecessary global variables.
17363
17364 2003-06-15  Nick Drochak <ndrochak@gol.com>
17365
17366         * basic-long.cs: tests for negative values for bigmul, and unsigned.
17367         * cpu-g4.md: add op_bigmul and op_bigmul_un
17368         * cpu_pentium.md: add op_bigmul_un
17369         * inssel-long32.brg: add rule for unsigned bigmul
17370         * mini-ops.h: define OP_BIGMUL_UN
17371         * mini-x86.c: THE BUG: handle (un)signed properly
17372         * mini.c: choose unsigned opcode if needed.
17373         This set of patches fixes bug #44291
17374
17375 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
17376
17377         * mini.c (optimize_branches): improved to handle all kinds of
17378         conditional branches.
17379
17380 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17381
17382         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
17383         don't raise exceptions.
17384
17385 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17386
17387         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
17388         to arch-specific files.
17389
17390 2003-06-09  Martin Baulig  <martin@ximian.com>
17391
17392         * Makefile.am (libs): Added $(LIBGC_LIBS).
17393
17394 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
17395
17396         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
17397         and OP_ATAN (fixes bug#44293).
17398
17399 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
17400
17401         * Makefile.am, mini-x86.c: rename cpu description array to
17402         pentium_desc, since some compilers define the 'pentium' preprocessor
17403         symbol.
17404
17405 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
17406
17407         * mini.c (mini_select_instructions): add explicit branch if the
17408         following block is not the false target of a conditional branch -
17409         we need this with any optimization that reorder or remove bblocks
17410
17411         * mini.c (optimize_branches): bug fixes
17412
17413 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
17414
17415         * mini.c (mono_method_to_ir): inline static readonly fields
17416
17417         * ssa.c (fold_tree): start cfold support for long (very simple
17418         cases only)
17419
17420         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
17421
17422 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17423
17424         * inssel.brg: fixed memcpy (bug #44219).
17425
17426 2003-06-05  Dick Porter  <dick@ximian.com>
17427
17428         * driver.c: Set the glib log levels to not abort if g_message
17429         recurses.
17430
17431         g_set_prgname() has to happen before mini_init() so that the
17432         process handle gets the info.
17433         
17434 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17435
17436         * driver.c: add intrins to the default optimizations to get wider
17437         exposure.
17438
17439 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17440
17441         * mini.h: some large basic blocks will overflow a 16-bit
17442         integers for symbolic registers.
17443
17444 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
17445
17446         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
17447         (mono_arch_output_basic_block): fix bug 43499 
17448
17449 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17450
17451         * mini.c: kill duplicated definition of mono_debug_format.
17452
17453 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17454
17455         * mini-x86.c, arrays.cs: fixed register allocation bug.
17456
17457 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
17458
17459         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
17460
17461         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
17462
17463 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17464
17465         * mini.c:
17466         (print_method_from_ip): also print source location information if
17467         available.
17468
17469 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
17470
17471         * mini.c (mono_find_block_region): bug fix in region code
17472         (mini_method_compile): enable removing unreachable code again, but
17473         only in methods without exception clauses.
17474
17475 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17476
17477         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
17478         Implemented arglist opcode and handling of TypedReference type.
17479         Fixed x86 call convention when a structure is returned.
17480         Minimal support for calling static vararg methods.
17481
17482 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
17483
17484         * mini.c (mini_method_compile):  always remove unreachable code,
17485         because the code in them may be inconsistent  (access to dead
17486         variables for example).
17487
17488 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17489
17490         * driver.c, debug-mini.c: warning fixes.
17491
17492 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17493
17494         * Makefile.am, jit.h, mini.h: install header for embedding mono.
17495
17496 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
17497
17498         * mini.c: thread-static fields are registered in mono_class_vtable(),
17499         so ensure the function is called before checking for them.
17500
17501 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
17502
17503         * mini.c (optimize_branches): fix for bug 43586
17504
17505         * jit-icalls.c (mono_llmult_ovf): added an additional check for
17506         overflow (fixes Bug #43639)
17507
17508 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17509
17510         * mini.c, objects.cs: allow the use of stobj for primitive types.
17511
17512 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17513
17514         * mini.c: be less strict about argument checking until we support
17515         running the verifier.
17516
17517 2003-05-27  Nick Drochak <ndrochak@gol.com>
17518
17519         * basic-long.cs: tests for (ulong)int * (ulong)int also
17520         * mini.c: use the same trick for (ulong)int * (ulong)int
17521
17522 2003-05-27  Nick Drochak <ndrochak@gol.com>
17523
17524         * basic-long.cs: add regression test for (long)int * (long)int
17525         * cpu-pentium.md: add op_bigmul specification
17526         * inssel-long32.brg: add OP_BIGMUL rule
17527         * mini-ops.h: add OP_BIGMUL
17528         * mini-x86.c: register allocator: handle case where src1 needs to be
17529         in EAX.
17530         * mini.c: substitute special BIGMUL opcode in the tree for 
17531         (long)int * (long)int
17532
17533 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
17534
17535         * jit-icalls.c: call the type ctor on field access if needed.
17536
17537 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17538
17539         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
17540         to a method (including results of ldelema, bug#43207).
17541
17542 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
17543
17544         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
17545         colors to show exception handler blocks.
17546
17547         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
17548         (fix for pinvoke7.cs).
17549
17550 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17551
17552         * mini.h, mini.c: ensure correct initialization order for types that
17553         require it. Prepare for lazy compilation of jit icall wrappers.
17554         Provide a name for opcode emulation to reduce unneeded mallocing.
17555
17556 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17557
17558         * mini-x86.c: better register restoring code and profiling
17559         support for tail calls.
17560
17561 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17562
17563         * mini.h, driver.c: prepare for leaf methods optimization.
17564
17565 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17566
17567         * mini.c: get targets of branches before converting a method.
17568
17569 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
17570
17571         * mini.c (optimize_branches): added some experimental code (disbaled) 
17572
17573 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
17574
17575         * mini.c (optimize_branches): fix branch to branch optimization 
17576
17577         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
17578
17579         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
17580
17581         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
17582
17583         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
17584         if needed.
17585
17586 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
17587
17588         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
17589         enable use of interface variables again.
17590
17591         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
17592         I1 to registers because there is no simply way to sign extend 8bit
17593         quantities in caller saved registers on x86.
17594
17595         * inssel-float.brg: set costs of some rules to 2 so
17596         that monobure always select the arch. specific ones if supplied,
17597         regardless of the order we pass the files to monoburg.
17598
17599 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17600
17601         * mini.c, mini-x86.c: since the magic trampoline for jumps
17602         can't patch the code directly, we do it as soon as the
17603         method gets compiled.
17604
17605 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17606
17607         * mini-x86.c, mini.h: introduce a new patching method
17608         to support CEE_JMP and tail calls.
17609         * mini.c: obey tail.call. Don't precompile methods target
17610         of CEE_JMP.
17611         * tramp-x86.c: new trampoline code to handle methods
17612         reached through a jump.
17613
17614 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
17615
17616         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
17617         bit values to registers
17618
17619 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
17620
17621         * mini.c (mono_compile_get_interface_var): share interface
17622         variables if possible.
17623
17624 2003-05-16  Martin Baulig  <martin@ximian.com>
17625
17626         * debug-mini.c (mono_init_debugger): New function to initialize
17627         the debugger.  This is not in the debugger since it needs to
17628         access some of mini's internals.
17629
17630 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17631
17632         * mini.c (mono_method_to_ir): inlining fixes/cleanups
17633
17634 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
17635
17636         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
17637         for value type handling.
17638
17639 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17640
17641         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
17642         (mono_method_check_inlining): enable inlining of all kinds of wrappers
17643
17644 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
17645
17646         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
17647           the constructor through a proxy.
17648
17649 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17650
17651         * jit-icalls.c, inssel.brg: fixes to array element address
17652         calculations.
17653
17654 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
17655
17656         * mini-x86.c (is_regsize_var): allocate pointer to registers
17657
17658 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17659
17660         * driver.c: fixed typo, added intrins to the set of optimizations
17661         tested with regressions.
17662
17663 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17664
17665         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
17666         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
17667         test case.
17668
17669 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
17670
17671         * inssel.brg: remove some common pop instructions without side effects
17672
17673 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17674
17675         * inssel-x86.brg: fixed thinko in int to double conversions.
17676
17677 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
17678
17679         * mini.c, jit-icalls.c: added runtime thread-static variable support.
17680
17681 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17682
17683         * inssel-long32.brg: two more missing instructions.
17684
17685 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
17686
17687         * mini.c (mono_emit_call_args): set the cil_code for all arguments
17688         if not already set.
17689
17690 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
17691
17692         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
17693         correctly.
17694
17695         * basic-float.cs: Added tests for negative zero.
17696
17697 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17698
17699         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
17700         a couple of missing operations for long casts, with test cases.
17701
17702 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17703
17704         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
17705
17706 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
17707
17708         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
17709         code size estimation.
17710
17711 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
17712
17713         * mini.c (mono_jit_create_remoting_trampoline): make it work with
17714         abstract methods (fix bug 42542)
17715
17716         * aot.c: add ability to handle array types
17717         
17718 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
17719
17720         * mini.c: Call the _specific versions of the object allocation
17721         functions if possible.
17722
17723 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17724
17725         * driver.c: call setlocale ().
17726
17727 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17728
17729         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
17730         windows build.
17731
17732 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
17733
17734         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17735
17736         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17737         wrappers (fix bug 42122)
17738
17739 2003-05-04  Martin Baulig  <martin@ximian.com>
17740
17741         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17742
17743         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17744         s/mini_set_defaults/mono_set_defaults/g.
17745
17746 2003-05-04  Martin Baulig  <martin@ximian.com>
17747
17748         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17749
17750 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17751
17752         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17753         (reported by Don Roberts).
17754
17755 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17756
17757         * mini.c: temporarily work around two bugs for this release.
17758
17759 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17760
17761         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17762         that contains -export-dynamic and it makes using the ld script
17763         useless.
17764         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17765
17766 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17767
17768         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17769         specific cpu.
17770
17771 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17772
17773         * mini.c: make sure leave calls all the needed finally blocks,
17774         even when the target jumps out of multiple exception clauses.
17775
17776 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17777
17778         * ldscript, Makefile.am: add linker script to reduce the number of
17779         exported symbols (should also fix the issues with libwine defining
17780         some of the same symbols in io-layer).
17781
17782 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17783
17784         * driver.c (mini_main): Avoid assertion when no file name is given on 
17785         the command line.
17786
17787 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17788
17789         * driver.c: added --version/-V command line option.
17790         Added the inline optimization in the regression tests.
17791
17792 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17793
17794         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17795         to the type in the method signature (fixes bug#42134).
17796
17797 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17798
17799         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17800
17801 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17802
17803         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17804
17805 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17806
17807         * driver.c: fixed bug #42100.
17808
17809 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17810
17811         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17812
17813 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17814
17815         * mini.c: moved most of the code required to do inlining to its own
17816         function so it can be reused. Inline also ctors if appropriate.
17817
17818 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17819
17820         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17821         the runtime can call mono API functions.
17822
17823 2003-04-27  Martin Baulig  <martin@ximian.com>
17824
17825         * debug-mini.c (mono_debug_init_method): Added
17826         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17827         send a notification to the debugger.
17828
17829         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17830         running in the Mono Debugger, just pass the breakpoint number to
17831         mono_debug_init_method().
17832
17833         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17834
17835 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17836
17837         * mini.c: allow some more unsafe compares.
17838
17839 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17840
17841         * mini-x86.c, Makefile.am: make distcheck works (partially from
17842         a patch by Richard Lee <r.h.lee@attbi.com>).
17843         * regset.c, regset.h: removed, they are unused.
17844
17845 2003-04-25  Dick Porter  <dick@ximian.com>
17846
17847         * driver.c: Usage reports the name as 'mono' not 'mini'
17848         * exceptions-x86.c: Build and run on freebsd
17849
17850 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17851
17852         * Makefile.am: install the program with the 'mono' name and
17853         the library as libmono instead of mini and libmini.
17854
17855 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17856
17857         * driver.c: provide the APIs for the embedding interface of the old jit.
17858
17859 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17860
17861         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17862
17863 2003-04-23  Martin Baulig  <martin@ximian.com>
17864
17865         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17866
17867         * driver.c: Added `--debug' command line argument to enable
17868         debugging support.
17869
17870 2003-04-23  Martin Baulig  <martin@ximian.com>
17871
17872         * debug.[ch]: Removed.  The code is now in
17873         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17874
17875         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17876         last six months.
17877
17878 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17879
17880         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17881
17882 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17883
17884         * mini.c:
17885         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17886         mono_domain_finalize.
17887         (mini_method_compile): use mono_method_profile* if the the option is
17888         enabled.
17889
17890 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17891
17892         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17893         methods with their wrapper.
17894
17895         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17896         methods with their wrapper.
17897
17898         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17899         their wrapper.
17900
17901         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17902         wrapper.
17903
17904         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17905         methods.
17906
17907 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17908
17909         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17910
17911 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17912
17913         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17914         of the mempool. This is slightly faster and uses less memory
17915
17916 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17917
17918         * mini.c: avoid O(n) allocation for variables.
17919
17920 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17921
17922         * mini.c: handle items on the stack after inlining methods.
17923
17924 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17925
17926         * mini.c: make the method->opcode optimization dependent
17927         on MONO_OPT_INSTRINS and do it lazily.
17928
17929 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17930
17931         * driver.c: print overall results at the end of regression run.
17932
17933 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17934
17935         * inssel.brg: don't overwrite symbolic registers.
17936
17937 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17938
17939         * inssel-x86.brg: fix conversion from long to float.
17940
17941 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17942
17943         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17944
17945 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17946
17947         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17948
17949         * driver.c: Added --print-vtable option as in the old JIT.
17950
17951 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17952
17953         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17954
17955 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17956
17957         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17958
17959 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17960
17961         * mini.c regalloc.c regalloc.h: Fix memory leak.
17962
17963 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17964
17965         * aot.c (mono_aot_get_method): register all used strings
17966
17967 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17968
17969         * mini.c: always intern strings references with ldstr at compile time.
17970
17971 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17972
17973         * Makefile.am: add BUILT_SOURCES.
17974
17975 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17976
17977         * driver.c: give a better error message when the assembly to execute
17978         doesn't have an entry point.
17979
17980 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17981
17982         * Makefile.am: added hack for automake
17983
17984         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17985         correct sematics.
17986
17987         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17988
17989 22003-04-07  Martin Baulig  <martin@ximian.com>
17990
17991         * Makefile.am: Added Makefile.am.
17992
17993         * debugger-main.c: Removed, this is now in the debugger where it
17994         belongs.
17995
17996         * mini.pc.in: Call this package `mini' for the moment.
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010