2008-03-06 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4         changes.
5
6         * aot-compiler.c (encode_patch): Ditto.
7
8         * mini.h (G_MININT32): Fix the definition of this.
9
10 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
11
12         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
13
14         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
15
16 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
17
18         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
19         methods returning vtypes in registers.
20         (mono_arch_allocate_vars): Ditto.
21
22         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
23
24         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
25
26         * generics.cs: Add a test from the linear IR branch.
27
28         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
29
30         * mini.c (inline_method): Cache failed inline attempts.
31
32 2008-03-04  Mark Probst  <mark.probst@gmail.com>
33
34         * mini.c: For shared methods of generic classes put the location
35         of "this" into the MonoGenericJitInfo.
36
37         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
38         register out of a MonoContext by register number.  Add the generic
39         sharing context as an argument to mono_arch_find_this_argument().
40
41         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
42         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
43         for new arch function.
44
45         * mini-exception.c: Handle open exception clauses in shared
46         generic code.
47
48         * mini-trampolines.c: Supply additional argument to
49         mono_arch_find_this_argument().
50
51 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
52
53         * Makefile.am (regtests): Run the bench.exe tests last.
54
55 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
56
57         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
58         a bit.
59
60 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
61
62         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
63         with MS.
64
65         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
66         
67         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
68
69         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
70         whose class has no cctor.
71
72         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
73
74 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
75
76         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
77         unverified.
78
79 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
80
81         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
82         to be in sync with the code on the linear IR branch.
83
84         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
85
86         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
87
88 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
89
90         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
91
92         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
93
94         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
95
96         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
97
98         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
99         
100         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
101         body.
102
103 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
104
105         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
106         OP_LOADR4_MEMBASE emission.
107
108         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
109         (mono_spillvar_offset_float): Ditto.
110
111         * mini-mips.c (mono_arch_emit_prolog): Ditto.
112
113         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
114         emission.
115
116         * basic-long.cs: Add regression tests for them.
117
118         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
119         use.
120         (mono_arch_allocate_vars): Fix representation of single-precision float
121         argument.
122         (mono_arch_output_basic_block): Ditto.
123
124         * inssel-mips.brg: Ditto, remove duplicate items.
125
126         * mini-mips.c (emit_load_volatile_arguments): New function to handle
127         arguments of tail calls as on other platforms.
128         (mono_arch_output_basic_block): Handle tail calls.
129
130         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
131         register.
132
133         * objects.cs (test_5_pass_static_struct): Add test for it.
134
135         Contributed under MIT/X11 license.
136
137 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
138
139         * Makefile.am: Use gmcs for compiling the regression tests.
140
141         * *.2.cs *.2.il: Rename to *.cs and *.il.
142
143 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
144
145         * regalloc.h: Make the vassign array smaller.
146
147         * mini.c (mini_method_compile): Remove an unused field in cfg.
148
149         * mini-codegen.c: Add a bunch of micro optimizations.
150
151 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
152
153         * regalloc.h: Remove some unused fields.
154
155 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
156
157         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
158
159         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
160
161 2008-02-22  Mark Probst  <mark.probst@gmail.com>
162
163         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
164
165         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
166         trampoline: Fetch an entry from the runtime generic context.  If
167         it's NULL, jump to the actual trampoline to fill the runtime
168         generic context.  Otherwise, return it.
169
170         * mini.c: Call the lazy fetch trampoline to get entries out of the
171         runtime generic context.
172
173         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
174         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
175         tramp-sparc.c: Stubs for the lazy fetch trampoline.
176
177 2008-02-21  Mark Probst  <mark.probst@gmail.com>
178
179         * mini.c: Fetch data out of the extensible part of the runtime
180         generic context instead of calling a helper function.
181
182         * generic-sharing.c: Some functions moved into
183         metadata/generic-sharing.c.  Helper function for fetching other
184         types now checks and asserts against extensible rgctx (just for
185         debugging purposes - the helper function isn't called anymore
186         unless for debugging).
187
188 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
189
190         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
191         for tail calls up to the point that the tests in iltests.exe run. Also add a
192         dummy CKFINITE implementation.
193         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
194         needed for trampoline LMF frames.
195
196         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
197         trampoline LMF frames.
198
199 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
200
201         * mini.c (inline_method): clean any pending loader error when inlining fail.
202         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
203
204 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
205
206         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
207
208         * aot-runtime.c (decode_patch_info): Ditto.
209
210         * mini.c (mono_resolve_patch_target): Ditto.
211         
212         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
213         icall wrappers.
214
215         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
216         
217         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
218         if it references an icall address.
219
220 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
221
222         * cpu-s390x.md: Remove some more unused opcodes.
223         
224         * cpu-s390x.md: Remove some unused opcodes.
225
226         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
227         mono_op_imm_to_op ().
228
229         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
230         instead of a switch statement.
231         
232         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
233         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
234
235         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
236         
237         * mini-codegen.c: Remove unused mono_regstate2_... functions.
238
239         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
240         -1.
241
242 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
243
244         * driver.c (mono_main): Improve error reporting when an assembly cannot be
245         opened. Fixes #362607.
246
247         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
248
249         * iltests.il.in: Add a test for static methods in interfaces.
250
251 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
252
253         * genmdesc.c (build_table): Fix a crash on older glib versions.
254
255         * cpu-sparc.md: Remove some unused opcodes.
256         
257         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
258         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
259
260         * cpu-amd64.md: Remove some unused opcodes.
261
262         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
263         like the other opcodes.
264
265 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
266
267         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
268
269         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
270
271         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
272         variables 'cfg' instead of 'm' for consistency.
273
274         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
275
276         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
277         argument holding the vtype return address, to avoid the ambigious use of
278         cfg->ret for this purpose.
279
280         * mini.c (NEW_RETLOADA): Use vret_addr if set.
281
282         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
283         
284         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
285         new mono_print_ins () function which only takes one argument.
286
287 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
288
289         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
290         macro arguments.
291
292 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
293
294         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
295
296         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
297
298         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
299         opcodes and other small changes.
300
301         * mini-ops.h: Add some new opcodes from the linear IR branch.
302
303         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
304
305         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
306         opcodes, use the REG_MEMBASE opcodes instead.
307         
308         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
309         opcodes, use the REG_MEMBASE opcodes instead.
310         
311         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
312         linear IR branch.
313
314         * mini.c (mono_op_imm_to_op): New helper function.
315
316         * mini-ops.h: Add some opcodes from linear IR branch.
317
318 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
319
320         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
321         <tsv@solvo.ru>.
322
323 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
324
325         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
326         OP_ICONV_TO_R4/R8.
327
328         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
329
330 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
331
332         * aot-compiler.c (emit_method_code): Add an assert.
333
334         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
335         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
336         methods.
337
338 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
339
340         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
341         some load/store opcodes so they are consistent. 
342         (mono_arch_emit_prolog): Simplify some code.
343
344         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
345
346         * objects.cs: Add tests for large argument offsets on ARM.
347
348         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
349         stack offsets. Fixes #359651.
350
351         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
352
353         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
354
355         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
356
357         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
358
359         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
360
361         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
362         rid of CEE_CONV_R_UN.
363
364         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
365
366 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
367
368         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
369
370         * mini.c (mono_normalize_opcodes): Add some more opcodes.
371
372         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
373
374         * cpu-amd64.md: Remove some unused opcodes.
375
376         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
377
378         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
379
380         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
381         arch specific functions for its parts. Call the peephole pass after local
382         regalloc so the prolog can compute a more accurate max_offset.
383         
384         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
385         the corresponding OP_I/OP_L opcodes.
386
387         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
388
389         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
390
391 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
392
393         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
394         as they are handled in mini.c.
395
396         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
397         
398         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
399         case since it is handled in mini.c.
400
401         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
402
403         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
404
405         * *.c: Use the new opcodes in the IR and back end code.
406
407         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
408
409         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
410
411 2008-02-06  Mark Probst  <mark.probst@gmail.com>
412
413         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
414         an assert because it has a race condition.
415
416 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
417
418         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
419
420         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
421
422         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
423
424         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
425         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
426
427 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
428
429         * cpu-amd64.md (move): Correct the maximum size of move.
430
431 2008-02-05  Mark Probst  <mark.probst@gmail.com>
432
433         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
434         the generic class init trampoline to return quickly if the class
435         is already inited.
436
437 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
438
439         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
440         issues where an 32 bit callsite cannot be patched by a 64 bit address.
441
442 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
443
444         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
445         branch.
446
447 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
448
449         * objects.cs: Add some soft-float tests.
450
451         * mini.c: Fix a couple more soft-float issues.
452
453         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
454
455         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
456         avoid a REX prefix.
457
458 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
459
460         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
461         exception happens while compiling a virtual method.
462
463 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
464
465         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
466         
467         * mini-sparc.c: Fix build.
468
469         * mini-sparc.c (get_call_info): Add support for generic sharing.
470
471         * mini-exceptions.c: Add a FIXME.
472
473 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
474
475         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
476         altstack handling code.
477
478         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
479         
480         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
481
482         * mini-s390.c: Add support for generic sharing.
483
484         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
485         Fix CAS on s390.
486         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
487
488         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
489
490         * mini-s390x.c: Add support for generic sharing.
491         
492         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
493         Fix CAS on ia64.
494         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
495
496         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
497         can be used since it takes a 16 bit signed immediate.
498
499         * inssel-s390x.brg: Fix OP_SETRET.
500
501         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
502
503         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
504
505         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
506
507         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
508
509         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
510         in one place.
511
512         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
513         stuff.
514
515         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
516         of the unused mono_arch_patch_delegate_trampoline stuff.
517
518 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
519
520         * basic-long.cs: Move the fp related tests to basic-float.cs.
521
522         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
523
524         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
525
526         * basic-calls.cs: Add a test for proper float argument passing.
527
528         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
529         if the context corresponds to an exception received through a signal.
530
531         * exceptions.cs: Add a test for nullref handling at the start of a try
532         clause.
533
534         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
535
536         * jit-icalls.c (mono_break): New JIT icall.
537
538         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
539
540         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
541
542 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
543
544         * cpu-*.md: Get rid of unused opcodes.
545
546         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
547
548         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
549         by all platforms.
550
551         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
552         define.
553
554         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
555         the arch independent trampoline code in mini-trampolines.c.
556
557         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
558
559         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
560
561         * mini-s390.h: Remove an unused define.
562         
563         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
564         the arch independent trampoline code in mini-trampolines.c.
565
566         * mini-arm.c (mono_arch_emit_prolog): Fix build.
567
568 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
569
570         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
571
572         * mini-s390.c (mono_arch_emit_prolog): Fix build.
573
574         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
575
576         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
577
578         * cpu-amd64.md: Use smaller sizes for int opcodes.
579
580         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
581
582         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
583         objects.cs.
584
585         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
586         debugging.
587
588         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
589         instead of though a pointer to save an indirection when accessing elements of
590         the array.
591
592         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
593         some typos.
594         (NOT_IMPLEMENTED): New helper macro.
595         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
596         of a bb.
597
598         * *.c: Use the new helper macro.
599
600 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
601
602         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
603
604 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
605
606         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
607         stack slots.
608
609 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
610
611         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
612         profiling is enabled.
613         
614         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
615         the end.
616         (mono_arch_emit_prolog): Add more first bblock optimizations.
617
618         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
619         in order if possible.
620         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
621         bblock, since the arguments are still in their original registers.
622
623         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
624
625 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
626
627         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
628         as well.
629
630         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
631         offset 0.
632
633         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
634
635         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
636         process async exceptions received while in unmanaged code.
637
638         * mini.c (mini_init): Install a callback with the runtime which will be called
639         when a thread receives an async exception while in unmanaged code.
640
641         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
642
643         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
644
645 2008-01-16  Wade Berrier  <wberrier@novell.com>
646
647         * cpu-g4.md:
648         * cpu-arm.md:
649         * cpu-s390x.md:
650         fix build
651
652 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
653
654         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
655         compilation with sun cc.
656
657         * cpu-*.md: Fix the build.
658
659         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
660
661         * mini-amd64.h: Add some comments to the MonoLMF structure.
662
663         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
664         
665         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
666         in the LMF structure if possible. This saves two instructions in the
667         managed->native wrappers.
668
669         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
670
671 2008-01-16  Mark Probst  <mark.probst@gmail.com>
672
673         * generic-sharing.c: New type argument lookup code which uses the
674         runtime generic context template.
675
676 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
677
678         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
679
680         * mini-arm.c (add_general): Fix arm eabi parameter passing.
681         (mono_arch_output_basic_block): Fix localloc implementation.
682
683         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
684
685         * mini-ia64.c (peephole_pass): Fix ia64 build.
686
687         * mini-amd64.c (peephole_pass): Fix a warning.
688         
689         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
690         at a constant offset from sp/fp.
691
692         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
693         instead of obtaining it from *lmf in the managed method case.
694
695 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
696
697         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
698
699 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
700
701         * mini.h (MonoInstList): New type.
702         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
703         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
704         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
705         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
706         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
707         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
708         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
709         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
710         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
711         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
712         MONO_INST_LIST_FOR_EACH_ENTRY,
713         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
714         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
715         mono_inst_list_first, mono_inst_list_last,
716         mono_inst_list_next, mono_inst_list_prev): New instruction
717         list handling interfaces.
718         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
719         list head 'ins_list'.
720         (MonoInst): Replace next pointer with list head 'node'.
721         (MonoCallInst): Make 'out_args' a MonoInstList.
722         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
723         (MonoCompile): Delete reverse_inst_list and
724         reverse_inst_list_len.
725         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
726         mono_arch_lowering_pass, mono_arch_local_regalloc,
727         mono_arch_output_basic_block, mono_arch_emit_prolog):
728         Convert to new instruction lists.
729         (insert_after_ins): Delete.
730         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
731         instruction lists.
732         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
733         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
734         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
735         mono_emulate_opcode, mono_emit_load_got_addr,
736         inline_method, mono_method_to_ir, mono_print_bb_code,
737         print_dfn, decompose_pass, nullify_basic_block,
738         replace_out_block_in_code, remove_block_if_useless,
739         merge_basic_blocks, move_basic_block_to_end,
740         try_unsigned_compare, optimize_branches, mono_print_code,
741         mini_select_instructions, remove_critical_edges): Likewise.
742         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
743         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
744         mono_arch_output_basic_block, mono_arch_emit_prolog):
745         Likewise.
746         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
747         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
748         mono_arch_output_basic_block): Likewise.
749         (inst_list_prepend, insert_after_ins): Delete.
750         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
751         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
752         instruction lists.
753         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
754         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
755         mono_arch_emit_prolog): Likewise.
756         * cfold.c (mono_constant_fold): Likewise.
757         * liveness.c (visit_bb, mono_analyze_liveness,
758         optimize_initlocals): Likewise.
759         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
760         * graph.c (mono_draw_code_cfg): Likewise.
761         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
762         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
763         mono_ssa_cprop): Likewise.
764         * abcremoval (get_relations_from_previous_bb, process_block):
765         Likewise.
766         * local-propagation (mono_cprop_invalidate_values,
767         mono_local_cprop_bb): Likewise.
768         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
769         peephole_pass, mono_arch_output_basic_block,
770         mono_arch_emit_prolog): Likewise.
771         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
772         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
773         mono_arch_emit_prolog): Likewise.
774         (insert_after_ins): Delete.
775         * aliasing.c (print_code_with_aliasing_information,
776         mono_build_aliasing_information, mono_aliasing_deadce):
777         Convert to new instruction lists.
778         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
779         peephole_pass, NEW_INS, mono_arch_lowering_pass,
780         mono_arch_local_regalloc, mono_arch_output_basic_block):
781         Likewise.
782         (insert_after_ins): Delete.
783         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
784         peephole_pass, mono_arch_output_basic_block): Convert to
785         new instruction lists.
786         * mini-codegen (InstList, inst_list_prepend,
787         insert_after_ins): Delete.
788         (insert_before_ins, get_register_force_spilling,
789         get_register_spilling, free_up_ireg, free_up_reg,
790         create_copy_ins, create_spilled_store, alloc_int_reg,
791         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
792         to new instruction lists.
793         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
794         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
795         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
796         (insert_after_ins): Delete.
797         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
798         mono_arch_local_regalloc, mono_arch_output_basic_block,
799         mono_arch_call_opcode): Convert to new instruction lists.
800         (insert_after_ins): Delete.
801         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
802         peephole_pass, mono_arch_output_basic_block,
803         mono_arch_emit_prolog): Convert to new instruction lists.
804
805 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
808
809         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
810         Fixes #353182.
811
812         * Makefile.am (version.h): Make this work with non-bash shells.
813
814 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
815
816         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
817
818 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
819
820         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
821         the InitializeArray optimization.
822
823 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
824
825         * mini.c driver.c: Don't include os/gc_wrapper.h.
826
827 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
828
829         * mini.c (print_jit_stats): Print GC statistics if available.
830
831 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
832
833         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
834
835 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
836
837         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
838
839 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
840
841         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
842         
843         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
844
845         * driver.c (mono_main): Ditto.
846
847 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
848
849         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
850
851         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
852         in the vtable can't be encoded.
853         (compile_method): Ditto.
854
855 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
856
857         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
858         defined.
859
860         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
861         lmf->rbp.
862
863         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
864         the top LMF entry belongs to the current method.
865
866         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
867
868 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
869
870         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
871         
872         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
873
874         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
875
876         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
877
878         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
879
880         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
881         implementation.
882
883         * basic-float.cs: Add an ulong->double cast test.
884
885 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
886
887         * mini.c (mono_method_to_ir): Fix a warning.
888
889 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
890
891         * mini-ops.h: Add OP_SWITCH.
892
893         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
894         CEE_SWITCH in back-end code, use OP_SWITCH instead.
895
896 2007-12-11  Geoff Norton  <gnorton@novell.com>
897
898         * mini-s390x.c: Minor change to the MAX() define to allow
899         it to compile with other gcc versions.
900
901 2007-12-11  Geoff Norton  <gnorton@novell.com>
902
903         * cpu-s390x.md:
904         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
905
906 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
907
908         exceptions-arm.c (mono_arch_get_restore_context): Restore
909         the frame pointer.
910
911         exceptions-arm.c (throw_exception): Save the frame pointer.
912         This is a partial fix for #323747. Only the client side is
913         fixed.
914
915 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
916
917         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
918         was using an unrelated variable to log the class which
919         needed the cctor to be called. This was crashing on arm.
920
921 2007-12-09  Robert Jordan  <robertj@gmx.net>
922
923         * mini-x86.c (mono_arch_emit_epilog):
924         Consider all kinds of 64-bit types. Fixes #323114.
925
926 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
927
928         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
929
930 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
931
932         * mini-amd64.c (peephole_pass): Add a missing instruction check.
933
934 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
935
936         * mini.c: run type ctor before allocating an object, not only
937         when running it's constructor method (fixes at least part of bug #342507).
938
939 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
940         
941         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
942         
943         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
944         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
945         function.
946
947         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
948         mono_generic_class_init_trampoline () the same as it is done with the other
949         trampolines.
950
951         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
952         aot-runtime.c aot-compiler.c: Implement AOT support.    
953
954 2007-12-07  Mark Probst  <mark.probst@gmail.com>
955
956         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
957         build for archs which don't have the vtable trampoline defined
958         yet.
959
960 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
961
962         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
963
964         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
965
966         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
967
968         * tramp-<ARCH>.c: Use the new helper function.
969
970 2007-12-07  Mark Probst  <mark.probst@gmail.com>
971
972         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
973         trampoline call, which takes a vtable argument.
974
975         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
976         OP_TRAMPCALL_VTABLEs like other calls.
977
978         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
979         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
980         call.  Implemented a support function which fetches the vtable
981         from a register set.
982
983         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
984         Implemented a generic class init trampoline, using the
985         OP_TRAMPCALL_VTABLE opcode.
986
987         * mini.c: Implemented static field access when sharing generic
988         code.  This implies initing the class using the new
989         OP_TRAMPCALL_VTABLE call.
990
991 2007-12-07  Mark Probst  <mark.probst@gmail.com>
992
993         * mini.c: Don't compile methods with sharing enabled if their
994         classes are disabled for sharing.
995
996 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
997
998         * inssel.brg: Add a missing sign extension to the GETCHR and array access
999         opcodes. Fixes #346563.
1000
1001         * objects.cs: Add a new test.
1002
1003         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1004
1005         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1006         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1007
1008 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1009
1010         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1011
1012 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1015         code stream.
1016
1017 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1018
1019         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1020
1021         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1022         optimization in the AOT case.
1023         
1024 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1025
1026         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1027         
1028         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1029
1030         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1031
1032         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1033
1034         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1035         is created by the inlined delegate ctor.
1036
1037         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1038
1039         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1040
1041 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1042
1043         * cpu-x86.md: Fix the length of ckfinite.
1044
1045 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1046
1047         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1048         
1049         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1050         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1051
1052         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1053
1054         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1055         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1056
1057 2007-11-28  Martin Baulig  <martin@ximian.com>
1058
1059         * mini-x86.c
1060         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1061         after creating the trampoline.
1062
1063 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1064
1065         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1066
1067         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1068         the same version.
1069
1070         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1071         instead of the calling method to help AOT.
1072
1073         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1074
1075 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1076
1077         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1078         is defined.
1079
1080 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1081
1082         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1083         
1084         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1085         (encode_method_ref): No need to handle generic method definitions specially.
1086
1087         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1088
1089         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1090         decode_klass_info.
1091
1092         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1093         encode_klass_info.
1094         (compile_method): Enable generic sharing.
1095
1096 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1097
1098         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1099         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1100
1101         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1102         generic code.
1103
1104         * mini-trampolines.c: Fix a warning.
1105
1106         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1107         NEW_PCONST.
1108         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1109         (generic_class_is_reference_type): Remove unused function.
1110
1111         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1112         in the generic vtable trampoline case.
1113
1114         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1115         
1116         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1117         return an AOT method based on a vtable slot.
1118
1119         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1120
1121         * mini.c (mini_get_vtable_trampoline): Export this.
1122
1123 2007-11-22  Martin Baulig  <martin@ximian.com>
1124
1125         * debug-debugger.h
1126         (MonoDebuggerInfo): Move `debugger_version' up.
1127
1128 2007-11-22  Martin Baulig  <martin@ximian.com>
1129
1130         * mini-amd64.c
1131         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1132
1133         * mini-trampolines.c
1134         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
1135         after compiling the method.
1136
1137 2007-11-20  Martin Baulig  <martin@ximian.com>
1138
1139         * debug-mini.c
1140         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
1141         (mono_debugger_remove_breakpoint): Likewise.
1142         (mono_debugger_check_breakpoints): Likewise.
1143
1144         * debug-debugger.c: Implement the new breakpoint interface here.
1145
1146 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
1147
1148         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
1149         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
1150
1151         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
1152
1153 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
1154
1155         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
1156
1157         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
1158         mini.c.
1159
1160         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
1161         mini.c.
1162
1163         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
1164         returning a vtype in a register.
1165
1166         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
1167         here from the arch specific code.
1168
1169         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
1170         mini.c.
1171
1172         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
1173         (mono_arch_emit_prolog): Increment maximum prolog size.
1174
1175         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
1176         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
1177
1178         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
1179         MonoGenericSharingContext.
1180
1181         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
1182         MonoGenericSharingContext. Allocate memory from the cfg mempool.
1183
1184 2007-11-15  Mark Probst  <mark.probst@gmail.com>
1185
1186         * mini.c, mini.h, generic-sharing.c: Functions for producing code
1187         which extract fields out of the runtime generic context.  Full
1188         sharing of the NEWARR opcode.
1189
1190 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
1191
1192         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
1193         --enable-minimal=ssa.
1194
1195 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
1196
1197         * mini-trampolines.c (mono_delegate_trampoline): Update after 
1198         mono_marshal_get_delegate_invoke () signature change.
1199
1200 2007-11-13  Mark Probst  <mark.probst@gmail.com>
1201
1202         * mini.c: Removed the shared context in favor of the generic
1203         sharing context.  Allocate the MonoJitInfo structure with room for
1204         the generic sharing context if it's needed.
1205
1206         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
1207         domain-internals.h now.
1208
1209         * mini-x86.c: Pass the generic sharing context to get_call_info ().
1210
1211         * generic-sharing.c: Several changes for working without a shared
1212         context and instead operating on open types instead.
1213
1214 2007-11-12  David S. Miller  <davem@davemloft.net>
1215
1216        * inssel-sparc.brg: Fix double instruction emit.
1217
1218 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
1221         Get/Set/Address methods.
1222         
1223         * mini.c debug-debugger.c mini-trampolines.c: Update after 
1224         mono_marshal_get_delegate_invoke signature change.
1225
1226 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1227
1228         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
1229         This can happens with dynamic methods. Fixes the other bug in #322722.
1230
1231 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1232
1233         * tramp-arm.c (mono_arch_patch_callsite): Support patching
1234         BX call sequence.
1235
1236         * mini-arm.c (arm_patch): Implement patching of BX call
1237         sequence. Fixes one of the bugs in #322722.
1238
1239 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
1240
1241        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
1242        under Linux.  We only need to flush every 32-byte cache line.    
1243
1244 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
1245
1246         * mini.c:
1247         move_basic_block_to_end: Add branches when needed, eventually creating
1248         a new BB.
1249         optimize_branches: added a parameter that tells if it's ok to create
1250         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
1251         and avoid calling move_basic_block_to_end when it's not ok.
1252         Fixes bug 318677.
1253
1254 2007-11-07  Mark Probst  <mark.probst@gmail.com>
1255
1256         * mini.c: Abort inlining call to InitializeArray if something
1257         looks wrong.  Let the icall handle it, which now has proper safety
1258         checks.
1259
1260 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1261
1262         * mini.c (mono_spill_call): add support for soft-float.
1263
1264         * mini.c (mono_method_to_ir): add support for soft-float
1265         to inlined functions that return float.
1266
1267         * mini.c (mono_method_to_ir): add support for soft-float
1268         to cee_stsfld opcode on float fields.
1269
1270 2007-11-05  Geoff Norton  <gnorton@novell.com>
1271
1272         * mini-x86.h: Fix the structure access for X86 Leopard.
1273
1274
1275 2007-11-05  Martin Baulig  <martin@ximian.com>
1276
1277         * mini-trampolines.c
1278         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
1279         after compiling the method to notify the debugger.
1280
1281 2007-11-05  Martin Baulig  <martin@ximian.com>
1282
1283         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
1284
1285 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
1286
1287         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
1288         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
1289
1290 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
1291
1292         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
1293         native-to-managed wrappers.
1294         
1295 2007-11-01  Geoff Norton  <gnorton@novell.com>
1296
1297         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
1298         members.
1299
1300 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
1301
1302         * mini.c, mini-x86.c: when getting back from unmanaged code
1303         to managed via a marshaled delegate we also need to set the
1304         right domain.
1305
1306 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
1307
1308         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
1309         for amd64.
1310
1311 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
1312
1313         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
1314         let the debugger or other external agents to tell the JIT when
1315         a sw breakpoint has been inserted in the code that the JIT needs
1316         to be able to inspect.
1317
1318 2007-10-31  Martin Baulig  <martin@ximian.com>
1319
1320         * debug-debugger.h
1321         (MonoDebuggerInfo): Remove `runtime_class_init'.
1322
1323 2007-10-30  Martin Baulig  <martin@ximian.com>
1324
1325         * debug-mini.h
1326         (mono_debugger_thread_created): Added `MonoThread *' argument.
1327         (mono_debugger_extended_notification): New public method.
1328         (mono_debugger_trampoline_compiled): New public method.
1329
1330         * debug-mini.c
1331         (MonoDebuggerThreadInfo): Added `thread' and
1332         `extended_notifications' fields.
1333
1334         * debug-debugger.c
1335         (debugger_executable_code_buffer): New static variable.
1336
1337         * debug-debugger.h
1338         (MonoDebuggerInfo): Added `executable_code_buffer',
1339         `executable_code_buffer_size', `breakpoint_info_area',
1340         `breakpoint_table' and `breakpoint_table_size'.
1341
1342 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
1343
1344         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
1345         that IP  either is an unused value or the vtable pointer. IMT 
1346         calls use vtable + offset now. Reduced by almost half the size
1347         of IMT entries.
1348
1349 2007-10-26  Jonathan Chambers <joncham@gmail.com>
1350
1351         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
1352         defines to access param registers. Replace long usage with
1353         gsize as sizeof(long) != sizeof(void*) on Win64.
1354
1355         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
1356         on Win64. Fix intrinsic, use _AddressOfReturnAddress
1357         instead of non-existant _GetAddressOfReturnAddress.
1358
1359         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
1360         param registers. Save/restore %rdi and %rsi in MonoLMF.
1361
1362         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
1363         param registers. Modify (throw_exception) signature to take 
1364         %rdi and %rsi on Win64. 
1365
1366         Code is contributed under MIT/X11 license.
1367
1368 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1369
1370         * helpers.c: unlink debugging output files.
1371
1372 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
1373
1374         * mini.c: Move mono_create_ftnptr () to object.c.
1375
1376 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1377
1378         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
1379         optional. This function can now be used to disassemble code generated
1380         outside the JIT such as trampolines and IMT thunks.
1381
1382         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
1383
1384         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
1385         vtable pointer from a ldr instruction.
1386
1387         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
1388         new IMT call sequence.
1389
1390         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
1391         call sequence for interface invocations.
1392
1393         * mini-arm.c (mono_arch_emit_imt_argument): added, required
1394         for imt support. This function is empty since IMT on ARM requires no
1395         special handling on the IR side.
1396
1397         * mini-arm.c (mono_arch_find_imt_method): added, required for
1398         imt support.
1399
1400         * mini-arm.c (mono_arch_find_this_argument): added, required
1401         for imt support.
1402
1403         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
1404         a ldr instruction to load a value stored in the code stream.
1405
1406         * mini-arm.c (mono_arch_build_imt_thunk):added, required
1407         for imt support.
1408
1409
1410 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
1411
1412         * mini.c (mini_init): Install the jump trampoline callback.
1413
1414 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1415
1416         * mini-trampolines.c: handle synchronized methods with the common
1417         vtable trampoline (bug #335601).
1418
1419 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
1420
1421         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
1422
1423         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
1424         64 bit platforms.
1425
1426         * mini-ia64.h mini-ia64.c: Add support for IMT.
1427
1428         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
1429         prolog. Fixes #331958.
1430
1431 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
1432
1433         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
1434
1435 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1436
1437         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
1438         trampoline.
1439
1440 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1441
1442         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
1443         trampoline.
1444
1445 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
1446
1447         * mini-x86.c, mini-x86.h: x86 support for the common vtable
1448         trampoline.
1449
1450 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
1451
1452         * mini-trampolines.c: changed the magic rampoline to understand
1453         the common vtable trampoline method: the method to invoke is
1454         determined by the vtable displacement of the call.
1455
1456 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1457
1458         * mini.c, mini.h: register the common vtable trampoline if the
1459         architecture supports it.
1460
1461 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1462
1463         * cpu-amd64.md: use the correct max length for tls_get.
1464
1465 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
1466
1467         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
1468         CEE_STELEM_ANY. Fixes #333696.
1469
1470 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
1471
1472         * exceptions-x86.c: provide more graceful handling of the case where
1473         we followed a bogus function pointer from managed code (bug #332866).
1474
1475 2007-10-11  Mark Probst  <mark.probst@gmail.com>
1476
1477         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
1478         replaces the generic_shared flag and will carry more information
1479         in the future.
1480
1481         * generic-sharing.c: Added mini_type_stack_size() which allows
1482         allows open types if given a generic sharing context.
1483         mini_get_basic_type_from_generic() takes a
1484         MonoGenericSharingContext* instead of a MonoCompile* now.
1485
1486         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
1487         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
1488         mini-sparc.c, mini-x86.c: Trivial changes required by the two
1489         changes above.  Just passing arguments through to the right
1490         places.
1491
1492 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1493
1494         * mini-arm.c: unify the call emission to emit_code_seq().
1495
1496 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
1497
1498         * tramp-arm.c: reduced the trampoline size.
1499
1500 2007-10-10  Mark Probst  <mark.probst@gmail.com>
1501
1502         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
1503         variable handling out of arch-specific code.
1504
1505 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
1506
1507         * mini-arm.c: implemented fast delegate dispatch.
1508
1509 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
1510
1511         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
1512         that fp elimination is turned off if the space required by locals is too
1513         big. Fixes #331958.
1514
1515 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1516
1517         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
1518         ARM to the new style trampoline.
1519
1520 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
1523
1524         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
1525
1526 2007-10-09  Martin Baulig  <martin@ximian.com>
1527
1528         * debug-debugger.h
1529         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
1530         `field_info_offset_offset'.     
1531
1532 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
1533
1534         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
1535         removed more internal usage of the r11 register and made it available
1536         to the register allocator.
1537
1538 2007-10-08  Mark Probst  <mark.probst@gmail.com>
1539
1540         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
1541         when sharing generics and treat type variables as references.
1542
1543 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1544
1545         * mini-ppc.c: started removing the internal uses of register r11
1546         to eventually allow the register allocator to manage it as an
1547         additional available register.
1548
1549 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
1550
1551         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
1552
1553 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
1554
1555         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
1556         specific trampolines as they are not performance critical as a jump
1557         target (maybe align as before only for AOT code?). This saves about
1558         200 KB of native code on x86 for monodevelop startup.
1559
1560 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1561
1562         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
1563         monodevelop startup.
1564
1565 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
1566
1567         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
1568
1569         * mini-sparc.h mini-sparc.c: Implement IMT support.
1570
1571         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
1572         its smaller and doesn't clobber sparc_g1.
1573
1574         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
1575
1576 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1577
1578         * mini-ppc.c: optimized the size of the IMT thunks a bit.
1579
1580 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
1581
1582         * mini-ppc.c: implemented fast delegate invocation.
1583
1584 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
1585
1586         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
1587
1588 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1589
1590         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
1591         code to the new style trampoline in preparation for IMT support.
1592
1593 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1594
1595         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
1596         systems already. This also reduces the specific trampiline sizes and
1597         prepares for the use of r12 as the IMT identifier register.
1598
1599 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1600
1601         * mini-mips.h: endianess fix (simplified from a patch by
1602         Thomas Kunze <thommy@tabao.de>, bug #323737).
1603
1604 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1605
1606         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
1607         to access ucontext fields and enable netbsd support
1608         (partially from Magnus Henoch <mange@freemail.hu>).
1609
1610 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1611
1612         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
1613         use the preprocessor from the CPP env var if it is set.
1614
1615 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1616
1617         * mini-trampolines.c: fixed an assertion and moved it earlier in the
1618         code, before interface_offset gets used.
1619
1620 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
1621
1622         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
1623         mono_class_setup_vtable () before accessing klass->vtable.
1624
1625 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
1626
1627         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
1628         hackish.
1629
1630 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1631
1632         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
1633         IMT slots (this saves hundreds of KB of memory in programs like
1634         IronPython and Monodevelop).
1635
1636 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
1637
1638         * mini.c: print the delegate counter.
1639
1640 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
1641
1642         * mini-x86.c: make it easier to enable the debugging code for IMT
1643         slots.
1644
1645 2007-09-28  Martin Baulig  <martin@ximian.com>
1646
1647         * debug-debugger.h
1648         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
1649         `mono_method_klass_offset' and `mono_method_token_offset'.
1650
1651 2007-09-20  Mark Probst  <mark.probst@gmail.com>
1652
1653         * mini.c: First generics sharing implementation.  Can only share
1654         in very simple cases.  If sharing doesn't work it falls back to
1655         dedicated compilation.
1656
1657         * mini.h: Flag in MonoCompile to specify whether generic
1658         compilation is shared.  Flags enum for marking which generic inst
1659         of a context is used.  Prototypes for helper functions.
1660
1661         * generic-sharing.c: Helper functions for generic method sharing.
1662
1663         * optflags-def.h: Optimization flag (gshared) for enabling generic
1664         method sharing added.
1665
1666         * Makefile.am: generic-sharing.c added.
1667
1668 2007-09-19 Daniel Nauck <dna@mono-project.de>
1669
1670         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
1671
1672 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
1673         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
1674         fixes bug 325507.
1675
1676 2007-09-19  Martin Baulig  <martin@ximian.com>
1677
1678         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
1679         mono_debug_cleanup() is now part of mono_cleanup().
1680
1681 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * driver.c (mono_main): Fix a warning.
1684
1685 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
1686
1687         * aot-compiler.c: Optimize various parts when processing large assemblies.
1688         Fixes ##325568.
1689
1690         * mini.c (mono_patch_info_hash): Improve hash function.
1691
1692 2007-09-14  Jonathan Chambers <joncham@gmail.com>
1693
1694         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
1695         
1696         Code is contributed under MIT/X11 license.
1697
1698 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1699
1700         * mini.c (mini_init): Fix a leak.
1701
1702         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
1703
1704 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
1705
1706         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
1707
1708 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1709
1710         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
1711
1712 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1713
1714         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
1715         variance tests.
1716
1717         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
1718
1719         * mini.c (handle_alloc): Enable managed allocators in AOT code.
1720
1721         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
1722
1723         * aot-runtime.c (decode_patch_info): Ditto.
1724
1725 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1726
1727         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
1728         static case. Cache delegates in architecture specific code, 
1729         based on number of parameters.
1730         
1731         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
1732         in architecture specific code, based on number of parameters.
1733         
1734         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
1735         caching happen in architecture specific code now.
1736         
1737         Code is contributed under MIT/X11 license.
1738
1739 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1740
1741         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
1742         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
1743         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
1744
1745         Code is contributed under MIT/X11 license.
1746
1747 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
1748         * mini.c: (mono_thread_abort) Fixed bug #82416.
1749
1750 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1751
1752         * mini.: hook the new managed GC allocation feature into the JIT.
1753
1754 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
1755
1756         * mini.c: implementation for the new runtime tls opcode.
1757
1758 2007-09-11  Martin Baulig  <martin@ximian.com>
1759
1760         * debug-debugger.h
1761         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
1762         `mono_method_inflated_offset'.
1763
1764 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
1765
1766         * driver.c mini.h mini.c: Add a new devel command line option for injecting
1767         async exceptions into a method.
1768
1769         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
1770         purpose of testing whenever the unwinder works at every instruction.
1771
1772 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
1773
1774         * mini.c: check accessibility of method used in ldftn (fixes
1775         bug #82635).
1776
1777 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
1778
1779         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
1780
1781         * inssel.brg: Fix a warning.
1782
1783 2007-09-03  Martin Baulig  <martin@ximian.com>
1784
1785         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
1786         now takes the `main_method' as argument.
1787
1788 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
1789
1790         * cpu-sparc.md (endfilter): Add missing src1:i argument.
1791
1792 2007-08-30  Jonathan Chambers <joncham@gmail.com>
1793
1794         * driver.c: include the cil-coff.h header on Windows.
1795         
1796         Code is contributed under MIT/X11 license.
1797
1798 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
1799
1800         * mini.c, driver.c: don't include the cil-coff.h header.
1801
1802 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1803
1804         * mini.c: flag places that needs fixes fo soft-float support.
1805
1806 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
1807
1808         * mini.h, inssel-float.brg: fix soft-float constant loads on big
1809         endian systems (partially from Dean Jenkins, bug #81924).
1810
1811 2007-08-28  Mark Probst  <mark.probst@gmail.com>
1812
1813         * mini.c (check_linkdemand): Remove embedded reference object in
1814         call to LinkDemandSecurityException.
1815         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
1816         with an IntPtr instead of a reference object.
1817
1818 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1819
1820         * mini.c (handle_initobj): Handle alignment properly.
1821
1822         * inssel.brg (mini_emit_memset): Ditto. 
1823
1824         * inssel.brg (mini_emit_memcpy): Ditto. 
1825
1826         * inssel-sparc.brg: Ditto.              
1827
1828         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
1829
1830 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
1831
1832         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
1833         exceptions raised in unmanaged code. Fixes part of #82594.
1834
1835 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1836
1837         * mini.c (mono_method_to_ir), declsec.c
1838         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
1839
1840 2007-08-22  Martin Baulig  <martin@ximian.com>
1841
1842         * debug-mini.h
1843         (MonoDebuggerThreadInfo): New typedef.
1844         (mono_debugger_thread_table): New global variable.
1845         (mono_debugger_thread_created): New public function.
1846         (mono_debugger_thread_cleanup): New public function.
1847
1848         * debug-debugger.h
1849         (MonoDebuggerInfo):
1850         - removed `get_current_thread' and `lookup_assembly'.
1851         - removed `data_table'.
1852         - added `thread_table'.
1853
1854         * mini.c
1855         (mono_thread_start_cb): Call mono_debugger_thread_created().
1856         (mono_thread_attach_cb): Likewise.
1857         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
1858         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
1859         initial domain.
1860
1861         * driver.c (mono_main): Move mono_debug_init() up, before calling
1862         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
1863
1864 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1865
1866         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
1867         together when passing several arguments of type double (gives a small
1868         speedup and saves a few bytes of generated code).
1869
1870 2007-08-20  Jb Evain  <jbevain@novell.com>
1871
1872         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
1873
1874 2007-08-20  Jb Evain  <jbevain@novell.com>
1875
1876         * mini.c (mono_method_to_ir): throw MethodAccessException
1877         and FieldAccessException instead of InvalidProgramException.
1878
1879 2007-08-20  Mark Probst  <mark.probst@gmail.com>
1880
1881         * mini.c: CoreCLR security checks.
1882
1883         * mini.h: Removed MonoSecurityMode (moved to
1884         metadata/security-manager.h) and mono_security_mode global var
1885         (replaced by set/get functions in security-manager.h).
1886
1887         * driver.c: Added "core-clr-test" security mode for testing.  Used
1888         set-function for setting security mode.
1889
1890 2007-08-17  Mark Probst  <mark.probst@gmail.com>
1891
1892         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
1893         the new jit_info_table.
1894
1895         * driver.c: Test code for the new jit_info_table (enabled by the
1896         define MONO_JIT_INFO_TABLE_TEST).
1897
1898 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
1899
1900         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
1901         detection of call <REG> instruction sequence. Fixes build on freebsd.
1902
1903 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
1904
1905         * mini-exceptions.c: Fix a warning.
1906
1907 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
1908
1909         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
1910         stack overflow handling code on amd64 too.
1911
1912         * mini-exceptions.c (mono_setup_altstack): Make this use 
1913         mono_thread_get_stack_bounds ().
1914
1915         * mini-x86.h: Disable sigaltstack on solaris x86.
1916
1917 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
1918
1919         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
1920
1921 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
1922
1923         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
1924
1925 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
1926
1927         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
1928
1929         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
1930
1931 2007-08-03  Neale Ferguson <neale@sinenomine.net>
1932
1933         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
1934         due to alignment.
1935
1936 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
1937
1938         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
1939         to be emitted (bug #82281).
1940
1941 2007-08-01  Martin Baulig  <martin@ximian.com>
1942
1943         Merged the `debugger-dublin' branch.
1944
1945         * debug-debugger.h (MonoDebuggerInfo):
1946         Removed the `old_*' compatibility entries.
1947         Added `debugger_version' and `data_table'.
1948         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
1949         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
1950
1951         * debug-mini.c
1952         (MiniDebugMethodBreakpointInfo): Add `address_list'.
1953         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
1954         instead of a `gconstpointer'.
1955         (mono_debugger_insert_method_breakpoint): Return a
1956         `MonoDebugMethodAddressList *'.
1957
1958 2007-06-28  Martin Baulig  <martin@ximian.com>
1959
1960         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
1961
1962 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
1963
1964         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
1965         __builtin_frame_address () since it is broken on older gcc versions.
1966
1967 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1968
1969         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
1970         on the stack overflow handling and made the managed stack overflows
1971         catchable in most cases using soft guard pages.
1972         * exceptions-x86.c: added code to restore the protection in the soft
1973         guard pages at the end of exception handling.
1974
1975 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
1976
1977         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
1978
1979 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
1980
1981         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
1982         exception handling.
1983
1984 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
1985
1986         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
1987         signal handling support until it has been ported to the new mechanism.
1988         * mini.c: fixed stack overflow detection and use the new
1989         architecture code  to handle signals on the altstack.
1990
1991 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
1992
1993         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
1994         stack overflows on the alt stack.
1995
1996 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
1997
1998         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
1999         stack overflows on the alt stack.
2000
2001 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2002
2003         * exceptions-ppc.c: cleanup preparing for altstack support.
2004
2005 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2006
2007         * exceptions-arm.c: cleanup preparing for altstack support.
2008
2009 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2010
2011         * mini.c (print_jit_stats): Output hazard pointer stats.
2012
2013 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2014
2015         * driver.c, mini.c: Replaced security mode flags with a single
2016         enum variable.
2017
2018 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2019
2020         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2021
2022 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2023
2024         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2025         (which doesn't do anything yet) for activating Core CLR
2026         (Silverlight) security.
2027
2028 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2029
2030         * mini-codegen.c: work around a possible gcc bug on arm.
2031
2032 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2033
2034         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2035         message for platforms that don't support AOT compilation.
2036
2037 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2038
2039         * mini.h, mini.c, driver.c: temporary smcs hack.
2040
2041 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2042
2043         * mini-arm.h, mini-arm.c: arm EABI fixes.
2044
2045 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2046
2047         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2048         case.
2049
2050         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2051         trampolines taking a method argument.
2052
2053         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2054
2055         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2056         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2057
2058         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2059         JIT compilation throws an exception. Fixes #82050.
2060
2061 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2062
2063         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2064         with the MONO_EXCEPTION_ defines.
2065
2066 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2069         #82117.
2070         
2071         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2072         the cause of an assertion.
2073
2074 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2075
2076         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2077         removed.
2078
2079 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2080
2081         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2082         assert. Should fix #82103.
2083
2084 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2085
2086         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2087         here too. Fixes #82095.
2088
2089         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2090         addresses.
2091
2092         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2093
2094         * mini-amd64.h: Enable IMT for amd64.
2095         
2096         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2097
2098 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2099
2100         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2101
2102 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2103
2104         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2105         as soon as check_linkdemand sets an exception_type.
2106
2107 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2108
2109         * mini-x86.c: fixed offsets for IMT call sequence.
2110         * mini-x86.h: enable IMT again.
2111
2112 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2113
2114         * trace.c (mono_trace_enter_method): Decode MonoType too.
2115
2116         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2117
2118         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2119
2120         * mini-amd64.c: Add preliminary IMT implementation.
2121         
2122 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2123
2124         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2125         understand the new IMT-base interface invocation (thanks to
2126         Daniel Nauck for the report and the remote debugging session).
2127
2128 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2129
2130         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2131
2132 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * Makefile.am (aotcheck): Make this actually use the AOTed code.
2135
2136 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
2137
2138         * mini-trampolines.c: implement AOT IMT support.
2139         * mini-x86.h: enable IMT support for wider testing.
2140
2141 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * inssel.brg (emit_imt_argument): Add aot support here.
2144
2145         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
2146
2147 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2148
2149         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
2150         of the IMT implementation, partially from massi, with my
2151         implementation of the bsearch sequence. Disabled by default until
2152         the AOT code is implemented.
2153
2154 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2155
2156         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
2157
2158         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
2159
2160 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2161
2162         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
2163         arch-independent IMT JIT code from Massimiliano
2164         Mantione (massi@ximian.com) with small cleanups from me.
2165
2166 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2167
2168         * Makefile.am: fix svn invocation to get the svn revision to be
2169         independent of the local language (build fix).
2170
2171 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2172
2173         * mini.c (inline_method): Reset cfg->exception_type if the
2174         inlining is aborted.  Fixes: 82049.
2175
2176 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
2177
2178         * mini.c: remove assert from exception handling code when exception_ptr
2179         is not set.
2180
2181 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2182
2183         * mini.c (mono_codegen): Add an assert.
2184
2185         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
2186         enter and leave code.
2187         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
2188
2189 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2190
2191         * mini-ppc.c: fixed memory corruption for localloc(0)
2192         (bug #81852).
2193
2194 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2195         
2196         * mini.c: Fix warnings.
2197
2198 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
2199
2200         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
2201         to emit better double->int conversions.
2202
2203 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2204
2205         * mini.c: the provided Min/Max optimizations are valid for unisgned
2206         ints.
2207
2208 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
2209
2210         * 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
2211
2212 2007-06-28  Miguel de Icaza  <miguel@novell.com>
2213
2214         * mini.c (mono_running_on_valgrind): Add support for reporting the
2215         method and  its boundaries to valgrind.
2216
2217 2007-06-28  Martin Baulig  <martin@ximian.com>
2218
2219         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2220
2221 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
2222
2223         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
2224
2225         * generic.2.cs: Add new test case.
2226
2227 2007-06-25  Martin Baulig  <martin@ximian.com>
2228
2229         Merged the `debugger-dublin' branch.
2230
2231         * debug-mini.c
2232         (mono_debugger_insert_method_breakpoint): New public method.
2233         (mono_debugger_remove_method_breakpoint): Likewise.
2234         (mono_debugger_check_breakpoints): New static method.
2235         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
2236
2237         * debug-debugger.h (MonoDebuggerInfo):
2238         Renamed (to keep backward compatibility in the vtable):
2239         `insert_breakpoint' -> `old_insert_breakpoint'.
2240         `remove_breakpoint' -> `old_remove_breakpoint'.
2241         `create_string' -> `old_create_string'.
2242         `lookup_class' -> `old_lookup_class'.
2243         `lookup_type' -> removed; changed into a dummy field.
2244         `lookup_assembly' -> `old_lookup_assembly'.
2245         Added (same functionality, but different signature):
2246         `create_string', `lookup_class', `lookup_assembly'
2247         Added new:
2248         `get_method_addr_or_bpt', `remove_method_breakpoint',
2249         `runtime_class_init'.
2250
2251         * debug-debugger.c: Merged the `debugger-dublin' branch.
2252
2253 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
2254
2255         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
2256         well.
2257         (peephole_pass): Likewise.
2258
2259 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
2260
2261         * driver.c: hopefully make setaffinity work also for ancient
2262         versions of linux.
2263
2264 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
2265
2266         * driver.c : win32 build fix.
2267
2268 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2269
2270         * driver.c: check for the MONO_NO_SMP env var and bind to a single
2271         processor if it is set.
2272
2273 2007-06-21  Martin Baulig  <martin@ximian.com>
2274
2275         * debug-mini.h: New file.
2276
2277         * debug-mini.c
2278         (mono_debugger_insert_breakpoint_full): Moved here from
2279         ../metadata/mono-debug-debugger.c.
2280         (mono_debugger_remove_breakpoint): Likewise.
2281         (mono_debugger_breakpoint_callback): Likewise.
2282
2283 2007-06-15  Raja R Harinath  <rharinath@novell.com>
2284
2285         * jit-icalls.c (mono_helper_compile_generic_method): Update to
2286         changes in MonoGenericClass.
2287
2288 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
2289
2290         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
2291
2292 2007-06-14  Raja R Harinath  <rharinath@novell.com>
2293
2294         * jit-icalls.c (mono_helper_compile_generic_method): Update to
2295         removal of MonoGenericMethod.
2296
2297 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2298
2299         * mini-exceptions.c: hooks for the exception events profiling API.
2300
2301 2007-06-14  Randolph Chung  <tausq@debian.org>
2302
2303         * Makefile.ma: Add hppa target.
2304         * mini-arch.h: Include mini-hppa.h
2305         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
2306         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
2307         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2308
2309 2007-06-14  Randolph Chung  <tausq@debian.org>
2310
2311         * inssel.brg: Add rules for "chained" compare-branch operations so that
2312         a single compare op can affect multiple branches.  Adjust cost for
2313         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
2314         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
2315         cost for some rules so that they can more easily be overridden by
2316         per-arch rules (with fixes from lupus).
2317         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2318
2319 2007-06-13  Randolph Chung  <tausq@debian.org>
2320
2321         * mini-ops.h: Reorder branch ops so that they match the order of the
2322         corresponding CEE_* ops.  The code expects them this way.
2323         Add new ops for HPPA target.
2324         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2325
2326 2007-06-13  Randolph Chung  <tausq@debian.org>
2327
2328         * mini-exceptions.c: Handle cases where the stack grows towards
2329         larger addresses.
2330         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2331
2332 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2333
2334         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
2335         counter.
2336         * driver.c: explain where a non-matching corlib is found.
2337
2338 2007-06-13  Mark Probst  <mark.probst@gmail.com>
2339
2340         * mini.c (print_jit_stats): Output dynamic code allocation stats.
2341
2342 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
2343
2344         * mini-exceptions.c: Generate a method profile leave event during
2345         an exception to ensure that the profiler gets notified.
2346
2347 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
2348
2349         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
2350         branch.
2351
2352         * cpu-amd64.md: Add long_and/or/xor opcodes.
2353
2354 2007-06-06  Wade Berrier  <wberrier@novell.com>
2355
2356         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
2357         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
2358         length of instruction shr_imm (expected 8, got 10)
2359
2360 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
2363
2364 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2365
2366         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
2367         MonoInternalHashTable again (fixed bug in the internal hash table
2368         code).
2369
2370 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2371
2372         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
2373         Have to figure out what makes it crash the SWF regression.
2374
2375 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
2376
2377         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
2378
2379 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2380
2381         * mini.c: optimize out the type check when storing null in a
2382         reference array.
2383
2384 2007-06-04  Mark Probst  <mark.probst@gmail.com>
2385
2386         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
2387         MonoInternalHashTable.
2388
2389 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2390
2391         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
2392         signed integer methods.
2393
2394 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
2395
2396         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
2397         permanently since the current approach doesn't work.
2398
2399 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
2400
2401         * inssel.brg (stmt): Only call delegate->invoke_impl if 
2402         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
2403
2404 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
2407         the sreg2==rdx case.
2408         
2409         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
2410         account if it contains a rex prefix.
2411         (peephole_pass): Handle OP_FMOVE as well.
2412
2413 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
2416         as it causes regressions.
2417
2418 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
2419
2420         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
2421         static case as well.
2422
2423         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
2424
2425         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
2426         (mono_arch_get_this_arg_from_call): Ditto.
2427
2428         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
2429
2430         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
2431         invoke_impl field.
2432
2433         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
2434         (mono_arch_get_this_arg_from_call): Ditto.
2435
2436         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
2437         
2438         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
2439         try to create optimized invoke code and use that for further invocations. 
2440         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
2441
2442         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
2443
2444 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
2445
2446         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
2447         sealed classes or methods.
2448         *devirtualization.cs: tests for the new optimization
2449
2450 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
2451
2452         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
2453         by the update_volatile () function.
2454
2455 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
2456
2457         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
2458         require it.
2459
2460         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
2461
2462 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
2463
2464         * mini.c: Add configure checks for header files.
2465         * mini-x86.c: Add configure checks for header files.
2466         * trace.c: Add configure checks for header files.
2467         * aot-runtime.c: Add configure checks for header files.
2468         * aot-compiler.c: Add configure checks for header files.
2469         * driver.c: Add configure checks for header files.
2470         * mini-codegen.c: Add configure checks for header files.
2471         
2472         Code is contributed under MIT/X11 license.
2473
2474 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
2477         icompare_imm -128 + op_iclt. Fixes #81703.
2478
2479 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
2480
2481         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
2482
2483 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2484
2485         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
2486         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
2487         so that all isinst checks now use "interface_bitmap".
2488
2489 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
2490
2491         * cpu-amd64.md (jmp): Fix a warning.
2492
2493         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
2494
2495         * basic.cs: Add new regression test.
2496
2497         * basic.cs: Remove test which is now in basic-long.cs.
2498
2499         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
2500
2501         * basic-long.cs: Add new test.
2502         
2503 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
2506
2507 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
2510
2511         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
2512         places.
2513         
2514         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
2515         throwing code a bit.
2516
2517         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
2518         the exception throwing code a bit.
2519
2520         * mini-x86.c (get_call_info): Allocate result from a mempool.
2521
2522 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
2523
2524         * aot-compiler.c (find_typespec_for_class): Fix the assert.
2525
2526         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
2527
2528         * mini.h (MonoCompile): Add 'token_info_hash' field.
2529
2530         * mini.c: Save token->method associations during compilation so the AOT 
2531         compiler can use it.
2532         
2533         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
2534         which reference generic classes and methods.
2535
2536 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
2537
2538         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
2539
2540         * aot-compiler.c (compile_method): Fix a typo in a comment.
2541
2542         * aot-runtime.c (decode_cached_class_info): Skip generic types.
2543
2544         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
2545         everything generic.
2546
2547         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
2548
2549 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
2550
2551         * mini.h (MonoCompile): Add 'args' field.
2552
2553         * mini.c (mono_compile_create_vars): Store variables representing the arguments
2554         into cfg->args.
2555
2556         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
2557
2558 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
2559
2560         * mini.c (mono_compile_get_interface_var): Remove this unused function.
2561
2562         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
2563
2564         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
2565         opcodes for some opcodes.
2566
2567         * mini.h *.brg *.c: Use the new opcodes.
2568
2569 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
2570
2571         * mini.h: Bumped aot revision.
2572
2573         * inssel.brg: modified code generation of type checks for interfaces
2574         to use the new "MonoClass.interface_bitmap" instead of the old
2575         "MonoClass.interface_offsets".
2576
2577 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
2578
2579         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
2580
2581 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
2582
2583         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
2584         64 bit platforms.
2585
2586 2007-04-27  Neale Ferguson <neale@sinenomine.net>
2587
2588         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
2589
2590 2007-04-27  Wade Berrier  <wberrier@novell.com>
2591
2592         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
2593         mini.h) to fix build.
2594
2595 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
2596
2597         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
2598         
2599         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
2600         causes the corlib unit tests to fail.
2601
2602 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
2603
2604         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
2605
2606         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
2607
2608         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
2609         opcodes to the comparison relations.
2610
2611         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
2612         opcodes to their types.
2613         
2614         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
2615
2616         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
2617         it in cfg->arch.cinfo.
2618
2619         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
2620
2621         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
2622         cfg->cil_offset_to_bb.
2623
2624 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
2627         created becase of initlocals.
2628
2629 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
2630
2631         * mini-alpha.c cpu-alpha.md: More alpha port work from 
2632         Sergey Tikhonov <tsv@solvo.ru>.
2633
2634 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
2635
2636         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
2637
2638 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
2639
2640         * cpu-s390.md (break): Correct the length of break instruction.
2641
2642 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2643
2644         * mini.c: fix a couple of soft-float issues and comments.
2645
2646 2007-04-15  Miguel de Icaza  <miguel@novell.com>
2647
2648         * trace.c (is_filenamechar): - is also a filename char.
2649
2650 2007-04-15  Neale Ferguson <neale@sinenomine.net>
2651
2652         * mini-s390.c: Correct checking for enum type in return value processing.
2653
2654 2007-04-14  Raja R Harinath  <rharinath@novell.com>
2655
2656         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
2657         (version.h): Makefile is in the build directory.
2658
2659 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
2660
2661         * mini-amd64.h: fix for assertion failure on Solaris/amd64
2662
2663 2007-04-11  Martin Baulig  <martin@ximian.com>
2664
2665         * mini.c (can_access_member): Fix handling of generic classes;
2666         fixes #81259.
2667
2668 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
2669
2670         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
2671
2672 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
2673
2674         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
2675
2676 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
2677
2678         * mini-codegen.c: make sure the right spill amount is
2679         used for fp or integer registers (fixes the float_sub_spill() on ppc).
2680
2681 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
2682
2683         * mini-ppc.c: fixes for the fp_branch_nan test.
2684
2685 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * basic.cs: Comment out new test which still fails on ia64.
2688
2689 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2690
2691         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
2692
2693 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2694
2695         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
2696
2697 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
2700         on 64 bit machines. Fixes part of #80738.
2701
2702         * basic.cs: Add regression test.
2703
2704 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
2705
2706         * inssel.brg basic.cs: Revert previous change to fix build.
2707
2708         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
2709         platforms.
2710         
2711         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
2712
2713         * basic.cs: Add new regression test.
2714
2715 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
2716
2717         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
2718         many arguments.
2719
2720 2007-03-16  Neale Ferguson <neale@sinenomine.net>
2721
2722         * cpu-s390x.md: Correct length of break instruction.
2723
2724 2007-03-16  Neale Ferguson <neale@sinenomine.net>
2725
2726         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
2727         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
2728
2729 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
2730
2731         * *.c: Begin WIN64 port.
2732         * mini.c:  Use correct register in profiler.
2733         * mini-amd64.c: No inline assembly on Win64.
2734         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
2735         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
2736         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
2737         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
2738         mono_arch_ip_from_context for Win64.
2739         
2740         Contributed under MIT/X11 license.
2741
2742 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
2743
2744         * exceptions-amd64.c (seh_handler): Ditto.
2745
2746         * exceptions-x86.c (seh_handler): Fix a memory leak.
2747
2748 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
2749
2750         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
2751         mini-s390x.c: fixed peephole optimizations to deal
2752         correctly with 1 and 2 byte reload avoidance.
2753
2754 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
2755
2756         * cpu-s390.md, cpu-s390x.md: update localloc length.
2757
2758 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2759
2760         * cpu-g4.md: added missing descriptions.
2761
2762 2007-03-14  Miguel de Icaza  <miguel@novell.com>
2763
2764         *  Makefile.am: Add support so the tail tests are not executed on
2765         PowerPC as that is a known limitation of the PowerPC port.
2766
2767 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
2768
2769         * runmdesc.bat:  Move to msvc directory.
2770         
2771 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
2772
2773         * runmdesc.bat:  Run executable that was produced by the current
2774         target and sent via an argument.
2775         
2776 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
2777
2778         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
2779         #81102.
2780
2781         * generics.2.cs: Add regression test.
2782
2783 2007-03-09  Wade berrier  <wberrier@novell.com>
2784
2785         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
2786
2787 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
2788
2789         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
2790         AOT code depends on this.
2791
2792 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
2793
2794         * mini.c: more precise tracking of types in the eval stack
2795         (part of fix for bug #81044).
2796
2797 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
2798
2799         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
2800
2801         * aot-compiler.c (encode_patch): Remove an obsolete comment.
2802
2803 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
2804
2805         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
2806
2807         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
2808
2809 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
2812         a pointer on 64 bit systems. Fixes #80190.
2813
2814         * iltests.il: Add new regression test.
2815
2816 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2817
2818         * mini.c: inline a constant for Environment.IsRunningOnWindows.
2819
2820 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
2821
2822         * trace.c: Remove an erroneous alignemnt check when tracing.
2823           Fixes --trace on OSX86.
2824
2825 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
2826
2827         * mini-$(arch).h: initialize SP in context for all the archs.
2828
2829 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
2830
2831         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
2832         regressions in the thread tests.
2833
2834 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
2835
2836         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
2837         - fixed implementation of LOCALLOC opcode
2838         - implemented non-un compare for floats
2839         - code cleanup
2840         - implementation of FDIV and CKFINITE opcodes
2841         - fixes for latest mono updates
2842         - additional arch opcodes
2843
2844 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
2845
2846         * Makefile.am: simplify and merge rules for cross-compilation.
2847
2848 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
2849
2850         * local-propagation.c: Actually *apply* the fix for bug 80591...
2851
2852 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2853
2854         * mini-exceptions.c: backuot part of the last change
2855         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
2856
2857 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
2858         * inssel.brg: Fix bug 59286.
2859
2860
2861 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
2862
2863         * mini-exceptions.c: patch from Zoltan to correctly check for
2864         stack boundaries (using the stack register, not the frame register),
2865         fixes bugs #80724, #79717.
2866
2867 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
2868
2869         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
2870         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
2871
2872         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
2873         presence of frame pointer elimination.
2874
2875 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
2876         
2877         * mini-x86.h: NetBSD UCONTEX_REG defines.
2878
2879 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
2880
2881         * inssel-amd64.brg: Fix amd64 build.
2882
2883 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
2884
2885         * mini.h: remove extern to workaround what looks likes gcc bug 26905
2886         on amd64.
2887
2888 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
2889
2890         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
2891         ends.
2892
2893         * mini-<ARCH>.c: Use mono_is_regsize_var ().
2894
2895 2007-01-30 Mark Mason <mason@broadcom.com>
2896
2897            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
2898            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
2899            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
2900            beginning support for CEE_JMP [not quite working yet]
2901            * tramp-mips.c: LMF handling now works
2902         
2903 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
2904
2905         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
2906
2907         * mini.h (NULLIFY_INS): New macro.
2908
2909 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2910
2911         * mini.c: statistical profiler fix for windows, patch
2912         from Tor Lillqvist (tml@novell.com).
2913
2914 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
2915         * local-propagation.c: Fix bug 80591.
2916
2917 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
2918
2919         * Makefile.am: put back the --export-dynamic option as with
2920         the previous gmodule flags (thanks to Robert Jordan).
2921
2922 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
2923
2924         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
2925
2926         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
2927         simplify and speed up the local register allocator. Also rename some fields
2928         like iassign->vassign.
2929         
2930         * regalloc.c: Remove some functions which are no longer used since their
2931         inlined version is in mini-codegen.c.
2932         
2933         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
2934
2935         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
2936
2937 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
2938
2939         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
2940         narrowing. Fixes #80622.
2941
2942         * iltests.il: Add new regresssion test. 
2943
2944 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
2945
2946         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
2947         debug-debugger.c, debug-debugger.h: warning fixes.
2948         * driver.c: updated copyright year and made it fit in one line.
2949
2950 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
2951
2952         * aot-runtime.c: updated to use mono-dl instead of gmodule.
2953
2954 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
2955
2956         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
2957
2958         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
2959
2960         * iltests.il: Add new test for bug #80507.
2961
2962 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2963
2964         * mini-arm.h: use soft-float also on vfp for now.
2965
2966 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
2967
2968         * mini.c: fix some more soft-float issues.
2969
2970 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
2971
2972         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
2973
2974 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
2975         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
2976         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
2977         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
2978
2979 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
2980
2981         * mini-arm.c: typo fix.
2982
2983 2007-01-23  Neale Ferguson <neale@sinenomine.net>
2984
2985         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
2986
2987 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
2988
2989         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
2990         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
2991
2992         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
2993
2994         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
2995
2996         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
2997         
2998         * inssel.brg: Fix a warning.
2999
3000         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3001
3002         * abcremoval.c ssa.c ssapre.c: Update after this change.
3003         
3004         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3005
3006         * dominators.c (df_set): Use mono_bitset_union_fast.    
3007
3008 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3009
3010         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3011         mini-codegen.c: reduce relocations and memory usage for the cpu
3012         description.
3013
3014 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3017
3018         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3019         to reduce their size.
3020
3021 2007-01-19 Mark Mason <mason@broadcom.com>
3022
3023         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3024         * mini-mips.c: more configuration macros, support long conditional branches, additional
3025         asserts, fix epilog instrumentation.
3026         * mini-mips.h: use standard stack walk
3027         * cpu-mips.md: increase size of div, rem and conditional branches
3028         
3029 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3030
3031         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3032         to cpu spec data.
3033
3034 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3035
3036         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3037         (compile_method): Ditto.
3038
3039         * aot-runtime.c (decode_klass_info): Ditto.
3040
3041         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3042         needed by the code generated by inssel.brg. Also fix a warning.
3043
3044 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3045
3046         * mini.c: deal with enums that become genericinsts by
3047         being nested in a generic class (bug #79956).
3048
3049 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3050
3051         * mini.c: match the generic definition to check for
3052         private access with generic types (bug #78431).
3053
3054 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3055
3056         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3057         to make life easier for people cross-compiling that insist on not
3058         using scratchbox.
3059
3060 2007-01-17 Mark Mason <mason@broadcom.com>
3061
3062         * inssel-long.brg: patch to deal with mips missing flags
3063         * inssel-long32-mips.brg: implement overflow checks
3064         * insset-mips.brg: implement overflow checks
3065         * mini-mips.h: implement conditional exception handling
3066         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3067           Remove unused code, minor cleanups.
3068         * exceptions-mips.c: minor cleanups
3069         * mini-ops.h: add mips conditional exception ops
3070         * cpu-mips.md: add mips conditional exception ops
3071
3072         
3073 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3074
3075         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3076         to deal with mips missing of flags.
3077
3078 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3079
3080         * exceptions-ppc.c: execute fault handlers.
3081
3082 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3083
3084         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3085
3086 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3087
3088         * mini.c: handle also floating point values in initialize_array.
3089
3090 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3091
3092         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3093         array initialization and make it conditional on the intrins option.
3094
3095 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3096
3097         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3098         relocations and put the patch info names close to the enum definition.
3099
3100 2007-01-15 Mark Mason <mason@broadcom.com>
3101
3102         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3103
3104 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3105
3106         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3107
3108 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3109
3110         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3111
3112 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3113
3114         * Makefile.am: distribute the mips sources.
3115
3116 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3117
3118         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3119         directly.
3120
3121 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3122
3123         * cpu-x86.md: back out for now as this triggers other regressions.
3124
3125 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3126
3127         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3128         to eax:edx, so ecx can't get allocated to them (bug #80489).
3129
3130 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3131
3132         * mini.c, mini-exceptions.c: enabled running fault handlers
3133         (bug #80469).
3134
3135 2007-01-03  Miguel de Icaza  <miguel@novell.com>
3136
3137         * driver.c: If nothing fail, do not use the string "failed",
3138         because it makes it very annoying to view test result logs on the
3139         web. 
3140
3141 2006-12-30  Miguel de Icaza  <miguel@novell.com>
3142
3143         * debug-debugger.c (mono_debugger_main): Rename "main" to
3144         "main_method" to prevent a warning.
3145
3146         Remove a warning for unused field.
3147
3148 2006-12-28  Martin Baulig  <martin@ximian.com>
3149
3150         * debug-debugger.c
3151         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
3152
3153 2006-12-22  Martin Baulig  <martin@ximian.com>
3154
3155         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
3156         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
3157         seperate `.mdb_debug_info' section, so we can access it from the
3158         debugger even if the binary is stripped.
3159
3160         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
3161         from the `.mdb_debug_info' here to prevent the linker from
3162         removing that section.
3163
3164         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
3165         mdb-debug-info64.s.
3166
3167 2006-12-19  Robert Jordan  <robertj@gmx.net>
3168
3169         * mini-x86: enable the code to return small structures in
3170         registers for FreeBSD as well. Fixes bug #80278.
3171         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
3172
3173 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3174
3175         * mini-x86.c: align the stack when calling the profiler
3176         function instrumenting the prolog (on OSX).
3177
3178 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
3179
3180         * mini.c: emit a break opcode where Debugger.Break () is called.
3181
3182 2006-12-13  Miguel de Icaza  <miguel@novell.com>
3183
3184         * mini.c (mono_method_to_ir): Provide useful information on this
3185         assert, to prevent others from debugging like I did.
3186
3187 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3188
3189         * mini.c: enable code which was incorrectly commented
3190         (bug #80235).
3191
3192 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
3193
3194         * mini-x86.c: enable on OSX, too, the code to return small
3195         structures in registers.
3196
3197 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3198
3199         * mini-x86.c: remove the use of the dynamic code manager here, too.
3200
3201 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3202
3203         * mini.h, debug-debugger.c, tramp-*.c: fixed 
3204         mono_debugger_create_notification_function() to use
3205         mono_global_codeman_reserve () instead of a dynamic code manager.
3206
3207 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
3208
3209         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
3210         ves_array_element_address() jit icall and use a generated
3211         managed method instead (which is about 4 times faster for a rank 3
3212         array access).
3213
3214 2006-11-29  Mark Mason  <mason@broadcom.com>
3215
3216         * basic-calls.cs: additional tests for passing
3217         structures as function arguments.
3218
3219 2006-11-29  Mark Mason  <mason@broadcom.com>
3220
3221         * mini-mips.h: disable custom exception handling
3222         * mini-mips.c: throw/rethrow should use jalr to call
3223         exception stubs.  Fixed bug with passing structures
3224         by value. More support for tracing floating point
3225         functions.
3226
3227 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3228
3229         * mini.c: fixed typo in the soft-float ldind.r4 handling
3230         (bug #80086).
3231
3232 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3233
3234         * mini.c, mini.h, driver.c: added --runtime command line
3235         option to select a different runtime than the autodetected one.
3236         * jit.h: added API for embedders to initialize with a specific
3237         runtime version.
3238
3239 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
3240
3241         * mini.c: handle also boxing of r4 values (bug #80024).
3242
3243 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3244
3245         * mini-ppc.c: force indirect calls until we reserve
3246         enough address space for all the generated code.
3247
3248 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
3249
3250         * exceptions-arm.c: workaround bugs in the libc definition
3251         of struct ucontext.
3252
3253 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3254
3255         * inssel.brg: fixes from me and Mark Mason.
3256
3257 2006-11-23  Dick Porter  <dick@ximian.com>
3258
3259         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
3260         semaphore display now we've fixed the initial value
3261
3262 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3263
3264         * inssel.brg: partially revert the last change to fix the build.
3265
3266 2006-11-21  Mark Mason  <mason@broadcom.com>
3267
3268         * inssel.brg: Add and use compare-and-branch macros to support
3269         architectures that do not have condition code registers (ie. MIPS).
3270         * *-mips.{c,brg,md}: Fix copyright statements
3271
3272 2006-11-20  Mark Mason  <mason@broadcom.com>
3273
3274         * Makefile.am: remove mini-codegen.c from list of MIPS sources
3275         * mini.c: Allow GET_CONTEXT to be specified by the arch port
3276         * mini.h: Added declaration for mono_print_ins()
3277         * mini-codegen.c: added ins_spec initializer for MIPS
3278         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
3279         vreg to be virtual and hreg to be non-virtual.
3280         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
3281         is not yet working/implemented correctly.
3282         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
3283         non-static, fixup calls to print_ins() from other parts in the file.
3284
3285 2006-11-20  Mark Mason  <mason@broadcom.com>
3286
3287         * basic-calls.cs: added tests for passing structures as arguments
3288         to calls.
3289
3290 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3291
3292         * inssel-long32.brg: optimize signed division by power of two.
3293
3294 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
3295
3296         * mini-arm.c: added support for interworking with thumb code
3297         (mono must be still be built using the ARM instruction encoding).
3298
3299 2006-11-19  Miguel de Icaza  <miguel@novell.com>
3300
3301         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
3302         verifier has different rules for it.   Fixes a few verifier issues
3303         in the test suite.
3304
3305         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
3306         at the end, so people know what happened.
3307
3308 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3309
3310         * brach-opts.c: in optimize_exception_target() make sure we
3311         are in a catch clause (fixes bug #79871).
3312
3313 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3314
3315         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
3316         more soft-float support fixes.
3317
3318 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
3319
3320         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
3321         that are passed half on the stack and half in registers.
3322
3323 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3324
3325         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
3326         more mips integration work from Mark E Mason 
3327         <mark.e.mason@broadcom.com>.
3328
3329 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3330
3331         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
3332         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
3333         tramp-mips.c: added sources for the mips port, not
3334         integrated in the build yet. Contributed by
3335         Mark E Mason <mark.e.mason@broadcom.com>.
3336
3337 2006-11-14  Neale Ferguson <neale@sinenomine.net>
3338
3339         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
3340
3341 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3342
3343         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
3344         put the soft-float rules in its own file since it seems to
3345         break s390 compilation.
3346
3347 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3348
3349         * mini-arm.c: fixed wrnings.
3350
3351 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
3352
3353         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
3354         inssel-arm.brg: ARM support for soft-float.
3355
3356 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
3357
3358         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
3359         loads and stores of 32 bit fp values.
3360
3361 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
3362
3363         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
3364
3365         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
3366         works. Fixes #79852 and #79463.
3367
3368 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3369
3370         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
3371         more soft-float support WIP and fixes.
3372
3373 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
3374
3375         * mini-arm.c: some VFP updates.
3376
3377 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
3378
3379         * mini-exceptions.c: 0 is a valid local var offset in some
3380         architectures, don't assert (bug #78508).
3381
3382 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
3383
3384         * exceptions-arm.c: fixed off by one error in stack walk code.
3385
3386 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3387
3388         * mini.h, mini.c: more precise tracking of type load exceptions.
3389
3390 2006-11-03  Robert Jordan  <robertj@gmx.net>
3391
3392         * Makefile.am: [WIN32] Add monow.exe target.
3393         * driver.c: [WIN32] Don't detach the console when debugging.
3394         Fixes bug #79797.
3395         
3396 2006-10-30  Miguel de Icaza  <miguel@novell.com>
3397
3398         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
3399
3400 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * aot-compiler.c (emit_method_info): Add a case missed earlier.
3403
3404         * driver.c (mini_regression): Fix --regression with AOT.
3405
3406         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
3407
3408 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
3409
3410         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
3411
3412         * mini-sparc.h: Don't use sigaction on sparc/linux.
3413
3414         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
3415
3416         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
3417
3418         * mini-exceptions.c: Add proper include files for getpid ().
3419
3420 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
3421
3422         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
3423         address instead of a MonoJitInfo* to avoid decoding the exception info for the
3424         method.
3425
3426         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
3427         name cache to reduce its size.
3428
3429         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3430
3431 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
3432
3433         * mini-x86.c: Save/restore the current LMF structure more efficiently using
3434         the mono_lmf TLS variable.
3435
3436         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
3437         trampoline lmf frames.  
3438
3439         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
3440
3441 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
3444         the mono_lmf TLS variable.
3445
3446         * mini-exceptions.c: Access the LMF structure through accessors.
3447
3448         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
3449         variable instead of in jit_tls->lmf.
3450
3451         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
3452         
3453         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
3454         trampoline lmf frames.
3455
3456         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
3457
3458 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
3459
3460        * mini.c trace.c mini-x86.c: Revert these too.
3461         
3462        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
3463        signature change.
3464
3465 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
3466
3467         * genmdesc.c: removed now dead code.
3468
3469 2006-10-09  Robert Jordan <robertj@gmx.net>
3470
3471         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
3472
3473 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
3474
3475         * mini.h: do not leave gaps in the opcode values.
3476
3477 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
3478
3479         * jit-icalls.h: flag functions as internal here, too.
3480
3481 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
3482
3483         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
3484         functions with the internal attribute.
3485
3486 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
3487
3488         * aot-compiler.c: fclose the file descriptor in the profile read loop.
3489
3490 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
3491
3492         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
3493         for soft-float.
3494
3495 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
3496
3497         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
3498         tail calls as on other platforms.
3499
3500         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
3501
3502         * iltests.il: Add a few tailcall tests.
3503
3504 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
3505
3506         * driver.c: fix loop for old compilers (bug #79521).
3507
3508 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
3509
3510         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
3511
3512         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
3513
3514         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
3515         metadata without any code.
3516
3517         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
3518         more precise debugging information using gdb.
3519
3520 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
3521
3522         * inssel-ia64.brg: Make the helper methods static.
3523
3524 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
3525
3526         * inssel-x86.brg: make the helper methods static.
3527
3528 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
3529
3530         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
3531
3532 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
3533
3534         * mini.c: updates for monoburg changes.
3535         * inssel.brg: make a few helper functions static as they should.
3536
3537 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
3538
3539         * Makefile.am: Move mini-codegen.c to common_sources.
3540
3541 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
3542
3543         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
3544         instructions.
3545         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
3546         mini-ppc.h: port to use the common local register allocator.
3547
3548 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3549
3550         * mini.h: Remove the comment too then.
3551
3552 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
3553
3554         * mini.h: put back backend.data which is to be used shortly and
3555         doesn't increase the size of MonoInst. If any 64 bit arch aligned
3556         pointers on 4 byte boundaries it'd have much bigger issues running
3557         and you can ifdef it out anyway.
3558
3559 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3560
3561         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
3562         MonoInst size by 4 bytes on 64 bit machines.
3563
3564 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
3565
3566         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
3567         replacement with more meaningful field names. Arch maintainers, please
3568         check the assigned names are good enough for your arch.
3569
3570 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3571
3572         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
3573         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
3574
3575 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
3576
3577         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
3578         relocations and memory requirements, put the optimization flags
3579         definitions in their own file.
3580
3581 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
3582
3583         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
3584
3585         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
3586
3587 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
3588
3589         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
3590
3591 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
3592
3593         * inssel.brg: use the correct function to get the size of an item
3594         in an array, given an element class.
3595         * aot-compiler.c: do not access class->class_size directly.
3596
3597 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
3598
3599         * mini.h, debug-mini.c: added a debugging function to print
3600         info about local variables and arguments in a jitted method.
3601
3602 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
3603
3604         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
3605
3606         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
3607
3608 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
3609
3610         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
3611         inner and outer loops when passing vtypes.
3612
3613 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
3614
3615         * mini-ppc.c: take into account the cpu errata for cache flushing
3616         which caused some random errors (bug #79381).
3617
3618 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
3621         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
3622
3623 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
3626         loaded.
3627
3628         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
3629         freebsd ports tree.
3630
3631         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
3632         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
3633
3634         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
3635         displacement.
3636
3637 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
3638
3639         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
3640
3641 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
3642
3643         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
3644         macro does not have to be changed during debugging.
3645
3646         * 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>.
3647
3648         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
3649
3650         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
3651         
3652         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
3653         MONO_ARCH_NO_EMULATE_MUL is defined.
3654
3655         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
3656
3657         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
3658
3659         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
3660
3661         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
3662         
3663 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
3664
3665         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
3666         stuff to mini-exceptions.c where it is used.
3667
3668         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
3669         setup code, the real one is in mini-exceptions.c.
3670
3671         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
3672         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
3673         some changes from the freebsd ports tree.
3674
3675         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
3676         constants.
3677         
3678         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
3679
3680 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
3681
3682         * mini.c: on Linux, check for /proc to be mounted
3683         (bug# 79351, novell bug#201204).
3684
3685 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
3686
3687         * mini.c: handle cases where pthread_attr_getstack() behaves
3688         incorrectly (bug #78096).
3689
3690 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
3691
3692         * mini-arm.c: support larger stack frames (bug #79272).
3693
3694 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
3697
3698         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
3699         tokens.
3700
3701         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
3702         mono_class_from_name () to find a class from its name.
3703
3704         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
3705
3706 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
3709
3710 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
3711
3712         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
3713
3714 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
3715
3716         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
3717         callinfo->trampoline.
3718
3719         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
3720         fixes #79271.
3721         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
3722         future.
3723
3724 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
3725
3726         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
3727
3728 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
3729
3730         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
3731         stats.method_trampolines, it is already done by the generic trampoline code.
3732
3733         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
3734         
3735 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
3738
3739         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
3740
3741         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
3742
3743         * mini.c (print_jit_stats): Print mscorlib mempool size too.
3744         
3745         * mini.c (print_jit_stats): Print new stats.
3746
3747         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
3748
3749 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
3750
3751         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
3752         Address on two dimensional arrays. Fixes #78729.
3753
3754         * mini.h (MonoCompile): Add a 'skip_visibility' field.
3755
3756         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
3757         a method.
3758
3759         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
3760
3761         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
3762         #79130.
3763         
3764         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
3765         a race condition.
3766         (mini_get_ldelema_ins): Ditto.
3767
3768 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
3769
3770         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
3771         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
3772         Fixes #79213.
3773
3774 2006-08-29 Neale Ferguson <neale@sinenomine.net>
3775
3776         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
3777         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
3778
3779         * exceptions-s390x.c: Cosmetic change.
3780
3781         * tramp-s390.c: Fix warning.
3782
3783         * cpu-s390.md: Correct length of mul_imm.
3784
3785 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3786
3787         * aot-compiler.c: added binary writer with ELF backend
3788         implementation (only on Linux/x86 for now).
3789
3790 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
3791
3792         * Makefile.am: Don't run net 2.0 AOT tests.
3793
3794         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
3795         (mono_compile_assembly): Skip net 2.0 assemblies as well.
3796
3797         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
3798
3799 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3800
3801         * aot-compiler.c: simplified and refactored the asm-writing code
3802         to allow different backends.
3803
3804 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3807
3808         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
3809         little. Share patches of type TYPE_FROM_HANDLE as well.
3810
3811         * mini.c (mono_patch_info_equal): New helper function.
3812         (mono_patch_info_hash): Ditto.
3813
3814         * aot-compiler.c (emit_method_code): Fix s390 build.
3815
3816         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
3817         is not handled because it is stored as a flag and not as a type ctor. Fixes
3818         #79016.
3819
3820 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
3821
3822         * aot-compiler.c: Fix computation of GOT slot statistics.
3823         
3824         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
3825         Also remove support for not PIC AOT.
3826
3827         * mini.h: Bump AOT file format version.
3828
3829         * objects.cs: Add a test for #78990.
3830
3831         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
3832         (peter.dettman@iinet.net.au). Fixes #79087.
3833
3834         * basic-long.cs: Add a test for the above.
3835
3836 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
3837
3838         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
3839         
3840         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
3841         code somewhat.
3842
3843 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
3844
3845         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
3846         exceptions.
3847
3848 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
3849
3850         * mini.c: Don't verify COM proxy invoke calls
3851         
3852
3853 2006-08-10  Dick Porter  <dick@ximian.com>
3854
3855         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
3856         which process is holding semaphores locked.
3857
3858 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
3859
3860         * mini-ia64.c mini-amd64.c: Fix #79027.
3861
3862         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
3863
3864         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
3865
3866         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
3867         implicit arguments in a vararg call. Fixes #79027.
3868
3869 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
3870
3871         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
3872         (mono_get_array_new_va_signature): Ditto.
3873
3874 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
3875
3876         * aot-runtime.c: Call init_plt lazily.
3877
3878         * inssel-long.brg: Fix unsigned long->int conversion.
3879
3880         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
3881
3882         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
3883         that most data is now in the .rss/.data section.
3884
3885 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
3886
3887         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
3888
3889         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
3890
3891         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
3892
3893         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
3894
3895         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
3896         virtual call. Fixes #79010.
3897
3898         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
3899         and use the result as the this argument in the real call.
3900
3901         * generics.2.cs: Add a new test for #79010.
3902         
3903 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * mini-x86.c: Fix a warning.
3906
3907         * aot-compiler.c: Add a bunch of statistics.
3908
3909         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
3910
3911 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
3912
3913         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
3914
3915 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
3916
3917         * 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>.
3918
3919 2006-07-13  Miguel de Icaza  <miguel@novell.com>
3920
3921         * mini.c (mono_method_to_ir): Obtain the original method in the
3922         CIL stream and use this to perform validation.
3923
3924         Fixed: #78816
3925
3926 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
3927
3928         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
3929         (mono_arch_call_opcode): Ditto.
3930
3931         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
3932         #78826.
3933
3934         * mini.c (mono_patch_info_dup_mp): New helper function.
3935         
3936         * aot-compiler.c (compile_method): Fix some of the memory allocated during
3937         compilation. Fixes #78827.
3938
3939 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
3940
3941         * declsec.c: Use original security informations for
3942           MONO_WRAPPER_MANAGED_TO_MANAGED.
3943
3944 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
3945
3946         * mini.c: Allow Com Interop methods/classes and
3947         don't verify COM wrapper calls
3948         
3949
3950 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
3951
3952         * inssel-long32.brg: Fix long->i4 checked conversion.
3953
3954         * exceptions.cs: Add a test for the above.
3955
3956 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
3957
3958         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
3959
3960         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
3961         leaks.
3962
3963         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
3964         #78775.
3965
3966 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
3967
3968         * mini.c: Fix solaris/x86 exception handling.
3969
3970         * Makefile.am: Get rid of $(ICU_LIBS).
3971
3972 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
3973
3974         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
3975         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
3976         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
3977
3978         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
3979
3980         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
3981         this function causes a SIGSEGV.
3982
3983 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
3984
3985         * mini.c: Remove unused solaris/x86 includes.
3986
3987 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
3988
3989         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
3990
3991 2006-06-20  Jb Evain  <jbevain@gmail.com>
3992
3993         * cpu-g4.md: fix max length of start_handler instruction.
3994
3995 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
3996         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
3997
3998 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
3999         * ssa.c: Fixed bug 78653 for SSA based deadce.
4000         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4001         MonoInst.flags, used in SSA based deadce.
4002         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4003         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4004
4005 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4006
4007         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4008         it can end up using non executable memory on ppc64 systems
4009         running ppc32 userspace (fix from Johannes Berg).
4010
4011 2006-06-14  Dick Porter  <dick@ximian.com>
4012
4013         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4014         4.1.1
4015
4016 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4017         * mini.c: Made so that inline is locally disabled if it would
4018         trigger a .cctor, because too many apps depend on this behavior
4019         (which seems to be also the one of the MS CLR).
4020
4021 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4022
4023         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4024         No idea why this worked before.
4025
4026         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4027         which branch to outer exception clauses since they could skip the
4028         inner finally clauses. Fixes #78633.
4029
4030         * exceptions.cs: Add a test for the above.
4031
4032         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4033         Fixes #78629.
4034
4035         * iltests.il: Add a test for the above.
4036
4037 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4038
4039         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4040         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4041
4042         * iltests.il: Add a test for the above.
4043
4044 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4045
4046         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4047         
4048         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4049         methods as instrinsics.
4050
4051 2006-06-09  Wade Berrier <wberrier@novell.com>
4052
4053         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4054         (simple-cee-ops.h ssapre-mini-ops.h)
4055
4056 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4057
4058         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4059         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4060         instruction).
4061         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4062         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4063
4064 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4065
4066         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4067
4068 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4069
4070         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4071         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4072         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4073         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4074         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4075         of opcodes, so that bug 78549 should not happen again.
4076         * ssapre.c: Updated to use the renamed files.
4077
4078 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4079
4080         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4081         in OP_ATOMIC_EXCHANGE_I4.
4082
4083 2006-06-07  Wade Berrier <wberrier@novell.com>
4084
4085         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4086         in mono_debugger_create_notification_function)
4087
4088 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4089
4090         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4091         
4092         * mini.c (type_from_stack_type): Disable some changes which do not
4093         seem to work.
4094
4095         * driver.c: Reenable opts.
4096
4097         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4098         of the evaluation stack.
4099         
4100         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4101         evaluation stack trace at entry to the bblock.
4102
4103         * mini.c (merge_stacks): New function to perform verification of stack merges.
4104         Turned off by default.
4105
4106         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4107         STACK_MP.
4108         
4109 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4110
4111         * local-propagation.c: Fixed bug 78549.
4112
4113 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4114
4115         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4116
4117 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4118
4119         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4120         tramp-arm.c, tramp-ia64.c
4121         (mono_debugger_create_notification_function): Update signature to
4122         new signature and use new protocol for creating the notification
4123         function.  
4124
4125         Should fix the build.
4126
4127 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4128
4129         * exceptions-ppc.c (mono_jit_walk_stack)
4130         (ves_icall_get_frame_info): Fix the build
4131
4132 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
4133
4134         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
4135
4136 2006-05-31  Raja R Harinath  <rharinath@novell.com>
4137
4138         * il2tests.2.il: New file for generics CIL tests.  Add test for
4139         #78019.
4140         * Makefile.am: Update.
4141
4142         Fix #78019
4143         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
4144         to nullable types.
4145
4146 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
4147
4148         * aliasing.c: Fixed bug 78311.
4149
4150 2006-05-29  Martin Baulig  <martin@ximian.com>
4151
4152         * mini-exceptions.c (mono_find_jit_info): When computing the
4153         native offset, check whether we're actually inside the method's
4154         code; call mono_debug_print_stack_frame() to format the frame.
4155         (ves_icall_System_Exception_get_trace): Call
4156         mono_debug_print_stack_frame() to format the stack frame.
4157         (ves_icall_get_trace): Update to the new debugging API.
4158         (mono_jit_walk_stack_from_ctx): Likewise.
4159         (ves_icall_get_frame_info): Likewise.
4160
4161         * mini.c (get_method_from_ip): Use the new debugging API.
4162         (mono_print_method_from_ip): Likewise.
4163
4164         * exceptions-ppc.c
4165         (mono_jit_walk_stack): Use the new debugging API.
4166         (ves_icall_get_frame_info): Likewise.   
4167
4168 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
4169
4170         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
4171
4172 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
4173
4174         * mini.c: Added "limitator" to inline for debugging.
4175
4176 2006-05-24  Martin Baulig  <martin@ximian.com>
4177
4178         * debug-debugger.c (mono_debugger_init): Create a private,
4179         malloc()-based code manager for the notification function and
4180         intentionally leak it on exit.  This fixes the crash-on-exit race
4181         condition.
4182
4183         * tramp-amd64.c
4184         (mono_debugger_create_notification_function): Added
4185         `MonoCodeManager *' argument.
4186
4187         * tramp-x86.c
4188         (mono_debugger_create_notification_function): Added
4189         `MonoCodeManager *' argument.
4190
4191 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
4192
4193         * aliasing.c: Fixed 64 bit issue.
4194         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
4195         default since all known bugs are fixed (one more time!).
4196
4197 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4198
4199         * mini.c: write barrier support.
4200
4201 2006-05-23  Martin Baulig  <martin@ximian.com>
4202
4203         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
4204         check at the top of the file.
4205
4206 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
4207
4208         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
4209         reverting changes without reason and without changelog entries.
4210
4211 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
4212
4213         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
4214         to a few opcodes. Fixes #78439.
4215
4216         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
4217         consistency with other archs.
4218
4219         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
4220
4221 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4222
4223         * debug-debugger.c: fix the build.
4224
4225 2006-05-17  Martin Baulig  <martin@ximian.com>
4226
4227         * debug-debugger.c
4228         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
4229         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
4230         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
4231         (debugger_attach): Call GC_mono_debugger_add_all_threads().
4232
4233 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
4234
4235         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
4236
4237 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
4238
4239         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
4240         MONO_TYPE_GENERICINST.
4241         
4242         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
4243         MONO_TYPE_GENERICINST.
4244
4245 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
4246
4247         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
4248         #78325.
4249
4250 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
4251
4252         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
4253         mempool.
4254         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
4255
4256 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
4257
4258         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
4259         mono_trace_cleanup ().
4260
4261         * iltests.il: Fix problem with the newly added test.
4262
4263         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
4264         due to register constraints, free up the previous hreg. Fixes #78314.
4265
4266         * iltests.il: Add new test for #78314.  
4267
4268         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
4269         Interlocked.Add. Fixes #78312.
4270
4271         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
4272         
4273 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
4274
4275         * inssel.brg (mini_emit_virtual_call): Fix a warning.
4276
4277 2006-05-05  Martin Baulig  <martin@ximian.com>
4278
4279         * debug-mini.c (mono_debug_open_block): New method.
4280
4281         * mini-amd64.c
4282         (mono_arch_output_basic_block): Call mono_debug_open_block() at
4283         the beginning of each basic block.
4284
4285         * mini-x86.c
4286         (mono_arch_output_basic_block): Call mono_debug_open_block() at
4287         the beginning of each basic block.
4288
4289 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
4290
4291         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
4292         default until I understand why they break the build on amd64.
4293
4294 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
4295
4296         * mini.c (mini_cleanup): Call mono_cleanup ().
4297
4298         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
4299         errors.
4300
4301 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
4302
4303         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
4304         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
4305         default since all known bugs are fixed, and I cannot reproduce bug
4306         77944... I'm asking Matt Hargett to test again after this commit.
4307
4308 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
4309
4310         * mini-codegen.c: Fixed typo that thrashed inline.
4311
4312 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
4313
4314         * dominators.c (compute_dominators): Avoid using a worklist since
4315         it is not correct in some cases. Instead, iterate over all bblocks as
4316         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
4317
4318 2006-04-28  Miguel de Icaza  <miguel@novell.com>
4319
4320         * mini.c (mono_jit_compile_method_inner): Use
4321         mono_prepare_exception_from_error that resets the value
4322         internally.
4323
4324 2006-04-27  Miguel de Icaza  <miguel@novell.com>
4325
4326         * mini.c: Move the mini_loader_error_to_exception to metadata. 
4327         
4328 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
4329
4330         * aliasing.c: Fixed bug 78210.
4331
4332 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
4333
4334         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
4335         default until all their problems (or the ones they trigger) are fixed.
4336
4337 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
4338
4339         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
4340         
4341         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
4342         as loaded only after resolving patches since that could invoke the same method.
4343
4344         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
4345
4346         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
4347         functions.
4348
4349         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
4350         AOT loader.
4351
4352         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
4353         stack.
4354
4355         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
4356         made from AOT code through the PLT table.
4357
4358         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
4359         holding the plt offset when a call is made to the aot plt trampoline.
4360         
4361 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
4362
4363         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
4364         amd64 AOT support.
4365
4366         * Makefile.am (common_sources): Fix build breakage.
4367
4368         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
4369         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
4370         intra-assembly calls if possible.
4371         
4372         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
4373
4374         * mini-trampolines.c: Handle PLT entries.
4375
4376         * mini.c: Avoid creating a GOT var for calls.
4377
4378         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
4379         from mscorlib code.
4380
4381         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
4382         from mscorlib code.
4383
4384         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
4385         AOT code.       
4386
4387         * mini.h: Bump AOT file format version.
4388         
4389         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
4390         covers more cases.
4391
4392 2006-04-25  Martin Baulig  <martin@ximian.com>
4393
4394         * driver.c: Disable copyprop, consprop and inline when running
4395         inside the debugger.
4396
4397 2006-04-25  Martin Baulig  <martin@ximian.com>
4398
4399         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
4400         with `get_current_thread' and added `detach'.
4401         (MonoDebuggerMetadataInfo): Added `thread_size',
4402         `thread_tid_offset', `thread_stack_ptr_offset' and
4403         `thread_end_stack_offset'.
4404
4405 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
4406
4407         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
4408         aot-runtime.c.
4409
4410         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
4411         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
4412
4413         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
4414
4415         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
4416
4417         * aot.c: Add support for ADJUSTED_IID.  
4418
4419 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * aot.c (emit_method_order): Don't align method_order_end.
4422
4423         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
4424         the interface ID changes.
4425
4426 2006-04-21  Dick Porter  <dick@ximian.com>
4427
4428         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
4429         cleaning up a thread.  Fixes the new part of bug 77470.
4430
4431 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
4432
4433         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
4434         to managed wrapper.
4435                      
4436 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
4437
4438         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
4439         
4440         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
4441         SIGSEGV. Fixes #78072.
4442
4443         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
4444         unregister our SIGABRT handler.
4445
4446 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
4447
4448         * mini.c: Disabled inline where it can alter the call stack in a
4449         way visible from managed code.
4450         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
4451         default.
4452
4453 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
4454
4455         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
4456         on other platforms. Fixes #78089.
4457
4458 2006-04-13  Martin Baulig  <martin@ximian.com>
4459
4460         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
4461         determine whether we're inside the debugger.
4462
4463         * debug-debugger.h
4464         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
4465
4466 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
4467
4468         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
4469         handler clauses. Fixes #78024.
4470
4471         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
4472         in the CALL_MEMBASE opcodes. Fixes #78088.
4473         (mono_arch_get_vcall_slot_addr): Ditto.
4474
4475 2006-04-10  Martin Baulig  <martin@ximian.com>
4476
4477         * debug-debugger.c: The thread handling code has now been moved
4478         into ../metadata/threads.c.
4479
4480 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
4481
4482         * driver.c (mono_main): Fix --with-gc=none build.
4483
4484         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
4485         (mono_spillvar_offset_float): Ditto.
4486         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
4487         hreg, not when its !global, since on ia64, there is a third category: stacked
4488         registers.      
4489
4490 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
4491
4492         * mini.c: set MonoInst->klass for load field address and a few other
4493         places.
4494
4495 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
4496
4497         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
4498
4499 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
4502         the branch opt changes.
4503
4504 2006-04-06  Dick Porter  <dick@ximian.com>
4505
4506         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
4507         
4508         * wapihandles.c (mini_wapi_seminfo): 
4509         * driver.c (mono_main): Add semaphore info option
4510
4511 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
4512
4513         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
4514         branch optimization changes. Fixes #78009.
4515
4516 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4517
4518         * mini.c: ignore accessibility of methods in managed->native wrappers.
4519
4520 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
4521
4522         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
4523         
4524         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
4525
4526 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
4527
4528         * mini.c: Modify the branch optimizations to preserve the invariant that
4529         the entries inside the in_bb and out_bb arrays are unique.
4530         (mono_unlink_bblock): Avoid creation of new arrays.
4531
4532 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
4533
4534         * mini.c (mono_unlink_bblock): Fix regression caused by previous
4535         change (#77992).
4536
4537 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
4538
4539         * mini.c (optimize_branches): Remove the "optimizations" in
4540         the cbranch1/cbranch2 -> branch cases which were causing several
4541         problems in the past. Fixes #77986.
4542
4543 2006-03-31  Chris Toshok  <toshok@ximian.com>
4544
4545         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
4546         default optimizations :(
4547
4548 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
4549
4550         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
4551         branch.
4552
4553 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
4554
4555         * local-propagation.c: Added comments to structs and removed
4556         "Mono" prefixes from local tree mover types.
4557
4558 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
4559
4560         * Makefile.am (arch_sources): Define this for each architecture so 
4561         libmono_la_SOURCES is defined in one place.
4562
4563 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
4564
4565         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
4566         from handles/.
4567
4568 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
4569
4570         * driver.c: print the GC name supplied by configure.
4571
4572 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
4573
4574         * local-propagation.c: Added tree mover, and moved here all the
4575         local propagation code from mini.c
4576         * mini.c: Added support for treeprop, and moved all the local
4577         propagation code to local-propagation.c
4578         * mini.h: Added support for treeprop
4579         * driver.c: Added support for treeprop, enabled consprop, copyprop,
4580         treeprop, inline and deadce by default
4581         * Makefile.am: Added local-propagation.c
4582
4583 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
4584
4585         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
4586
4587 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
4588
4589         * debug-debugger.c: make it compile without the Boehm GC.
4590
4591 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4592
4593         * mini.c: fixed issue with mismatch when an icall is registered
4594         with multiple names but same address.
4595
4596 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4597
4598         * declsec.c, mini-exceptions.c: use write barrier to set reference
4599         fields of managed objects.
4600
4601 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
4602
4603         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
4604         (can_access_internals): Fix a warning.
4605
4606         * mini.c (print_method_from_ip): Rename this to 
4607         mono_print_method_from_ip so it gets exported.
4608
4609         * trace.c: Deal with strings inside StringBuilder's containing garbage
4610         and fix memory leaks. Fixes #77848.
4611
4612 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
4613
4614         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
4615         fixes #77787.
4616
4617 2006-03-16 Neale Ferguson <neale@sinenomine.net>
4618         
4619         * mini-s390.c: Remove OP_X86_TEST_NULL.
4620
4621 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
4622
4623         * mini.c: use the correct GetHashCode() for the moving collector.
4624
4625 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
4626
4627         * liveness.c: Regalloc spill cost tuning.
4628
4629 2006-03-15 Neale Ferguson <neale@sinenomine.net>
4630         
4631         * mini-s390x.h: Correct S390_LONG macro.
4632
4633         * mini-s390x.c: Cleanup unused code.
4634
4635 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
4636
4637         * jit-icalls.h: New file.
4638
4639         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
4640         icalls and include that instead of including jit-icalls.c.
4641
4642         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
4643         OP_X86 opcodes.
4644
4645 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
4646
4647         * mini.c: when checking for member accessibility, also check for
4648         friend assemblies and for explicit interface implementations.
4649
4650 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
4651
4652         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
4653
4654         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
4655
4656         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
4657         common cases are done first.    
4658
4659         * mini-ops.h: Only define platform specific opcodes on the given platform.
4660
4661         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
4662         branch.
4663         
4664 2006-03-14  Martin Baulig  <martin@ximian.com>
4665
4666         Revert Paolo's change from r57348:
4667
4668         * mini.h: don't use gboolean for bitfields.
4669         * mini.c: verifier changes for fields and methods accessibility.
4670
4671 2006-03-13  Neale Ferguson <neale@sinenomine.net>
4672
4673         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
4674
4675         * mini-s390x.c: Fix conv_r_un.
4676
4677         * cpu-s390, cpu-s390x.md: Fix lengths.
4678
4679 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4680
4681         * mini.c: nested types have access to all the nesting
4682         levels, not just the enclosing types.
4683
4684 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4685
4686         * mini.c: added a few more verification checks.
4687
4688 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
4689
4690         * liveness.c: Merge optimizations from the linear-il branch.
4691
4692 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
4693
4694         * mini-ia64.c (emit_call): Add a comment.
4695
4696         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
4697
4698         * tramp-ia64.c: Fix some warnings.
4699
4700 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4701
4702         * mini.h: don't use gboolean for bitfields.
4703         * mini.c: verifier changes for fields and methods accessibility.
4704
4705 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
4706
4707         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
4708         lazy icall wrapper changes.
4709
4710         * dominators.c: Replace all the dominator algorithms with faster
4711         ones from the linear-il branch.
4712
4713         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
4714         the mempool.
4715
4716         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
4717         common cases are done first.
4718
4719         * mini-amd64.c: Fix some warnings.
4720
4721         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
4722         from the mempool.
4723
4724         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
4725         added code.
4726
4727         * mini.h: Add a missing prototype.
4728
4729 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
4730
4731         * mini.c: Compile icall wrappers lazily.
4732
4733         * mini-codegen.c: Use printf instead of g_print since its much faster.
4734
4735         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
4736         function.
4737
4738         * mini.c (optimize_branches): Cache the negative result from 
4739         remove_block_if_useless ().
4740
4741         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
4742         Also fix some bblock linking issues.
4743
4744         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
4745         assembly files.
4746
4747         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
4748
4749         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
4750         accessed fields first, for better cache behavior.
4751         
4752 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4753
4754         * mini.c: speedup IList<T> array accesses.
4755
4756 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
4757
4758         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
4759         inline_costs counter. Fixes #77190.
4760
4761 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
4762
4763         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
4764         trace messages. Fixes #77706.
4765
4766 2006-03-04  Martin Baulig  <martin@ximian.com>
4767
4768         * tramp-amd64.c, tramp-x86.c
4769         (mono_debugger_create_notification_function): Use
4770         mono_global_codeman_reserve() to allocate a buffer at runtime and
4771         return it.
4772
4773         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
4774
4775         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
4776         notification function at runtime and then call `initialize' in the
4777         `MONO_DEBUGGER__debugger_info' vtable.
4778
4779 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
4780
4781         * iltests.il: Fix a visibility problem.
4782
4783 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4784
4785         * driver.c, mini.c: add hooks for the counters API.
4786
4787 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
4788
4789         * driver.c: show disabled options.
4790
4791 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4792
4793         * linear-scan.c: always use cost-driven selection.
4794
4795 2006-02-28  Raja R Harinath  <rharinath@novell.com>
4796
4797         * jit-icalls.c (helper_compile_generic_method): Revert change from
4798         2006-02-24.
4799
4800 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
4801
4802         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
4803
4804 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
4805
4806         * inssel.brg: style fixes, mostly to force the updated monoburg
4807         to run for people using svn.
4808
4809 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4810
4811         * mini.c: match monoburg changes.
4812
4813 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4814
4815         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
4816         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
4817         declaration in the header file.
4818
4819 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4820
4821         * helpers.c: reduce relocations and mem usage.
4822
4823 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4824
4825         * mini.h, mini-codegen.c: disable logging features if
4826         requested by configure.
4827
4828 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
4829
4830         * mini.c: tiny verifier changes.
4831
4832 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4833
4834         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
4835         cpu-pentium.md: stack alignment changes for osx/x86,
4836         partially from Geoff Norton <gnorton@customerdna.com>.
4837
4838 2006-02-24  Raja R Harinath  <harinath@gmail.com>
4839
4840         * jit-icalls.c (helper_compile_generic_method): Update to changes
4841         in metadata/class.c.
4842
4843 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
4844         
4845         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
4846         
4847         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
4848         interface calls with large offsets.
4849
4850 2006-02-23  Raja R Harinath  <rharinath@novell.com>
4851
4852         * jit-icalls.c (helper_compile_generic_method): Document the
4853         special-case we depend on so that we can inflate the method twice
4854         with the same context with no bad side-effects.
4855
4856 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4857
4858         * mini-x86.c, mini-amd64.c: fix for case when xen support
4859         is disabled.
4860
4861 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4862
4863         * mini-x86.c, mini-amd64.c: generate code to access tls items
4864         in a faster way for Xen systems.
4865
4866 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4867
4868         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
4869         updates and compilation fixes for the OSX/x86 port, mostly from
4870         Geoff Norton <gnorton@customerdna.com>.
4871
4872 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4873
4874         * inssel.brg: faster interface call implementation
4875         to sync with the interface_offsets MonoVTable changes.
4876
4877 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4878
4879         * mini.c: more verification checks.
4880
4881 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
4882
4883         * mini.c: added a few more verification checks.
4884
4885 2006-02-17      Neale Ferguson <neale@sinenomine.net>
4886
4887         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
4888         facility on the processor and use it if available.
4889
4890 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4891
4892         * driver.c, aot.c, mini.c: throw exception if the IL code is
4893         invalid or unverifiable.
4894
4895 2006-02-17  Raja R Harinath  <rharinath@novell.com>
4896
4897         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
4898         m.StructField.
4899
4900 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
4901
4902         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
4903
4904 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4905
4906         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
4907         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
4908         handling of instantiated generic valuetypes.
4909
4910 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
4911
4912         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
4913         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
4914         instead.
4915
4916         * generics.2.cs: Revert the nullable reftypes tests.
4917
4918 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
4919
4920         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
4921         using __builtin_frame_address (1) as it doesn't work in the presence
4922         of optimizations. Hopefully fixes #77273.
4923
4924         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
4925         -> generics.cs change as it doesn't work with some automake versions.
4926
4927 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4928
4929         * mini.c: handle systems that sue a different way to
4930         retrieve the stack address of the current thread.
4931
4932 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
4933
4934         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
4935         it specially in the makefile.
4936
4937         * generics.2.cs: Add tests for nullable reference types.
4938
4939 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4940
4941         * mini.c: always handle the case when mono_jit_init()
4942         is called in a thread different from the main thread,
4943         confusing libgc (bug #77309).
4944
4945 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
4946
4947         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
4948
4949 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4950
4951         * mini.c: change optimize_branches () to use a single loop
4952         and introduce a new optimization to simplify some range checks.
4953
4954 2006-02-03  Martin Baulig  <martin@ximian.com>
4955
4956         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
4957         and merged with debugger_thread_manager_add_thread().
4958         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
4959         inform the debugger about the main thread.
4960
4961 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
4962
4963         * basic.cs: Add test for div.un/rem.un constant folding.
4964
4965 2006-02-03  Neale Ferguson <neale@sinenomine.net>
4966
4967         * cpu-s390x.md: correct int_xor_imm length
4968
4969 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
4970
4971         * generics.2.cs: New test for #77442.
4972
4973         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
4974         #77442.
4975
4976 2006-02-02  Martin Baulig  <martin@ximian.com>
4977
4978         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
4979         <mono/metadata/mono-debug-debugger.h>   
4980
4981         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
4982
4983 2006-02-02  Martin Baulig  <martin@ximian.com>
4984
4985         * debug-debugger.h: New header file for debug-debugger.c.
4986
4987         * debug-debugger.c: Big API cleanup; don't run the managed Main()
4988         function is a separate thread anymore; add support for attaching.
4989
4990 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
4991
4992         * tramp-x86.c: Fix a warning.
4993
4994 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
4997         on very large methods.
4998
4999         * aot.c (load_patch_info): Fix a warning.
5000
5001 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5002
5003         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5004         mini-ops.h: alu membase optimizations.
5005
5006 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5007
5008         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5009         to speedup StringBuilder.
5010
5011 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5012
5013         * dominators.c (mono_compute_natural_loops): Fix detection of
5014         loop body start blocks.
5015
5016         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5017
5018 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5019
5020         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5021         #75145.
5022
5023 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5024
5025         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5026
5027 2006-01-25  Martin Baulig  <martin@ximian.com>
5028
5029         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5030         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5031         started to cleanup this file a little bit.
5032
5033 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5034
5035         * mini.c: optimize a codepath frequently happening in generics code.
5036
5037 2006-01-23  Martin Baulig  <martin@ximian.com>
5038
5039         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5040
5041         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5042         functions directly.
5043
5044         * driver.c: debug-debugger.c is only available if
5045         `MONO_DEBUGGER_SUPPORTED' is defined.   
5046
5047 2006-01-23  Martin Baulig  <martin@ximian.com>
5048
5049         * debug-debugger.c: Only enable this on platforms where the Mono
5050         Debugger is working (x86 and x86_64).
5051
5052 2006-01-21  Martin Baulig  <martin@ximian.com>
5053
5054         The Mono Debugger is now using the normal `mono' instead of the
5055         `mono-debugger-mini-wrapper' when executing managed code.
5056
5057         * debug-debugger.c: New file; previously known as
5058         debugger/wrapper/wrapper.c.
5059
5060         * debug-mini.c (mono_init_debugger): Removed.
5061
5062         * driver.c (mono_main): Added new `--inside-mdb' command line
5063         argument which is used when running inside the debugger.
5064
5065 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5066
5067         * liveness.c (mono_analyze_liveness): Remove some unused data
5068         structures.
5069
5070 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5071
5072         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5073
5074 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5075
5076         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5077         depends on implementation details of monobitset.
5078
5079         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5080         Fixes #77271.
5081
5082 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5083
5084         * liveness.c: Update after monobitset changes.
5085
5086 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5087
5088         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5089
5090 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5091
5092         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5093
5094         * mini-s390x.c: Remove warning messages.
5095
5096 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5097
5098         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5099
5100 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5101
5102         * generics.2.cs: Add ldelem/stelem_any test.
5103
5104 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5105
5106         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5107
5108 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5109
5110         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5111         
5112 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5113
5114         * generics.2.cs: Reenable vtype tests.
5115
5116         * inssel-x86.brg: Remove an icorrect valuetype rule.
5117
5118 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5119
5120         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5121         initial support for OP_ABS.
5122
5123 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5124
5125         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5126
5127 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5128
5129         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5130         conversion and implement LADD/LSUB.
5131
5132         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
5133         architectures.
5134
5135 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5136
5137         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
5138
5139         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
5140         architectures.
5141
5142 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5143
5144         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
5145         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
5146         (stack walk problem).
5147
5148 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
5149
5150         * aot.c (mono_aot_load_method): Fix a warning.
5151
5152 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5153
5154         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
5155
5156 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5157
5158         * iltests.il: Add test for #77148.
5159
5160         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
5161         #77148.
5162
5163 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5164
5165         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
5166
5167 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5168
5169         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
5170         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
5171
5172         * basic-long.cs: Add lconv-to-r4/r8 tests.
5173
5174 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5175
5176         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
5177
5178         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
5179         here as on other archs.
5180
5181 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5182
5183         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
5184
5185 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5186
5187         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
5188         
5189         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
5190
5191         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
5192         instrument_prolog; Add memory_barrier instruction.
5193
5194 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
5195
5196         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
5197
5198 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
5199
5200         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
5201
5202         * aliasing.c inssel.brg: Fix warnings.
5203
5204         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
5205         could skip initialization of some parts of memory.
5206
5207         * mini.c mini-ia64.c: Fix warnings.
5208
5209         * inssel-sparc.brg: Add an implementation of lneg which actually works.
5210
5211 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
5212
5213         * aliasing.c (mono_build_aliasing_information): Add a workaround for
5214         a crash seen on sparc.
5215
5216         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
5217         
5218         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
5219
5220 2005-12-21 Neale Ferguson <neale@sinenomine.net>
5221
5222         * mini-ops.h: Add s390_backchain instruction
5223
5224         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
5225
5226         * cpu-s390.md: Add s390_backchain instruction
5227
5228         * mini-s390.c: Significant ABI changes
5229
5230         * mini-s390.h: Cater for zero length structures
5231
5232 2005-12-20 Neale Ferguson <neale@sinenomine.net>
5233
5234         * mini-s390.c: ABI fixes
5235
5236         * inssel-s390.brg: Remove debug statements
5237
5238         * cpu-s390.md: Fix length of ATOMIC_xx operations
5239
5240 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
5241
5242         * basic-float.cs: Add float<->long conversion tests.
5243
5244 2005-12-16 Neale Ferguson <neale@sinenomine.net>
5245
5246         * mini-s390.c: Fix LOCALLOC processing.
5247
5248         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
5249
5250 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * iltests.il: Add tests for some opcodes not covered by the other
5253         tests.
5254
5255 2005-12-15 Neale Ferguson <neale@sinenomine.net>
5256
5257         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
5258         register loading for Tail processing; Correct trace output.
5259
5260         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
5261
5262         * cpu-s390.md: Correct size of jmp instruction. 
5263
5264 2005-12-13 Neale Ferguson <neale@sinenomine.net>
5265
5266         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
5267
5268 2005-12-13 Neale Ferguson <neale@sinenomine.net>
5269
5270         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
5271           Bring s390 up to current level.
5272
5273 2005-12-12  Zltan Varga  <vargaz@gmail.com>
5274
5275         * generics.2.cs: Disable the newly added tests as they do not work yet.
5276         
5277         * generics.2.cs: Add valuetype tests.
5278
5279 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * basic-long.cs: Add i4->u8 test.
5282
5283         * objects.cs: Add tests for JIT intrinsic.
5284
5285         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
5286         optimizations lost by a mistake.
5287
5288 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
5289
5290         * basic-long.cs: Remove a test moved to objects.cs.
5291
5292         * arrays.cs: Add more array tests.
5293
5294 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
5295
5296         * arrays.cs: Add new tests for multi-dimensional arrays.
5297
5298 2005-12-06  Raja R Harinath  <rharinath@novell.com>
5299
5300         * Makefile.am (test_sources2): Add generics.2.cs.
5301         (EXTRA_DIST): Add test_sources2.
5302
5303 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
5304
5305         Support for boxing and unboxing nullable types as well as the
5306         isinst operation on nullables, per the CLI ammendment.
5307
5308         * inssel.brg (CEE_ISINST): Special case for nullable
5309
5310         * mini.c (handle_unbox_nullable): new method
5311         (handle_box): Special case for nullable types
5312         (mono_method_to_ir): Call handle_unbox_nullable in correct
5313         places.
5314
5315         * generics.2.cs: New test suite
5316
5317         * Makefile.am: Support for regression tests with generics.
5318
5319 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
5320
5321         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
5322         allocated to registers. Fixes #76800.
5323
5324 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
5325
5326         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
5327
5328 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
5329
5330         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
5331         of platforms.
5332
5333 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
5334
5335         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
5336         objects.cs.
5337
5338         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
5339         
5340         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
5341 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
5342
5343         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
5344         single precision before storing to a single precision location.
5345
5346 2005-11-28  Raja R Harinath  <rharinath@novell.com>
5347
5348         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
5349
5350 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
5351
5352         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
5353         correct files.
5354
5355         * basic.cs: Remove test_0_byte_compares test which was moved to
5356         objects.cs a long time ago.
5357
5358 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
5359
5360         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5361
5362 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
5363
5364         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
5365         handlers are called.
5366
5367         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
5368         throwing code.
5369
5370          * mini-ia64.c: Add support for the throw->branch exception 
5371         optimization.   
5372
5373         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
5374
5375 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
5376
5377         * mini.c: Enabled "fastpath" deadce :-)
5378         
5379 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
5380
5381         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
5382         alias analysis pass to support it.
5383         * mini.h: Likewise.
5384         * ssa.c: Likewise.
5385         * liveness.c: Likewise (liveness computation can use aliasing
5386         information to be more accurate).
5387         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
5388         moreover made so that "--compile-all" uses the given optimization
5389         flags and not the default ones.
5390         * aliasing.c: Alias analysis (new file).
5391         * aliasing.h: Likewise.
5392         * Makefile.am: added "aliasing.c" and "aliasing.h".
5393         
5394 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
5395
5396         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
5397         OP_L opcodes.
5398
5399 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
5400
5401         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
5402         fp >= end_of_stack exit condition, as it is not needed, and it might
5403         become true for fp eliminated frames.
5404
5405 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
5408         coded offsets.
5409
5410 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
5411
5412         * mini-arm.c: fixed alignment of doubles/longs to match
5413         the C ABI (bug #76635).
5414
5415 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
5416
5417         * aot.c: fix compilation with --enable-minimal=aot.
5418
5419 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
5420
5421         * mini-arm.c: fixed compatibility with the new
5422         floating point emulator package for compares.
5423
5424 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
5425
5426         * mini.c : reverted sig->pinvoke changes (r51396-51397).
5427
5428 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
5429
5430         * mini-exceptions.c (print_stack_frame): Output to stderr.
5431         (mono_handle_native_sigsegv): Ditto.
5432
5433 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
5434
5435         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
5436         OP_LCONV_TO_OVF_I implementation.
5437
5438         * mini-amd64.c: Add support for the throw->branch exception 
5439         optimization.
5440
5441         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
5442         when the catch clause catches a more general exception, i.e. Object.
5443
5444 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
5445
5446         * cpu-ia64.md: Remove unused opcodes.
5447
5448         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
5449         specific defines for architectures defining USE_SIGACTION.
5450
5451         * mini-ia64.c: Fix some warnings.
5452
5453         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
5454         version seemed to skip a frame.
5455
5456 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
5457
5458         * mini.c: Clean up the usage of sig->pinvoke flag. Now
5459         only calls which are made to native code use this flag.
5460
5461 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
5462
5463         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
5464         varargs methods as well.
5465         
5466         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
5467         which have save_lmf set. Reorganize methods prologs a bit.
5468
5469         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
5470         debugger to the proper place.
5471
5472 2005-10-29  Martin Baulig  <martin@ximian.com>
5473
5474         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
5475         when running inside the debugger until the debugger has support
5476         for it.
5477
5478 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
5479
5480         * mini.h: Fix a warning.
5481
5482 2005-10-24  Miguel de Icaza  <miguel@novell.com>
5483
5484         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
5485         we expose publicly, this returns the string.
5486
5487 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
5488
5489         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
5490         with fp elimination.
5491
5492 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
5493
5494         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
5495         native stacktrace using the glibc 'backtrace' function if available.
5496
5497 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
5498
5499         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
5500
5501         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
5502         handle SIGSEGVs received while in native code.
5503
5504         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
5505         code, call mono_handle_native_sigsegv which will abort the runtime
5506         after printing some diagnostics, instead of converting it into a
5507         confusing NullReferenceException.
5508
5509 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
5510
5511         * cpu-pentium.md: Remove unused opcodes.
5512
5513 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
5514
5515         * mini-amd64.h (MonoLMF): Add rsp field.
5516
5517         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
5518         the lmf too.
5519
5520 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
5521
5522         * mini-codegen.c (get_register_spilling): Fix some warnings.
5523
5524 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
5525
5526         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
5527         elimination during exception handling. Enable fp elimination by
5528         default.
5529
5530         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
5531         elimination.
5532
5533 2005-10-16  Martin Baulig  <martin@ximian.com>
5534
5535         * mini-exceptions.c
5536         (mono_debugger_run_finally): New public method for the debugger.
5537
5538 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * debug-mini.c (mono_debug_init_method): Fix warning.
5541
5542         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
5543         the 'exname' parameter const to fix some warnings.
5544
5545 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
5546
5547         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
5548         introduced by the previous patch.
5549
5550 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
5551
5552         * basic-float.cs: Add test for precision of float arithmetic.
5553
5554         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
5555         when loading/storing single values from/to memory.
5556
5557         * mini.c (mono_jit_compile_method_with_opt): Create the function
5558         pointers in the correct domain.
5559
5560 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
5561
5562         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
5563         introduced by previous patch.
5564         
5565         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
5566         when out_filter_idx is NULL.
5567
5568         * mini-exceptions.c: Don't run filter clauses twice during exception
5569         handling. Fixes #75755.
5570
5571 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * aot.c: Add support for ldflda wrappers.
5574
5575         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
5576         #75902.
5577
5578 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
5579
5580         * mini.c, mini.h: do not consider exception handlers blocks when
5581         setting up interface variables.
5582
5583 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
5584
5585         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
5586
5587 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
5588
5589         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
5590         causes a regression.
5591
5592         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
5593
5594 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
5595
5596         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
5597         of the OP_P definitions.
5598
5599         * TODO: Add a proposal for dealing with the CEE/OP mess.
5600
5601         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
5602         optimizations from the x86 port.
5603
5604         * cpu-amd64.md: Ditto.
5605
5606         * basic.cs basic-long.cs: Add tests.
5607
5608 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
5609
5610         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
5611         Patrik Torstensson's implementation of my exception-handling
5612         optimization idea, when the exception object is not used
5613         (bug #62150).
5614
5615 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
5616
5617         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
5618         of the mul_imm optimizations from the old jit.
5619
5620 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
5621
5622         * mini.c, liveness.c: patch by Patrik Torstensson and
5623         Zoltan Varga to improve performance in methods with
5624         exception clauses.
5625
5626 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
5627
5628         * driver.c: Remove 'Globalization' entry from --version.
5629
5630 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
5631
5632         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
5633         there is a profiler interested in JIT events.
5634
5635         * aot.c: Load profile files produced by the AOT profiling module, and
5636         reorder methods based on the profiling info. Add a 'method_order' table
5637         to the AOT file to make mono_aot_find_jit_info work with the reordered
5638         methods.
5639
5640         * mini.h: Bump AOT file version info.
5641
5642 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
5643
5644         * mini-arm.h: work around what looks like a gcc bug when optimizations
5645         are enabled.
5646
5647 2005-09-28  Raja R Harinath  <rharinath@novell.com>
5648
5649         * Makefile.am (AM_CFLAGS): Don't use += to append inside
5650         conditionals.  Use ...
5651         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
5652
5653 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
5654
5655         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
5656         to determine the amount of memory to copy when passing valuetypes.
5657
5658         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
5659         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
5660
5661 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
5662
5663         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
5664         information about aot.
5665
5666 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
5667
5668         * *.c: Replace the use of {Enter,Leave}CriticalSection with
5669         macros. This will allow a deadlock debugger to easily be plugged
5670         in.
5671
5672 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
5673
5674         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
5675
5676 2005-09-27  Raja R Harinath  <rharinath@novell.com>
5677
5678         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
5679         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
5680         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
5681         ($(arch_built)) [CROSS_COMPILING]: Error out.
5682
5683 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * aot.c: Add support for the no_special_static flag for classes.
5686
5687 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
5688
5689         * Reapply reverted patches.
5690
5691         * *: Revert r50174 as well.
5692
5693         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
5694
5695 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
5696
5697         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
5698
5699 2005-09-23  Miguel de Icaza  <miguel@novell.com>
5700
5701         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
5702         part of the SIG_HANDLER_SIGNATURE.  
5703
5704 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5705
5706         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
5707         statistics.
5708
5709         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
5710         introduced by previous patch.
5711
5712 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
5715         saved registers too.
5716
5717         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
5718         upon the information returned by get_call_info ().
5719         
5720         * mini-x86.c (add_float): Fix stack size calculation.
5721         (mono_arch_call_opcode): Rewrite this so it works based up the
5722         information returned by get_call_info ().
5723         (mono_arch_get_this_vret_args): Ditto.
5724
5725 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
5726
5727         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
5728         in cinfo to determine the registers which need to be used.
5729
5730 2005-09-20  Miguel de Icaza  <miguel@novell.com>
5731
5732         * driver.c (mono_main): Add --server and --desktop flags. 
5733
5734 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
5735
5736         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
5737         registers as global registers.
5738
5739         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
5740         longer needed with the new register allocator.
5741
5742         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
5743
5744         * cpu-ia64.md: Remove unused opcodes.
5745         
5746         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
5747         
5748 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
5749
5750         * cpu-amd64.md: Remove unused opcodes.
5751
5752         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
5753         needed with the new register allocator.
5754
5755         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
5756         reg-reg moves.
5757
5758 2005-09-16  Raja R Harinath  <rharinath@novell.com>
5759
5760         * Makefile.am (check-local): Don't invoke semdel-wrapper.
5761
5762 2005-09-16  Martin Baulig  <martin@ximian.com>
5763
5764         * exceptions-amd64.c
5765         (throw_exception): Don't call mono_debugger_throw_exception() if
5766         we're a rethrow - see the FIXME in the code.
5767
5768 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
5769
5770         * mini.c (mono_init_exceptions): This only works on some architectures.
5771         
5772 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
5773
5774         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
5775         on ia64.
5776
5777         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
5778
5779         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
5780         now in mini-exceptions.c.
5781
5782 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
5783
5784         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
5785         now in mini-exceptions.c.
5786
5787 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
5788
5789         * exceptions-x86.c: Applied patch from Patrik Torstensson 
5790         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
5791
5792         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
5793         code into mini-exceptions.c. Add some assertions to it.
5794
5795 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
5796
5797         * aot.c (emit_section_change): Applied patch from "The Software Team" 
5798         (<software@solmersa.com>). Fix as errors on windows.
5799
5800 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
5801
5802         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
5803         method info into the LMF.
5804
5805 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5806         
5807         * mini-ia64.c: Add proper unwind info for method epilogs.
5808
5809         * exceptions-ia64.c: Add some code to help debugging.
5810         
5811         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
5812
5813         * mini-exceptions.c: Fix warning.
5814
5815 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
5816
5817         * mini.c: Really fix build.
5818
5819         * mini-x86.c mini-amd64.c: Fix build.
5820
5821 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5822
5823         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
5824
5825         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
5826         some Interlocked methods as intrinsics.
5827
5828         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
5829         for Thread methods as well.
5830
5831         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
5832
5833         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
5834
5835         * mini-ia64.c mini-x86.c mini-amd64.c 
5836         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
5837         OP_MEMORY_BARRIER.
5838         
5839         * mini.c (mono_init_exceptions): Fix build breakage.
5840
5841 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
5842
5843         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
5844         of instructions. Use the new ia64_unw_op macros for emitting unwind
5845         info.
5846
5847         * mini.c (mono_init_exceptions): Initialize exception handling
5848         related trampolines at startup.
5849
5850 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
5851
5852         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
5853
5854 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * mini.c: Handle type loading errors gracefully during compilation and
5857         throw the appropriate exception.
5858
5859 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
5860
5861         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
5862         for the mono binary.
5863
5864 2005-09-09  Martin Baulig  <martin@ximian.com>
5865
5866         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
5867         the release.
5868
5869 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
5870
5871         * mini-arm.h: use emulation for conv.r.un for the release.
5872
5873 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
5874
5875         * mini-arm.c, objects.cs: more fixes and tests for them.
5876
5877 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
5878
5879         * mini-arm.c: align structures to at least 4 bytes to be able
5880         to keep our current optimized memcpy.
5881
5882 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
5883
5884         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
5885
5886 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5887
5888         * mini.c: ignore SIGPIPE.
5889
5890 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
5891
5892         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
5893
5894         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
5895
5896 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
5897
5898         * mini.h: Add prototype for mono_allocate_stack_slots_full.
5899
5900 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
5901
5902         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
5903         exception handling support.
5904         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
5905         patch by Brian Koropoff <briank@marakicorp.com>).
5906
5907 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
5908
5909         * mini.c: revert another 'optimization' which breaks when
5910         items on the eval stack need to be saved at a basic block end
5911         (bug #75940).
5912
5913 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
5914
5915         * jit-icalls.c: for arrays, ensure we always provide
5916         lower bounds.
5917
5918 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
5921         
5922         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
5923
5924 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
5925
5926         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
5927         arguments in their original register.
5928
5929 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
5930
5931         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
5932         memset/memcpy.
5933
5934         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
5935         when ssapre is enabled.
5936
5937         * inssel-long.brg: Fix bug in previous patch.
5938
5939         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
5940         multiplication by a constant.
5941
5942 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
5943
5944         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
5945         icc.
5946
5947         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
5948         saving registers.
5949
5950 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
5951
5952         * inssel-arm.brg: apply changes tested by Brian Koropoff
5953         <briank@marakicorp.com>.
5954
5955 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
5956
5957         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
5958         
5959 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
5960
5961         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
5962         to the same register if dreg is just a base register.
5963         (print_ins): Improve printing of membase opcodes.
5964
5965         * inssel-x86.brg: Add optimized ldind(reg) rules.
5966
5967         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
5968
5969 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
5970
5971         * mini.c: when running under valgrind, set the stack bottom for
5972         the GC at the actual approximate stack for the app (fixes running
5973         mono with valgrind).
5974
5975 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
5976
5977         * mini.c: do no break at the first valuetype to init found
5978         (fixes bug #75791).
5979
5980 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
5981
5982         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
5983
5984 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
5985
5986         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
5987
5988 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
5989
5990         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
5991
5992 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
5993
5994         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
5995
5996         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
5997         code.
5998
5999         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6000         code.
6001
6002         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6003         methods.
6004
6005 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6006
6007         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6008
6009 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6010
6011         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6012         in the tail recursion optimization.
6013
6014         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6015         debug info into the assembly file.
6016
6017         * iltests.il: Add test for filter regions.
6018
6019         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6020         initial stack of filter regions. Fixes #75755.
6021
6022 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6023
6024         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6025         stack requirements.
6026
6027 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6028
6029         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6030         the check for an already compiled method on non-ia64 platforms.
6031         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6032         proper domain.
6033
6034         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6035
6036         * inssel-x86.brg: Add some optimized call rules.
6037
6038 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6039
6040         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6041         method here.
6042
6043         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6044         mono_arch_patch_delegate_trampoline.
6045
6046         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6047
6048         * mini-trampolines.c: Fix build.
6049
6050         * mini-amd64.h: Add delegate trampolines.
6051
6052         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6053
6054         * inssel-amd64.brg: Add optimized call rules.
6055         
6056         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6057
6058         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6059
6060 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6061
6062         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6063         change.
6064
6065         * mini-ia64.c: Remove LMF fixmes.
6066
6067         * mini-ia64.h: Remove most fields from LMF.
6068
6069         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6070
6071         * mini-trampolines.c: Add support for IA64 function descriptors.
6072
6073         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6074         for IA64 function descriptors.
6075
6076 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6077
6078         * tramp-arm.c: patch the vtable for virtual calls. Added
6079         support code to register/unregister the LMF.
6080         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6081         more LMF work.
6082
6083 2005-08-19  Dick Porter  <dick@ximian.com>
6084
6085         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6086         bit value if needed.
6087
6088 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6089
6090         * mini.c (mini_get_method): Move handling of wrapper data here.
6091
6092         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6093
6094         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6095         virtual.
6096
6097         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6098         bblock->code does not remain empty.
6099
6100 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6101
6102         * arrays.cs: Add regression test for #75832.
6103
6104         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6105         rules. Fixes #75832.
6106
6107         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6108         instruction scheduling.
6109
6110 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6111
6112         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6113
6114 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6115
6116         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6117
6118         * mini-codegen.c: Fix VC build.
6119
6120         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6121
6122 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6123
6124         * mini.h: fix signature for mono_register_opcode_emulation.
6125
6126 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6127
6128         * mini.c: Get rid of most of the helper_sig_... constants using
6129         mono_create_icall_signature ().
6130
6131 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6132
6133         * jit-icalls.c (helper_ldstr): New helper function.
6134
6135         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
6136
6137         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
6138         throw, load the string using a helper call instead of creating a string object.
6139
6140         * aot.c: Update after LDSTR changes.
6141
6142         * mini.h: Bump AOT file version.
6143         
6144         * aot.c: Save class size info into the AOT file. Print more statistics during
6145         compilation.
6146
6147         * mini.h: Bump AOT file version.
6148
6149         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6150         ordering of disasm cases. Fixes #74957.
6151
6152 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
6153
6154         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
6155         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
6156         the generic code needed for the ARM port.
6157
6158 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
6159
6160         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
6161         inssel-arm.brg: more ARM features and fixes.
6162
6163 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
6164
6165         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
6166         ARM port work in progress.
6167
6168 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
6169
6170         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
6171
6172         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
6173
6174         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
6175
6176         * inssel.brg (mini_emit_memset): Add support for unaligned access.
6177
6178         * *-ia64.*: Ongoing IA64 work.
6179         
6180         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
6181
6182 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
6183
6184         * TODO: Remove out-of-data todo stuff.
6185
6186         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
6187         dead code.
6188
6189         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
6190
6191         * mini.h: Bump corlib version.
6192
6193 2005-07-27  Martin Baulig  <martin@ximian.com>
6194
6195         * mini-codegen.c
6196         (create_copy_ins): Added `const unsigned char *ip' argument; set
6197         `copy->cil_code' from it.
6198
6199 2005-07-27  Martin Baulig  <martin@ximian.com>
6200
6201         * mini-exceptions.c (mono_handle_exception): Don't call
6202         mono_debugger_handle_exception() for filters.
6203
6204 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
6205
6206         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
6207         as well.
6208
6209 2005-07-26  Martin Baulig  <martin@ximian.com>
6210
6211         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
6212
6213         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
6214         helper_compile_generic_method() if the method is actually virtual
6215         and non-final.
6216
6217 2005-07-26  Martin Baulig  <martin@ximian.com>
6218
6219         * mini.c
6220         (trampoline_code): Renamed to `mono_trampoline_code' and made it
6221         public; this is now accessed directly by the debugger.
6222         (mono_generic_trampoline_code): Removed.
6223
6224         * debug-mini.c
6225         (mono_debug_init_method): Also add interncalls and wrappers.
6226
6227 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
6228
6229         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
6230
6231 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
6232
6233         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
6234
6235 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
6236
6237         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
6238
6239 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
6240
6241         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
6242         getting TLS offsets on AMD64 too.
6243
6244 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
6245
6246         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
6247
6248 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
6249
6250         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
6251         inssel-arm.brg, mini-arm.h: ARM port work in progress.
6252
6253 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
6254
6255         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
6256
6257         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
6258         to mini.c.
6259
6260         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
6261         mono_sparc_is_virtual_call ().
6262         
6263         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
6264
6265         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
6266         trampoline parameters.
6267
6268         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
6269         
6270         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
6271         to mono_arch_get_vcall_slot_addr.
6272
6273         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
6274         trampoline code.
6275
6276         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
6277
6278 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
6279
6280         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
6281
6282 2005-07-19  Martin Baulig  <martin@ximian.com>
6283
6284         * exceptions-amd64.c (throw_exception): Call
6285         mono_debugger_throw_exception() here like we're doing it on i386.
6286
6287 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
6288
6289         * mini-ia64.c: Add optimized TLS access support.
6290
6291 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
6292
6293         * mini-exceptions.c: Ongoing IA64 work.
6294
6295         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
6296
6297         * mini.c: Use the default optimization set when embedding. Fixes
6298         #75194.
6299
6300 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
6301
6302         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
6303         of trampolines to a separate file.
6304
6305         * mini-trampolines.c: New file.
6306
6307         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
6308         separate file.
6309         
6310         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
6311         amd64/ia64 code.
6312
6313         * mini-codegen.c: Fix cygwin build.
6314
6315 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
6316
6317         * mini.c: Add some minor changes needed by the IA64 port.
6318
6319         * *-ia64.*: Ongoing IA64 work.
6320
6321 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
6322
6323         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
6324         trampolines into arch-independent and arch-dependent parts.
6325
6326         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
6327
6328 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
6329
6330         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
6331
6332         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
6333         the xp-regalloc-branch for amd64.
6334
6335         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
6336         xp-regalloc-branch for x86.
6337
6338 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
6339
6340         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
6341
6342 2005-07-06  Martin Baulig  <martin@ximian.com>
6343
6344         * mini.c
6345         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
6346         (mono_jit_runtime_invoke): Likewise.
6347
6348 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
6349
6350         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
6351         on x86 too.
6352         
6353         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
6354         without loading their metadata. Reorganize the file format so exception handling+
6355         debug info is kept separate from normal method info. Create MonoJitInfo 
6356         structures for methods lazily.
6357
6358         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
6359         loading metadata.
6360         (x86_class_init_trampoline): Patch AOT class init trampolines too.
6361
6362         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
6363
6364         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
6365         in AOT code.
6366
6367         * mini.h: Bump AOT file version.
6368
6369 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
6370
6371         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
6372
6373 2005-07-01  Raja R Harinath  <rharinath@novell.com>
6374
6375         * Makefile.am (check-local): Call semdel-wrapper.
6376
6377 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * mini-x86.c: Revert the last change as it seems to break the build..
6380
6381 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
6382
6383         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
6384         
6385         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
6386
6387 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
6388
6389         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
6390         outside of the macro, so strange stuff doesn't happen with gcc4
6391         (NEW_AOTCONST_TOKEN): Likewise.
6392
6393 2005-06-28  Martin Baulig  <martin@ximian.com>
6394
6395         * mini.c (mini_class_is_system_array): New static method; use this
6396         instead of `klass->parent == mono_defaults.array_class' everywhere
6397         since this also works for the new generic array class.
6398
6399 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
6400
6401         * inssel.brg: Remove warnings.
6402
6403 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
6404
6405         * mini-ia64.c: Ongoing IA64 work.
6406
6407         * basic-float.cs: Add float->i1 conversion test.
6408
6409         * iltests.il: Add conv.u4 test.
6410
6411 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
6412
6413         * inssel-long.brg: Fix bug caused by last change.
6414
6415 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
6416
6417         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
6418         BSDs.  Allows the x86 JIT to work on OSX86
6419
6420 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
6421
6422         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
6423         u4->i8 conversion.
6424
6425         * mini-ia64.c: Ongoing IA64 work.
6426
6427 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
6428
6429         * mini-ia64.c: Ongoing IA64 work.
6430
6431         * driver.c: Clean up jit_code_hash as well when using --regression.
6432
6433         * inssel-long.brg: Fix long->i4/u4 conversion rules.
6434
6435         * basic-long.cs: Add tests for long->u4 conversion.
6436
6437 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
6438
6439         * mini.c: Take mono_get_domainvar out of macros. This makes sure
6440         that we do not depend on undefined C behavior: the order stuff
6441         gets evaluated within an expression. Fixes mono when compiled on
6442         GCC 4.
6443
6444 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
6445
6446         * *-ia64.*: Ongoing IA64 work.
6447
6448         * aot.c: Lower memory usage while loading AOT methods.
6449
6450         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
6451
6452         * mini.h: Bump AOT file format version.
6453
6454 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
6455
6456         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
6457
6458 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
6459
6460         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
6461         not on callee assembly). Fixed some comments.
6462
6463 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
6464
6465         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
6466         it gets proper disassembly.
6467         (emit_method_info): Remove some dead code.
6468
6469         * mini.c (mini_method_compile): Allways allocate the GOT var in
6470         mono_method_to_ir for emulating opcodes.
6471
6472 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
6473
6474         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
6475         before freeing the code memory. Fixes #74990.
6476
6477         * objects.cs: Add regression test for #74992.
6478
6479         * liveness.c: Extend live ranges of arguments to the beginning of the
6480         method. Fixes #74992.
6481
6482         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
6483         so it points into the faulting instruction.
6484
6485 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
6486
6487         * jit-icalls.c (mono_imul_ovf): Add exception handling.
6488
6489         * *-ia64.*: Ongoing IA64 work.
6490
6491         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
6492
6493 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
6494
6495         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
6496
6497         * *-ia64.*: Ongoing IA64 work.
6498
6499 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
6500
6501         * basic-long.cs: Add tests for add/sub.ovf.
6502
6503         * basic.cs: Add tests for sub.ovf.
6504
6505         * *-ia64.*: Ongoing IA64 work.
6506
6507 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
6508
6509         * *-ia64.*: Ongoing IA64 work.
6510
6511         * basic.cs: Add conv.ovf.i4.un test.
6512
6513 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
6514
6515         * mini.c: (remove_block_if_useless) Fixed bug 75061.
6516         
6517 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6518
6519         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
6520
6521 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
6522
6523         * *-ia64.*: Ongoing IA64 work.
6524
6525 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6526
6527         * trace.[ch]:
6528         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
6529
6530 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
6531
6532         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
6533
6534 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
6535
6536         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
6537
6538         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
6539         of a call is callable by a near call.
6540
6541 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
6542
6543         * mini-ia64.c: Ongoing IA64 work.
6544
6545 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
6546
6547         * genmdesc.c: Make the generated array non-static.
6548
6549         * inssel-long.brg: Fix LSHR_IMM rule.
6550
6551         * *-ia64.*: Ongoing IA64 work.
6552
6553         * *-ia64.*: Ongoing IA64 work.
6554
6555 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
6556
6557         * *-ia64.*: Ongoing IA64 work.
6558
6559         * *-ia64.*: Ongoing IA64 work.
6560         
6561         * mini-ia64.c: Ongoing IA64 work.
6562
6563         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
6564
6565 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
6566
6567         * objects.cs basic-calls.cs: Move some tests to objects.cs.
6568         
6569         * objects.cs basic-long.cs: Move some tests to objects.cs.
6570
6571 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
6572
6573         * *-ia64.*: Ongoing IA64 work.
6574
6575         * iltests.il: Add a new test.
6576
6577         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
6578         newobj. Fixes #75042.
6579
6580 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
6581
6582         * *-ia64.*: Ongoing IA64 work.
6583         
6584         * *-ia64.*: Ongoing IA64 work.
6585         
6586         * *-ia64.*: Ongoing IA64 work.
6587
6588         * basic.cs objects.cs: Move tests accessing static variables as well.
6589
6590         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
6591
6592 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
6593
6594         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
6595
6596         * driver.c: Always print failed tests.
6597
6598         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
6599         frame pointer.
6600
6601         * *ia64*: Ongoing IA64 work.
6602
6603 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
6604
6605         * basic.cs: Add tests for add.ovf. Fix warnings.
6606
6607 2005-05-18  Miguel de Icaza  <miguel@novell.com>
6608
6609         * driver.c (mono_main): Avoid crash if no argument is passed to
6610         --break;  Do not use g_error, but f_printf.   And fix all other
6611         ocurrences of the same crash.
6612
6613 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
6614
6615         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
6616         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
6617         Fixes #74742.
6618
6619 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
6620
6621         * *-ia64.*: Add beginnings of IA64 backend.
6622
6623         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
6624
6625 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
6626
6627         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
6628         Fixes #74925.
6629
6630         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
6631
6632         * mini-amd64.c: Fix a warning.
6633
6634 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
6635
6636         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
6637         in float_neg. Fixes #74897.
6638
6639         * mini-amd64.c (emit_call): Fix another near call bug.
6640
6641 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
6642
6643         * declsec.c: Keep the appdomain information in the structure. Added a 
6644         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
6645         value gets overwritten).
6646         * declsec.h: Set the default MonoArray for the the stack to 6. Added
6647         an MonoAppDomain member to MonoSecurityFrame.
6648         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
6649         used in the stack walk. Now use a MonoArray which grow (double) when
6650         it gets full.
6651
6652 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
6653
6654         * mini.c: Re-enabled runtime cleanup, since running threads should
6655         now properly stop when exiting.
6656
6657 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
6658
6659         * mini-codegen.c: New file contaning the arch-independent local
6660         register allocator. Not used by any architectures yet.
6661
6662         * mini.h linear-scan.c: Merge some changes from the 
6663         mini-xp-local-regalloc branch.
6664
6665 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
6666
6667         * mini-amd64.c (emit_call): Fix calls to native functions when the
6668         runtime is compiled as a shared library. Fixes #74756.
6669
6670         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
6671         on a literal field. Fixes #74751.
6672
6673 2005-04-25  Raja R Harinath  <rharinath@novell.com>
6674
6675         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
6676
6677 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
6678
6679         * objects.cs: Add missing null casting test.
6680
6681 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
6682
6683         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
6684         in wrapper methods. Also rename 'address' variable to 'offset'.
6685
6686 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
6687
6688         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
6689         warnings.
6690         
6691         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
6692
6693         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
6694         work on windows.
6695
6696 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6697
6698         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
6699
6700 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
6701
6702         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
6703         just the last bytes.
6704
6705 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
6706
6707         * aot.c (mono_compile_assembly): Fix warning.
6708
6709         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
6710         by the _MSC_VER stuff.
6711
6712 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
6713
6714         * inssel-long.brg: Fix #74588.
6715
6716         * cpu-amd64.md: Fix #74591.
6717
6718         * iltests.il: Add new regression tests.
6719
6720 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
6721
6722         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
6723         valuetype.
6724
6725 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
6726
6727         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
6728
6729         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
6730         from Bill Middleton <flashdict@gmail.com>.
6731
6732 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
6733
6734         * arrays.cs: Add new regression test. Fix warnings.
6735
6736 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
6737
6738         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
6739         and leakage in CKFINITE.
6740
6741         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
6742         this to a null op since it is called on amd64 too.
6743
6744         * exceptions-amd64.c (get_throw_trampoline): Align stack.
6745
6746         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
6747         body since this is not used on amd64.
6748         
6749         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
6750
6751         * mini-amd64.c: Remove obsolete fixmes.
6752
6753         * mini.c (print_method_from_ip): Fix debugging support.
6754
6755 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
6756
6757         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
6758         so that expressions that don't give much gain are not reduced.
6759         * ssapre.h: Likewise.
6760
6761 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
6762
6763         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
6764
6765         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
6766
6767         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
6768
6769 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
6770
6771         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
6772
6773         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
6774
6775 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
6776
6777         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
6778         stack touching.
6779
6780         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
6781
6782         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
6783
6784         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
6785
6786         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
6787         MONO_ARCH_USE_SIGACTION. Fixes #74252.
6788
6789         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
6790
6791         * mini-x86.c: Fix up stack overflow handling.   
6792
6793         * exceptions.cs: Add new regression test.
6794
6795 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
6796
6797         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
6798         mono_jit_thread_attach.
6799
6800         * mini.c (mono_method_to_ir): Verify called method is not abstract.
6801
6802 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6803
6804         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
6805         avoid calling constructors using callvirt.
6806
6807         * inssel.brg: Fix #74073.
6808
6809 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
6810
6811         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
6812         compilation with non-GCC compilers.
6813         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
6814         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
6815
6816 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
6817
6818         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
6819         klass->interface_offsets (will likely fix bug#74073).
6820
6821 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6822
6823         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
6824
6825 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
6826
6827         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
6828         to amd64_div_reg_size ().
6829         
6830         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
6831
6832 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
6833
6834         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
6835
6836 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6837
6838         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
6839
6840 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6841
6842         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
6843         
6844         * mini.c (mono_precompile_assembly): Load and precompile referenced
6845         assemblies as well. Fixes #74015.
6846
6847 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
6848
6849         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
6850
6851 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
6852
6853         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
6854         a lot of checks and (anyway) permissions cannot work until corlib is 
6855         loaded.
6856
6857 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
6858
6859         * mini-ppc.c: fixed ABI issue on sysv/ppc.
6860
6861 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
6862
6863         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
6864         calls (fixes bug#72824).
6865
6866 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6867
6868         * mini.c: fix tail recursion elimination (see test in bug#73936).
6869
6870 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
6871
6872         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
6873         some fp functions in sse2 mode.
6874
6875 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
6876
6877         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
6878
6879 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
6880
6881         * mini.h mini.c: Add mono_get_jit_tls_key ().
6882
6883         * mini-x86.c: Enable fast TLS support on windows.
6884
6885 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
6886
6887         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
6888         * mini.c: Check for p/invoke method when generating code. If a
6889         p/invoke method, or it's class, isn't decorated with [Suppress
6890         UnmanagedCodeSecurity] then generate code to call System.Security.
6891         UnmanagedDemand (only if the security manager is active).
6892
6893 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6894
6895         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
6896         last change as it seems to cause strange crashes.
6897         
6898 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
6899
6900         * *.c: handle unsafe function pointers where needed.
6901
6902 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6903
6904         * mini.c (mono_jit_free_method): Remove the fixme too.
6905
6906 2005-03-15  Miguel de Icaza  <miguel@novell.com>
6907
6908         * mini.c: As discussed, make the code actually free the delegate
6909         thunk now, to enable the debugging of delegate problems, use
6910         MONO_DEBUG=1 when running Mono. 
6911
6912         This takes also care of parts of the leaks as seen by Joe.
6913
6914 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
6915
6916         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
6917         thread_tls_offset calculation.
6918
6919 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
6920
6921         * declsec.c: Reworked linkdemand checks for icall. The previous code
6922         was using the declaration code (untrusted) and didn't work as expected
6923         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
6924         specific case.
6925
6926 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
6927
6928         * iltests.il: Add new localloc test.
6929
6930         * mini-amd64.c: Handle large stack allocations the same way as on
6931         windows if stack overflow handling is working.
6932         
6933         * mini-amd64.c: Allocate the signal stack using mmap.
6934
6935         * mini.c (sigsegv_signal_handler): Fix reading of context.
6936
6937         * mini-exceptions.c: Fix up stack overflow handling.
6938
6939         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
6940
6941         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
6942
6943         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
6944
6945         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
6946
6947         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
6948         tramp_init functions as they are no longer needed.
6949
6950 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
6951
6952         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
6953         
6954         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
6955
6956         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
6957         
6958         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
6959         support that now.
6960
6961         * mini-ops.h: Add OP_LMUL_IMM.
6962
6963         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
6964         long mul/div opcodes as intrinsic.
6965
6966         * mini-amd64.c (emit_call): Handle the case when the callee might be
6967         an AOT method.
6968
6969 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
6970
6971         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
6972         extra safe.
6973         
6974         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
6975
6976         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
6977
6978 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
6979
6980         * mini.c (mono_codegen): Don't leak here, to help people running
6981         monogrind.
6982
6983 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
6984
6985         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
6986         conversions in sse2 mode.
6987
6988         * basic-float.cs: Add regression test.
6989         
6990         * mini-amd64.c: Reenable sse2.
6991
6992 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
6993
6994         * mini-amd64.c: Disable sse2 until some regressions are fixed.
6995
6996 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
6997
6998         * driver.c: Copyright text should include 2005.
6999         
7000 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7001
7002         * cpu-amd64.md (load_membase): Fix more max lengths.
7003
7004 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7005
7006         * cpu-amd64.md (load_membase): Fix max length.
7007
7008         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7009
7010         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7011
7012         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7013         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7014
7015         * basic-float.cs: Add rounding regression test.
7016
7017         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7018
7019 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7020
7021         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7022         structures in registers for pinvoke wrappers.
7023
7024 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7025
7026         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7027
7028 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7029
7030         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7031         wrapper to mono_jit_thread_attach.
7032
7033         * mini.c (mini_jit_thread_attach): New jit icall.
7034
7035         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7036         native->managed wrappers.
7037
7038         * exceptions.cs: Add new regression test.
7039
7040         * mini.c (optimize_branches): Check regions in the cbranch to throw
7041         block case as well. Fixes #73242.
7042
7043 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7044
7045         * mini.c: thread safety fixes.
7046
7047 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7048
7049         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7050         patching stuff, since delegates use jump trampolines so there is
7051         no caller.
7052
7053         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7054         jump trampolines.
7055         
7056         * tramp-amd64.c: Fix build.
7057
7058         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7059         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7060
7061         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7062         Rename this to mono_arch....
7063         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7064
7065         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7066
7067         * mini-amd64.c (emit_call): If both the caller and the callee is
7068         guaranteed to have 32 bit addresses, emit a normal call.
7069
7070         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7071
7072         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7073         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7074         method_ptr inside delegates.
7075
7076 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7077
7078         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7079         invalidated. Fixes #73001.
7080
7081         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7082
7083         * mini-x86.c: Only use stdcall for pinvokes on windows.
7084
7085 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7086
7087         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7088         * mini-x86.c: remove unreliable __thread var offset detection,
7089         use the correct accessors and enable by default.
7090
7091 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7092
7093         * mini.c (mono_jit_free_method): Fix memory leak.
7094
7095 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7098
7099 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7100
7101         * cpu-amd64.md: Fix lengths of atomic opcodes.
7102
7103 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7104
7105         * driver.c: try to not imply using ICU is any good.
7106
7107 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7108
7109         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7110         functions as inline ops.
7111
7112         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7113         some Interlocked functions as inline ops.
7114
7115         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7116
7117         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7118
7119         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7120
7121         * mini.c: Add support for OP_NOT_TAKEN.
7122
7123         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7124         structures in registers for pinvoke wrappers.
7125
7126         * mini-amd64.c: Fix warnings.
7127
7128 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7129
7130         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7131
7132         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
7133
7134         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
7135         address instead of loading the address from it.
7136
7137         * mini-x86.c: Add support for returning small structs in registers
7138         on Win32. Fixes part of #70864.
7139         
7140 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
7141
7142         * trace.c (get_token): Improve error checking.
7143
7144 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7145
7146         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
7147
7148 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
7149  
7150         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
7151         it can be reused for MonoClass.
7152         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
7153         _LINKDEMAND.
7154
7155 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
7156
7157         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
7158         instead of a MonoReflectionMethod. The method information wasn't used
7159         when displaying SecurityException details (but will be now).
7160
7161 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
7162
7163         * Makefile.am : windows build fix.
7164
7165 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7166
7167         * iltests.il: Add new regression test.
7168
7169         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
7170         #72522.
7171
7172 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
7173  
7174         * mini.c: Moved linkdemand check into helper function check_linkdemand
7175         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
7176         LDFTN, LDVIRTFTN).
7177
7178 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
7179
7180         * declsec.c: Added statistics counter for different kinds of 
7181         LinkDemands.
7182         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
7183         (and commented) declaration.
7184         * mini.c: Added statistics counter for security Demand code 
7185         generation. Added display of security statistics.
7186
7187 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
7188
7189         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
7190         Fix compilation errors under gcc-2.95.
7191
7192 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
7193
7194         * mini.c, driver.c: Use the new jit trampoline hashtable
7195
7196 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7197
7198         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
7199
7200 2005-02-11  Martin Baulig  <martin@ximian.com>
7201
7202         * debug-mini.c (mono_debug_close_method): Free the line number array.
7203
7204 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
7205
7206         * aot.c: Break up large methods into smaller ones. Share GOT slots for
7207         icalls.
7208
7209         * mini.h: Bump AOT file format version. 
7210
7211 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
7212
7213         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
7214         APTC and P/Invoke.
7215         * declsec.h: Added macros to get/set lazyly initialized security 
7216         informations about assemblies. Added new enum for different type of
7217         possible LinkDemand violation. Added function to check LinkDemands.
7218         * mini.h: Added a field to MonoCompile to hold any security violation
7219         detected when JITting a method (so it can be thrown later).
7220         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
7221         and CEE_CALLVIRT. Added code to throw exception at the end of
7222         mini_method_compile (note: the exception is unhandled right now).
7223
7224 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7225
7226         * mini.c, jit-icalls.c: use the managed implementation of
7227         memset for initobj and memset, to avoid managed <-> unmanaged
7228         transitions.
7229
7230 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
7231
7232         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
7233         optimization if it would need a GOT var.
7234
7235         * basic.cs: Add tests for constant propagation and switch statements.
7236
7237         * ssa.c: Fix out-of-range constant propagation and switch statements.
7238
7239 2005-02-09    <vargaz@freemail.hu>
7240
7241         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
7242
7243 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
7244
7245         * cpu-amd64.md (load_membase): Fix max length of load_membase.
7246
7247 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7248
7249         * mini.c: update to new signature of mono_class_get_allocation_ftn().
7250
7251 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
7252
7253         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
7254         arithmetic operations.
7255
7256 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
7257
7258         * mini-ppc.c: add a workaround for broken user code that
7259         DllImports vararg functions with non-vararg signatures.
7260
7261 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7262
7263         * mini.c (mono_jit_compile_method_inner): Add detection and a 
7264         meaningfull error message for assemblies written in Managed C++.
7265
7266         * tramp-amd64.c mini-amd64.h: Add support for 
7267         create_trampoline_from_token ().
7268
7269         * aot.c mini-x86.c abcremoval.c: Applied patch from
7270         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7271
7272 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7273
7274         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
7275         which takes a MonoImage/token as parameter instead of a MonoMethod.
7276
7277         * aot.c: Use the new trampoline for initializing vtables.
7278
7279         * aot.c: Add support for ldfld/stfld_remote wrappers.
7280
7281         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
7282         rules for compare <MEM>, IMM.
7283
7284         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
7285
7286         * aot.c: Handle inherited finalizers correctly.
7287
7288 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7289
7290         * inssel.brg (stmt): Add a missing _setup_... ().
7291
7292         * aot.c: Save some parts of the class state to the AOT file and use it
7293         to recompute that state when a class is initialized.
7294
7295         * mini.c: Install AOT hooks into the runtime.
7296
7297         * mini.h: Bump AOT file format version.
7298         
7299         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
7300         Fixes #72148.
7301
7302         * iltests.il: Add new test.
7303
7304 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7305
7306         * mini.c: fix typo.
7307
7308 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
7309
7310         * mini.c: setup the statistical profiler in the thread attach
7311         callback to cope with the new single thread code.
7312
7313 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7314
7315         * mini-ppc.c: ensure we have enough room for the profiler
7316         calls (fixed bug#72084).
7317
7318 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
7319
7320         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
7321         it.
7322
7323 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7324
7325         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
7326
7327 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7328
7329         * ssapre.c: Fixed an issue with down safety (this allows IronPython
7330         to succesfully execute parrotbench).
7331         * ssapre.h: Likewise.
7332
7333 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7334
7335         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
7336         variable for stores to method arguments (fixes a SSAPRE issue).
7337
7338 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7339
7340         * mini.c: handle value types in dup, fixes gen-112.cs.
7341
7342 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
7343
7344         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
7345         sequence for calls in dynamic methods to avoid thunks.
7346
7347 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7348
7349         * mini.c: correctly remove dynamic methods from the hashtable.
7350
7351 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7352
7353         * driver.c: Disabled SSAPRE until fix the bug that appears
7354         in IronPython's parrotbench.
7355
7356 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
7359
7360         * mini.c (mono_method_to_ir): Revert the previous change.
7361         
7362         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
7363         when AOT compiling.
7364
7365         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
7366         mono_jit_info_table_find () etc. when running under valgrind.
7367
7368         * inssel.brg: Fix warnings.
7369
7370         * mini-exceptions.c: Fix warnings.
7371
7372 2005-01-31  Martin Baulig  <martin@ximian.com>
7373
7374         * driver.c (compile_all_methods_thread_main): Don't try to compile
7375         generic methods or anything which has type parameters.
7376
7377 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
7378
7379         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
7380
7381         * TestDriver.cs: Add --verbose flags.
7382
7383         * graph.c ssa.c: Fix 64 bit warnings.
7384         
7385         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
7386         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
7387         Fix 64 bit warnings.
7388
7389         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
7390         variable not spotted by gcc.
7391         
7392         * mini-amd64.c inssel-amd64.brg: Applied patch from  
7393         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
7394         X86_COMPARE_MEMBASE opcodes.
7395
7396         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
7397
7398 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
7399
7400         * *: MonoMethod->signature might be NULL now. You *MUST* use
7401         mono_method_signature.
7402
7403 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7404
7405         * driver.c (compile_all_methods_thread_main): Compile the methods
7406         without invoking cctors.
7407
7408 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7409
7410         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
7411         * basic-calls.cs: test for the above.
7412
7413 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7414
7415         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
7416         MonoJitInfo changes.
7417
7418 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
7419
7420         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
7421         eagerly if it contains dynamic methods.
7422         
7423         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
7424
7425         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
7426         trace, it is now computed by an icall from trace_ips.
7427         
7428         * mini-exceptions.c: Fix a warning.
7429
7430 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7431
7432         * mini-exceptions.c: don't bother getting stack trace info if
7433         it's not going to be used.
7434
7435 2005-01-27  Raja R Harinath  <rharinath@novell.com>
7436
7437         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
7438         ssapre-mini-ops.h.
7439
7440 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
7441
7442         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
7443
7444         * aot.c: Avoid calling mono_method_get_header () if not needed.
7445
7446         * mini.h: Bump AOT file format version.
7447         
7448         * mini.c (mono_emit_native_call): Allocate a GOT var here.
7449
7450         * mini.c (mono_print_tree): Print more info for calls.
7451
7452 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
7453
7454         * declsec.h: Remove warning by adding missing include for marshal.h
7455
7456 2005-01-26  Martin Baulig  <martin@ximian.com>
7457
7458         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
7459         `ip' twice.
7460
7461 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
7462
7463         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
7464         flags.
7465
7466         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
7467
7468         * aot.c (mono_compile_assembly): Fix a warning.
7469
7470 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
7471
7472         * declsec.c: Look for security attributes on the original MonoMethod 
7473         (and not the wrapped one). This fix permissions on icalls.
7474
7475 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
7476
7477         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
7478
7479         * mini.c (mono_allocate_stack_slots): Add a fixme.
7480
7481         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
7482
7483 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7484
7485         * inssel.brg: optimize casts of sealed types (more
7486         optimizations waiting for fixes in remoting).
7487
7488 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
7489
7490         * inssel.brg (stmt): Add another dummy rule.
7491
7492         * driver.c: Fix warnings.
7493
7494         * driver.c (mono_main): If running under valgrind, instruct glib to use
7495         the system allocation functions so valgrind can track the memory
7496         allocated by the g_... functions.
7497
7498         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
7499
7500         * mini-ops.h: Add OP_DUMMY_STORE opcode.
7501
7502         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
7503
7504         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
7505         variables in try regions.
7506
7507         * mini.c (mini_method_compile): Don't disable optimizations on large
7508         methods when AOT compiling.
7509
7510         * mini.c (mono_allocate_stack_slots): New arch independent method to 
7511         allocate stack slots. Not yet used.
7512
7513 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
7514
7515         * debug-mini.c (mono_debug_close_method): Plug some leaks.
7516
7517 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
7518
7519         * mini-ppc.c: make the branch info relative as the code
7520         buffer can be reallocated.
7521
7522 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
7523
7524         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
7525         * driver.c: Removed the AOT/security restriction. Now initialize the
7526         security manager (in metadata) if --security is used.
7527         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
7528         rather than the pointer to declarative security, when AOT is used.
7529
7530 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
7531
7532         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
7533         basic blocks, reduced intrinsic exception throwing code size.
7534
7535 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
7536
7537         * driver.c (mini_usage): Reorder the usage screen.
7538
7539 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
7540
7541         * mini.c (mono_resolve_patch_target): Fix warning.
7542
7543 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
7544
7545         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
7546         previous patch.
7547
7548         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
7549
7550         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
7551         breaks the amd64 build.
7552
7553         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
7554         register allocation. Fixes #71454.
7555
7556         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
7557
7558         * arrays.cs: Add new regression test.   
7559
7560 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7561
7562         * ssapre.c: Turned usage of snprintf to GString.
7563         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
7564         (I left it on by mistake in my previous commit).
7565
7566 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
7567
7568         * mini.c, cfold.c, basic-calls.cs: preserve side effects
7569         on cond branch optimization (fixes bug# 71515).
7570
7571 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7572
7573         * abcremoval.c: Fixed bug 71062.
7574         * abcremoval.h: Likewise.
7575
7576 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7577
7578         * mini.c: Added a new functionality to optimize_branches, the removal
7579         of useless basic blocks, and fixed some problem in the removal of
7580         critical edges; some utility functions added for both purposes.
7581         * ssapre.c: Added complex expression support, and fixed bug 70637.
7582         * ssapre.h: Likewise.
7583         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
7584         enabled in SSAPRE.
7585         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
7586         * driver.c: Re-enabled SSAPRE.
7587
7588 2005-01-19  Martin Baulig  <martin@ximian.com>
7589
7590         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
7591         the result of mono_get_method_constrained().
7592
7593 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
7594
7595         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
7596         manager.
7597
7598 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
7599
7600         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
7601         be detected.  Fixes #59296.
7602
7603 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7604
7605         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
7606         which can happen. Fixes #71361.
7607
7608 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7609
7610         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
7611         manager.
7612
7613 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7614
7615         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
7616         appdomain-unload.exe to fail.
7617         
7618         * mini.c: Fix some memory leaks.
7619
7620 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
7621
7622         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
7623         Fixed bug and sped up some codepaths.
7624
7625 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7626
7627         * mini.c: Fix some memory leaks.
7628
7629         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
7630         conversion.
7631
7632         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
7633
7634         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
7635         #71320.
7636
7637         * iltests.il: Add regression test for #71320.
7638
7639 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
7640
7641         * mini.c (mono_codegen): Fix installation of profiler hooks.
7642
7643         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
7644
7645 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7646
7647         * mini.h, mini.c, cfold.c: optimize access to enum
7648         readonly fields, too. Eval conditional branches if possible
7649         to perform unreachable code removal in more cases.
7650
7651 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
7652
7653         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
7654
7655         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
7656         code manager.
7657
7658         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
7659         WinXP DEP. Fixes #71244.
7660
7661 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
7662
7663         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
7664
7665 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
7666
7667         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
7668
7669 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
7670
7671         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
7672         changes.
7673
7674         * mini.h: Bump AOT version.
7675
7676         * mini.h (MonoCompile): Change exvar to a hash table.
7677
7678         * mini.c: Allocate a separate exvar for each handler block.
7679
7680         * mini.c: Get rid of the computation of filter_lengths, its not needed.
7681
7682         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
7683         ex var with the pending exception and only throw if the two are equal.
7684         Fixes #68552.
7685         
7686         * exceptions.cs: Add tests for rethrow and nested catch clauses.
7687
7688         * mini-x86.c: Fix warnings.
7689
7690         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
7691         used by all the ports now.
7692
7693         * aot.c: Add write-symbols and save-temps options.
7694
7695 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
7696
7697         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
7698
7699 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
7700
7701         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
7702         operations.
7703
7704         * tramp-s390.c: Check vtable slot belongs to the domain.
7705
7706         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
7707         as per other platforms.
7708
7709         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
7710
7711 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7712
7713         * driver.c: we don't run the Main() code in a subthread anymore.
7714
7715 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
7716
7717         * mini.c: added experimental rtc support in the statistical
7718         profiler: if the user has the permission, more accurate statistics
7719         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
7720         The MONO_RTC value must be restricted to what the linux rtc allows:
7721         power of two from 64 to 8192 Hz.
7722
7723 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
7724
7725         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
7726
7727 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
7728
7729         * mini-ppc.c: better icache flush for smp.
7730
7731 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
7732
7733         * mini-amd64.c (emit_move_return_value): Fix memory leak.
7734
7735         * mini-x86.c (get_call_info): Add the get_call_info () code from the
7736         amd64 port, not yet used.
7737
7738 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
7739
7740         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
7741         a struct type.
7742
7743 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
7744
7745         * driver.c: Added --security option to activate the security manager.
7746         Right now this will allow code generation for declarative demands and
7747         is disabled when AOT is specified.
7748         * mini.c: Add code generation for declarative security demands.
7749         * mini.h: Add mono_use_security_manager as an extern gboolean.
7750
7751 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
7752
7753         * aot.c (mono_compile_assembly): Speed up compilation a bit by
7754         emitting more dense assembly code.
7755
7756         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
7757         exception throwing stuff.
7758
7759 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
7760
7761         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
7762         dead code.
7763
7764         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
7765         left in by mistake.
7766
7767         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
7768         fixed.
7769
7770         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
7771
7772         * tramp-*.c: Only patch vtable slots if the object is in the current
7773         domain. Fixes appdomain-unload.exe.
7774
7775         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
7776         
7777         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
7778         x86 branch.
7779
7780 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7781
7782         * mini.c (reverse_branch_op): New helper function.
7783
7784         * mini.c (optimize_branches): Run the new optimization only on 
7785         platforms which support it. Also reverse all kinds of branches.
7786
7787         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
7788
7789         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
7790         a throw statement.
7791
7792         * mini.c (optimize_branches): Reverse not-equals branches if the false
7793         bblock is a throw. This happens a lot of time with argument checking in
7794         corlib.
7795
7796         * mini.c (mono_codegen): Add support for placing basic blocks after
7797         the function epilogue.
7798
7799         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
7800         function epilogue.
7801         
7802 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
7803
7804         * mini.c (setup_stat_profiler): Only set this up if the platform
7805         supports ITIMER_PROF.
7806
7807 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7808
7809         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
7810         previous patch.
7811
7812         * inssel.brg: Fix a warning.
7813
7814 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
7815
7816         * mini.c: added support for statistical profiler 
7817         (run with: --profile=default:stat).
7818
7819 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
7820
7821         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
7822
7823         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
7824
7825         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
7826         related to global registers from the amd64 port.
7827
7828 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
7829
7830         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
7831
7832         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
7833         with global registers.
7834         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
7835
7836         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
7837
7838 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
7839
7840         * debug-mini.c (encode_value): Fix off-by-one.
7841
7842         * aot.c (encode_value): Likewise.
7843
7844         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
7845
7846 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
7847
7848         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
7849         AOT.
7850
7851         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
7852         
7853         * aot.c (emit_method_info): Increase size of temp buffer.
7854
7855         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
7856         the AOT case.
7857
7858 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
7859
7860         * aot.c (emit_method_info): Fix build.
7861         
7862         * aot.c: Further rework of the AOT file format to reduce the size of
7863         the method info data.
7864
7865         * mini.h: Bump AOT file format version.
7866
7867 2004-12-27  Martin Baulig  <martin@ximian.com>
7868
7869         * mini.c (mini_get_method): New static method; call
7870         mono_get_method_full() and mono_get_inflated_method().
7871         (mono_method_to_ir): Use mini_get_method() instead of
7872         mono_get_method_full(). 
7873
7874 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
7875
7876         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
7877
7878 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
7879
7880         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
7881
7882         * inssel-amd64.brg: Add some optimization rules.
7883
7884 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
7885
7886         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
7887         standard not GC'd stuff is fine.
7888
7889 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
7890
7891         * aot.c: Rework the AOT file format to get rid of most of the global
7892         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
7893
7894         * mini.h: Bump AOT file format version.
7895         
7896 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
7897
7898         * mini.h: Bump AOT file format version.
7899
7900         * aot.c (mono_aot_is_got_entry): New function to determine if an 
7901         address is inside a GOT.
7902
7903         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
7904
7905         * cpu-pentium.md: Increase the maximum size of some instructions which
7906         might involve a got access.
7907         
7908         * mini.c (get_method_from_ip): Another debug helper function.
7909
7910         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
7911         when got var accesses are created during the decompose phase.
7912
7913         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
7914
7915         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
7916         argument mini_compile_method and to MonoCompile, and use this to
7917         determine whenever a given method is compiled for AOT. This allows the
7918         other methods compiled during AOT compilation to be free of AOT stuff,
7919         so the backends does not need to add special support for them by
7920         creating a fake GOT etc.
7921
7922         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
7923         longer needed.
7924
7925 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
7926
7927         * mini.c (mono_method_to_ir): It turns out that some of the
7928         x-appdomain wrappers are lax with types, so just ignore this for
7929         all wrappers.
7930
7931         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
7932         at the vtable->klass. If it is non-shared code we can just use the
7933         vtable.
7934
7935 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
7936
7937         * mini-ppc.c: access MonoDomain from tls, too.
7938
7939 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
7940
7941         * declsec.c: Removed unused variable (and related warning ;-)
7942
7943 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
7944
7945         * iltests.il: New test for LDELEMA on an array of ref types.
7946
7947         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
7948         all ldelema's on reftypes.
7949         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
7950         it was the wrong place to put it.
7951
7952         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
7953         register to pop to make this cleaner, at the request of Paolo.
7954
7955 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
7956
7957         * mini-ops.h (OP_GETHASHCODE): New op.
7958
7959         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
7960
7961         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
7962         operation.
7963
7964         For a microbenchmark, this reduces the cost of Hashtable.get_Item
7965         by 25%.
7966         
7967         * mini-x86.c (mono_arch_output_basic_block): Rather than
7968
7969         add ebp, 4
7970
7971         Emit
7972
7973         pop edx
7974
7975         The first is 3 bytes while the second is 1. This saves 36 kb on
7976         mscorlib, quite a big saving. When bootstraping mcs, I was able to
7977         see a small boost because of icache locality.
7978
7979         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
7980
7981 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
7982
7983         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
7984         started code sharing with the generic code.
7985
7986 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
7987
7988         * mini-ppc.c, cpu-g4.md: added code for direct access to
7989         tls data slots.
7990
7991 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
7992
7993         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
7994          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
7995         to OP_TLS_GET.
7996
7997 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
7998
7999         * declsec.c|h: Added functions to cache the declarative stack modifiers
8000         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8001         structure.
8002         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8003         created. Register internal calls for System.Security.SecurityFrame::
8004         _GetSecurityFrame and _GetSecurityStack.
8005         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8006         the definitions for the new stack walk/callback mechanism.
8007         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8008         first security frame for LinkDemands and InheritanceDemands) and
8009         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8010         from lupus.
8011         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8012         walk initialization (lupus).
8013
8014 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8015
8016         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8017         idiom.
8018         (handle_loaded_temps): Do not create a temporary variable for
8019         things that we know are temps. They will never be modified.
8020         (mono_spill_call): Set MONO_INST_IS_TEMP
8021         (mono_emulate_opcode): ditto
8022         (emit_tree): ditto
8023         (mono_method_to_ir.CEE_DUP): ditto
8024
8025 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8026
8027         * mini.c (type_to_eval_stack_type): Make this handle the void type
8028         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8029         (emit_tree): use ip_in_bb to special case some common idioms
8030         Update all callers to pass in the IP.
8031         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8032
8033         This gives us a nice 2% speedup in mcs bootstrap.
8034
8035         * mini-x86.c (peephole_pass): Peephole pass to make
8036         mov  [foo], eax
8037         push [foo]
8038
8039         into
8040
8041         mov [foo], eax
8042         push eax
8043
8044         * mini.c (ip_in_bb): new method.
8045         (mono_method_to_ir): use this method rather than doing the hash
8046         lookup ourselves.
8047
8048         * linear-scan.c (mono_linear_scan): When expiring actives, you
8049         don't need to keep around variables that expire on this
8050         instruction. This makes it so that:
8051              a = b + 1
8052         will turn into:
8053              store (ebx add (ebx, 1))
8054         which will become
8055              add ebx, 1
8056
8057 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8058
8059         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8060         combination to avoid doing two copies. Fix up problems with previous
8061         patch.
8062
8063         * mini.c: Fix 64 bit warnings.
8064
8065         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8066
8067 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8068
8069         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8070         changes from the x86 code.
8071
8072         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8073
8074 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8075
8076         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8077         throwing code to reduce its size, unify the AOT and non-aot code and 
8078         get rid of relocations in the AOT case.
8079
8080         * mini-x86.h mini.c exceptions-x86.c 
8081         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8082         raise corlib exceptions which doesn't require relocations in the 
8083         caller.
8084
8085         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8086
8087 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8088
8089         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8090         needed.
8091
8092         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8093         in the AOT case.
8094
8095 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8096
8097         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8098         with add function when used from Inc/dec atomic 
8099         functions. Re-enabled optimization on x86.
8100         * mini-ops.h: renamed atomic_add functions to
8101         allow _add to match the Interlocked::Add and
8102         _add_next to match Interlocked::Inc/Dec.
8103
8104 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8105
8106         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8107         linking of BBs to the end BB, and enabled SSAPRE also with
8108         consprop and copyprop (which was prevented by that bug).
8109
8110 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8111
8112         * mini-x86.c: disabling the Interlocked optimizing code. 
8113
8114 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8115
8116         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8117         file version check.
8118         
8119 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8120
8121         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8122         interlocked optimization due lack of support on x86, rewrote 
8123         exchange to take into account that base may be in eax.
8124         
8125         xsp works again; activated Interlocked optimizing code.
8126         
8127 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8128
8129         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8130
8131 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8132
8133         * mini-ops.h: Add new opcodes.
8134
8135         * mini.h: Add new patch types. Add got_var to MonoCompile.
8136
8137         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
8138         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
8139         make it work with all kinds of patchable code.
8140
8141         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
8142         address of the GOT, and referencing entries in the GOT.
8143
8144         * mini.c: Add code to load the GOT address if needed by an opcode.
8145
8146         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
8147         independent AOT code on the x86 using an elf-style Global Offset Table.
8148
8149 2004-12-14  Raja R Harinath  <rharinath@novell.com>
8150
8151         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
8152
8153 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8154
8155         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
8156         when running xsp.
8157
8158 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
8159
8160         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
8161         of Interlocked:Increment/Decrement/Add as inline ops.
8162         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
8163
8164 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
8165
8166         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
8167         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
8168
8169 2004-12-12  Duncan Mak  <duncan@ximian.com>
8170
8171         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
8172         again. `patch_info->table_size' is no longer valid after Zoltan's
8173         commit #37636.
8174
8175 2004-12-12  Martin Baulig  <martin@ximian.com>
8176
8177         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
8178         if we are the "real" method, ie. not an inlined method inside it.
8179
8180 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
8181
8182         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
8183         before we look in the special fields table. This fixes
8184         ../tests/thread-static-init.cs.
8185
8186 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8187
8188         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
8189         for Array get_Rank and get_Length. Fixes bug #70465.
8190
8191 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
8194         separate structure to reduce the size of MonoJumpInfo.
8195
8196 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
8197
8198         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
8199
8200 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
8201
8202         * mini.c (mini_get_inst_for_method): Changed to allow ports
8203         to return a MonoInst instead of opcode 
8204         (renamed mini_get_opcode_for_method to better reflect the new functionality)
8205         
8206         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
8207         Allow ports to return a created MonoInst instead of op-code, will enable
8208         new optimizations.
8209         (renamed mini_get_opcode_for_method to better reflected the functionality)
8210
8211 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
8212
8213         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
8214
8215 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8216
8217         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
8218         Fixes #69985.
8219
8220 2004-12-08  Martin Baulig  <martin@ximian.com>
8221
8222         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
8223         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
8224
8225 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
8228         correctly.
8229
8230         * exceptions.cs: Disable some tests which depend on properties of x86 fp
8231         arithmetic.
8232
8233 2004-12-08  Raja R Harinath  <rharinath@novell.com>
8234
8235         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
8236
8237 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
8238
8239         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
8240         bug introduced by the previous patch.
8241
8242 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
8243
8244         * mini-ppc.c, objectc.cs: handle large structs passed by value
8245         (fixes bug #69972).
8246
8247 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8248
8249         * mini-ppc.c: OP_ARGLIST implementation from
8250         Geoff Norton  <gnorton@customerdna.com>.
8251
8252 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
8253
8254         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
8255         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
8256
8257 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
8258
8259         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
8260
8261 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8262
8263         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
8264         support.
8265
8266 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
8267
8268         * mini-sparc.c: Zero out localled-ed memory.
8269
8270         * iltests.il: Add tests for zeroing out localloc-ed memory.
8271
8272 2004-12-04  Martin Baulig  <martin@ximian.com>
8273
8274         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
8275         mono_method_get_signature_full().       
8276
8277 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
8278
8279         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
8280         and some utility functions (always for SSAPRE), integrated SSAPRE.
8281         * mini.h: Likewise.
8282         * driver.c: Added ssapre option.
8283         * ssa.c: Small fix on OP_ARG handling.
8284         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
8285         * Makefile.am: Likewise.
8286
8287 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8288
8289         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
8290         now in the xp code.
8291
8292         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
8293         icall.
8294
8295 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8296
8297         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
8298         
8299         * cpu-s390.md : Increase instruction length of oparglist.
8300
8301         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
8302
8303 2004-11-30  Martin Baulig  <martin@ximian.com>
8304
8305         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
8306         virtual generic methods.  We call a special helper_compile_generic_method()
8307         icall to retrieve the method from the vtable, inflate and compile
8308         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
8309
8310         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
8311
8312 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
8313
8314         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
8315
8316 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
8319         Fixes #69929.
8320
8321 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
8322
8323         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
8324         platforms with PIC aot.
8325
8326 2004-11-28  Martin Baulig  <martin@ximian.com>
8327
8328         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
8329         Fixes gen-112.cs.
8330
8331 2004-11-28  Martin Baulig  <martin@ximian.com>
8332
8333         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
8334         the result of mono_type_get_underlying_type() to check whether
8335         we're byref.
8336
8337 2004-11-26  Martin Baulig  <martin@ximian.com>
8338
8339         * mini.c
8340         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
8341         in the g_assert().
8342
8343 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
8344
8345         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
8346         the same way as the other arguments so they won't get clobbered.
8347
8348         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
8349         calls through R11 since it is clobbered by the trampoline code.
8350
8351 2004-11-26  Raja R Harinath  <rharinath@novell.com>
8352
8353         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
8354         pick up in-tree mscorlib.dll.
8355
8356 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
8357
8358         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
8359
8360         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
8361         runtime data/code are now stored in a table similar to the GOT in ELF. 
8362         This allows the code itself to be position independent.
8363
8364         * aot.c: Fix loading of referenced assemblies after the lazy assembly
8365         loading changes.
8366
8367         * aot.c: Attach ELF type (object/function) directives to all global
8368         symbols.
8369
8370         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
8371
8372         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
8373
8374         * mini-amd64.h: Turn on PIC AOT code.
8375
8376         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
8377         returning the offset within an OP_AOTCONST instruction where the GOT
8378         offset needs to be added.
8379
8380         * mini.h: Bump AOT file format version.
8381
8382 2004-11-25  Martin Baulig  <martin@ximian.com>
8383
8384         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
8385         uninflated generic methods.
8386
8387 2004-11-25  Martin Baulig  <martin@ximian.com>
8388
8389         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
8390
8391 2004-11-24  Martin Baulig  <martin@ximian.com>
8392
8393         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
8394         original klass (this only applies for generic instances).
8395
8396 2004-11-24  Martin Baulig  <martin@ximian.com>
8397
8398         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
8399         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
8400         that array).
8401
8402 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
8403
8404         * mini.c (mono_method_to_ir): Disable inlining for methods containing
8405         localloc. Fixes #69678.
8406
8407         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
8408         
8409 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
8410
8411         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
8412         used SSE registers on pinvoke calls. Fixes #69774.
8413
8414 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
8415
8416         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
8417         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
8418
8419 2004-11-23  Raja R Harinath  <rharinath@novell.com>
8420
8421         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
8422         Refer directly to the mcs/ tree.
8423
8424 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8425
8426         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
8427         Check if a trampoline for a synchronized method is required. 
8428
8429 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
8430
8431         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
8432         with localloc if needed. Throe arithmetric exception in
8433         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
8434         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
8435
8436 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
8437
8438         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
8439         types before switching on type.  Fixes #69622.
8440
8441 2004-11-19  Raja R Harinath  <rharinath@novell.com>
8442
8443         * Makefile.am (check-local): New.  Integrate into 'make check'.
8444         (MCS,RUNTIME): Define using in-tree mono and mcs.
8445         (ILASM): New.
8446         (%.exe): Use $(ILASM).
8447
8448 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
8449
8450         * mini-ppc.c: adjust initial prolog size (bug #69691).
8451
8452 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
8453
8454         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
8455         #69664.
8456
8457 2004-11-17  Raja R Harinath  <rharinath@novell.com>
8458
8459         * Makefile.am (clean-local): Rename from 'clean'.
8460
8461 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8462
8463         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
8464         to mono_arch_is_int_overflow. 
8465         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
8466         SIGFPE events.
8467
8468 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
8469
8470         * declsec.c|h: New files to support declarative security attributes.
8471         Added function to check if a method has (applicable) security.
8472         * mini.c|h: Add check for declarative security attributes in
8473         mono_method_check_inlining.
8474         * Makefile.am: Added declsec.c and declsec.h to the build.
8475
8476 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8477
8478         * mini.c, mini.h: update to keep dynamic code info per-domain.
8479
8480 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
8481
8482         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
8483         (mini_init): Get rid of it from here too.
8484
8485 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8486
8487         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
8488         implemented OP_RETHROW (patch by Geoff Norton
8489         <gnorton@customerdna.com>).
8490
8491 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
8492
8493         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
8494         between appdomains.  Fixes appdomain-unload on PPC.
8495
8496 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
8497
8498         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8499         mini-exceptions.c: handle the new wrapper types.
8500         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
8501         token value as a MonoClass* when compiling a wrapper.
8502         mono_jit_create_remoting_trampoline now takes an additional
8503         MonoRemotingTarget parameter.
8504         
8505 2004-11-10  Martin Baulig  <martin@localhost>
8506
8507         * mini.c (mono_method_to_ir): Use `generic_container->context'
8508         rather than creating a new one.
8509
8510 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8511
8512         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
8513
8514         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
8515
8516 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
8517
8518         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
8519         the experimental aot cache stuff.
8520
8521 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
8522
8523         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8524         mini-exceptions.c: update to exception clause structure changes.
8525
8526 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8527
8528         * exceptions-x86.c (throw_exception): Fix warnings.
8529
8530         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
8531         for OP_RETHROW.
8532
8533 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8534
8535         * exceptions-sparc.c (get_throw_exception): Really fix this.
8536
8537 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
8538
8539         * tramp-*.c: we no longer support icalls without wrappers, so
8540         a bit of code can be removed here
8541
8542 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
8543
8544         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
8545         patch.
8546
8547         * cpu-sparc.md: Add op_rethrow.
8548
8549         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
8550
8551         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
8552
8553         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
8554         * mini-ops.h: Add OP_RETHROW.
8555
8556         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
8557
8558         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
8559
8560 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
8561         
8562         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
8563         Makes the output much easier to read
8564
8565 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
8566
8567         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
8568         prevents another huge leak when compiling with ssa. Secondly, the
8569         performance of doing this rather than freeing the lists is much
8570         better. GList does a lock every time you allocate a list link,
8571         so that it can use a memory pool. So, it is better to just use
8572         a memory pool of our own.
8573         
8574         * ssa.c, linear-scan.c: replace g_list_remove_link with
8575         g_list_delete.  The remove one does not free the GList, so we were
8576         leaking memory. On -O=all --compile-all with corlib, this cut down
8577         3 MB of allocations.
8578
8579 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
8580
8581         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
8582
8583         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
8584
8585         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
8586         into a new function mono_create_jit_trampoline ().
8587
8588 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
8589
8590         * trace.c (get_spec): Allow tracing of classes without a namespace.
8591
8592 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
8593
8594         * mini.c: Fix pointer overwrite in mini_method_compile.
8595
8596 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
8597
8598         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
8599         The darwin ABI needs some special handling for 1 and 2 byte structs
8600         Lets use lbz/lhz instead of lwz everywhere.
8601         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
8602         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
8603         Use stb/sth for the former, and put the latter always on stack instead of in
8604         argument registers.
8605
8606 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
8607
8608         * trace.c (is_filenamechar): Add '_'.
8609
8610 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
8611
8612         * mini-s390.c: Fix prolog length to allow for large trace requirements.
8613
8614         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
8615
8616 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
8617
8618         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
8619         depends on libmonogc. Fixes #68805.
8620
8621 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
8622
8623         * mini.c (mono_jit_free_method): Provide extra information for
8624         this error.  Currently this leaks, but will be turned into a
8625         developer option in the future.
8626
8627 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
8628
8629         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
8630
8631 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
8632
8633         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
8634         boundary. Fixes reading of PATCH_INFO_R4 and R8.
8635         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
8636
8637 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
8638
8639         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
8640         trampolines for AOT code.
8641
8642 2004-10-22    <vargaz@freemail.hu>
8643
8644         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
8645         constructed types. Fixes #68136.
8646
8647 2004-10-21  Martin Baulig  <martin@ximian.com>
8648
8649         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
8650         if it returns true, unwind the stack to the call instruction.
8651
8652 2004-10-21    <vargaz@freemail.hu>
8653
8654         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
8655
8656         * mini.h: Bump AOT version number.
8657
8658         * objects.cs: Add another test for unbox trampolines.
8659
8660         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
8661         valuetype methods.
8662
8663 2004-10-20    <vargaz@freemail.hu>
8664
8665         * driver.c: Add SHARED to the set of optimizations tested.
8666
8667         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
8668
8669         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
8670         used by CEE_NEWARR.
8671
8672         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
8673
8674 2004-10-20  Martin Baulig  <martin@ximian.com>
8675
8676         * mini-exceptions.c (mono_handle_exception): Call
8677         mono_debugger_handle_exception() to tell the debugger about
8678         catch/finally clauses.
8679
8680 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
8681
8682         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
8683
8684         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
8685         #68447.
8686
8687 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
8688
8689         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
8690         methods as their native size, fixed bug #57543, #57545.
8691         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
8692         This saves a temporary register and mullw call down into 1 (minor perf
8693         increase for cases like sum = sum * 5;  This use to translate into:
8694             li r11,5
8695             mullw r28,r28,r11
8696         It now translates to
8697             mulli r28,r28,5
8698
8699 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
8700
8701         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
8702         #68388.
8703
8704 2004-10-11  Martin Baulig  <martin@ximian.com>
8705
8706         * mini.c (mono_method_to_ir): If we're a generic method, get the
8707         MonoGenericContainer from our MonoMethodNormal and create a
8708         MonoGenericContext from it.
8709
8710 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
8711
8712         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
8713
8714         * basic-long.cs: Add test for checked i8->i2 cast.
8715
8716 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8717
8718         * inssel-ppc.brg: added a couple of speedup rules.
8719
8720 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
8721
8722         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
8723         to speed up rebuilds.
8724
8725 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8726
8727         * mini-s390.c: Minor fix to OP_OR_IMM.
8728
8729 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
8730
8731         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
8732         better. Fixes appdomain-unload.exe on sparc.
8733
8734 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
8735
8736         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
8737         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
8738         see bug 67324.
8739
8740 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
8741
8742         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
8743
8744 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
8745
8746         * mini.c: Always generate a field read/write wrapper for members
8747         of the class MarshalByRefObject since the actual instance could
8748         be a CBO.
8749
8750 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8751
8752         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
8753
8754 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8755
8756         * driver.c mini.h trace.c: Move the setting of the main assembly into
8757         a separate function called mono_trace_set_assembly () and call it after
8758         actually loading the main assembly. Fixes #66872.
8759
8760 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
8761
8762         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
8763         using the code manager.
8764
8765 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
8766
8767         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
8768
8769 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8770
8771         * cpu-amd64.md: Fix bug in previous patch.
8772         
8773         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
8774         #66650.
8775
8776 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
8777
8778         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8779         mini-exceptions.c: updates for changed stack walk interface.
8780
8781 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8782
8783         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
8784
8785 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
8786
8787         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
8788
8789 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
8790
8791         * driver.c (mini_regression_list): Do not call mono_assembly_close 
8792         since assemblies can't be unloaded.
8793         
8794 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8795
8796         * cpu-amd64.md: Fix more instruction lengths.
8797
8798         * cpu-amd64.md: Fix lengths of some instructions.
8799
8800 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
8801
8802         * inssel.brg: Make the array ldelema check aot friendly.
8803
8804 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8805
8806         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
8807
8808         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
8809
8810 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
8811
8812         * mini-x86.c: Fix build.
8813
8814         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
8815         mono_type_get_underlying_type () helper function to simplify code.
8816         
8817 2004-09-09  Martin Baulig  <martin@ximian.com>
8818
8819         * mini-amd64.c: Don't access `type->data.klass' directly, call
8820         mono_class_from_mono_type() instead since the type may be a
8821         generic instance.
8822
8823 2004-09-09  Martin Baulig  <martin@ximian.com>
8824
8825         * mini-amd64.c (get_call_info): Fix support for generic instances.
8826         (add_valuetype): Use mono_class_from_mono_type() to get the class
8827         since we can be a generic instance.
8828
8829 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
8830
8831         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
8832
8833 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
8834
8835         * liveness.c: reset spill costs on each scan: bug 62107
8836
8837 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
8838
8839         * exceptions-sparc.c (mono_arch_find_jit_info): remove
8840         unnecessary line that doesn't compile
8841
8842 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8843
8844         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
8845         trampolines, make them call an error function so people can fix their
8846         code.
8847
8848 2004-09-06  Martin Baulig  <martin@ximian.com>
8849
8850         * mini.c (mono_method_to_ir): When initializing locals, handle a
8851         generic instances like a valuetype if it's a valuetype and like a
8852         class if it's a class.
8853
8854 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8855
8856         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
8857         stack. Fixes #64674.
8858
8859         * exceptions.cs: Add test for unwinding of call arguments.
8860
8861 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
8862
8863         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
8864         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
8865         set the carry/borrow flag). The sparc and s390 implementations
8866         can now use optimized versions (and simplify the code). ppc bugfixes.
8867
8868 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8869
8870         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
8871
8872 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
8873
8874         * inssel-amd64.brg: Remove leftover 32 bit rule.
8875
8876         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
8877
8878 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
8879
8880         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
8881         mono_arch_find_jit_info functions into a new function. Fix a memory
8882         leak.
8883
8884         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
8885         refactored code.
8886         
8887 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8888
8889         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
8890         as well.
8891         
8892         * exceptions.cs: Add array size tests.
8893
8894         * mini.c: Allocate a separate icall wrapper for each arity of 
8895         mono_array_new_va. Fixes #59509.
8896
8897         * exceptions.cs: Add testcase for 64578.
8898
8899         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
8900
8901         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
8902         
8903 2004-09-02  Martin Baulig  <martin@ximian.com>
8904
8905         * mini.c (mono_method_to_ir): When initializing the locals, call
8906         handle_initobj() on the generic instance itself, not its
8907         underlying type.
8908
8909 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8910
8911         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
8912         MonoJitInfo for dynamic methods.
8913
8914         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
8915
8916         * mini.c: Add support for freeing JIT data for dynamic methods.
8917         
8918 2004-09-01  Martin Baulig  <martin@ximian.com>
8919
8920         * mini-x86.c (is_regsize_var): Added support for generic
8921         instances.
8922         (mono_arch_emit_prolog): Make this compile again, use
8923         `x86_push_imm_template (code)'.
8924
8925 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
8926
8927         * mini-x86.c: make all push_imm instructions that get
8928         patched always emit the long form
8929
8930 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8931
8932         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
8933         in a per-domain hash.
8934
8935         * mini-amd64.c (merge_argument_class_from_type): Handle generic
8936         types.
8937
8938 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8939
8940         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
8941         work.
8942         
8943         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
8944         work.
8945
8946         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
8947         Beginnings of SSE2 support.
8948
8949         * exceptions.cs: Add more tests for checked int<->uint casts.
8950
8951 2004-08-28  Martin Baulig  <martin@ximian.com>
8952
8953         * mini-x86.c (mono_arch_instrument_epilog): Added support for
8954         generic instances.
8955
8956         * mini.c
8957         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
8958         Handle generic instances recursively.
8959
8960 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8961
8962         * iltests.il: test for conv.u8 on a constant
8963
8964 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8965
8966         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
8967         LCONV_x4 (shrun_32 (membase)).
8968
8969 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8970
8971         * inssel-x86.brg: c&p rules for push/setret of long
8972
8973 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
8974
8975         * inssel-x86.brg: c&p rules for compare (base, regvar) and
8976         compare (regvar, base)
8977
8978         * inssel-x86.brg: more burg love
8979
8980         * inssel.brg: more cleanup
8981
8982         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
8983
8984 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
8985
8986         * basic-long.cs, basic-calls.cs: new tests for optimization.
8987
8988 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8989
8990         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
8991         patch.
8992
8993 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8994
8995         * mini-amd64.c (read_tls_offset_from_method): Add another case.
8996         
8997 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
8998
8999         * inssel.brg (mini_emit_memcpy): use 
9000         NO_UNALIGNED_ACCESS to disable memcpy optimization
9001
9002 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9003
9004         * mini-amd64.c: Handle generic types in various places.
9005
9006         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9007
9008 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9009
9010         * mini.c (handle_box): Fix warning.
9011
9012         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9013
9014         * mini-amd64.h: Enable the emit_state optimization.
9015
9016         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9017
9018         * mini-amd64.c: Add some new 64 bit peephole opts.
9019
9020         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9021
9022         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9023
9024         * mini-amd64.c: Register allocator fixes.
9025
9026         * mini.c: Add an optimization to emit_state to avoid allocation of new
9027         registers on some platforms.
9028
9029 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9030
9031         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9032
9033         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9034         allocation. Fixes #63085.
9035
9036         * basic-long.cs: Add new regression test.
9037
9038         * mini-amd64.c: Register allocator improvements.
9039
9040 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9041
9042         * mini-amd64.c (read_tls_offset_from_method): Add another code
9043         sequence.
9044
9045         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9046         instruction sequence for nullifying class init trampolines.
9047
9048         * objects.cs: Add new regalloc test.
9049
9050         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9051
9052 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9053
9054         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9055         
9056         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9057         arguments.
9058
9059         * driver.c: Fix profiling after TLS changes.
9060         
9061         * driver.c (mono_main): Set mono_stats.enabled if needed.
9062
9063         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9064         CEE_BOX.
9065
9066 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9067
9068         * mini-x86.c: use a 1 op rather than a 2 op tls access
9069         instruction -> faster.
9070
9071 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9072
9073         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9074         x86 backend.
9075
9076 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9077
9078         * exceptions-sparc.c (throw_exception): fix typo
9079
9080 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9081
9082         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9083         set tree->dreg correctly with tls. Allow any
9084         register to be used.
9085
9086         * mini-x86.c (read_tls_offset_from_method): add new code
9087         generation pattern seen with GCC.
9088
9089
9090 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9091
9092         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9093         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9094         exceptions-sparc.c: fix some performance issues in exception
9095         handling and setting of the stack trace for exceptions that were
9096         already thrown.
9097
9098 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9099
9100         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9101         x86 backend.
9102         
9103         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9104         registers.
9105
9106 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9107
9108         This patch inlines tls access, when possible.
9109         
9110         * mini.h: new arch functions for TLS intrinsics.
9111         All platforms updated with a stub.
9112
9113         * mini.c: use the new intrinsics
9114
9115         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9116         arch specific intrinsic for tls variables
9117
9118 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9119
9120         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9121         under windows.
9122
9123 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9124
9125         * mini.c: thread local allocation
9126
9127 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9130
9131         * Makefile.am: Link against the static version of libmonogc.
9132         
9133         * Makefile.am: Link the static versions of the convenience libraries
9134         into the mono executable.
9135
9136         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
9137
9138 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
9139
9140         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
9141         on integer overflow.
9142
9143         * mini-amd64.c: Reorganize function call code.
9144
9145         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
9146
9147 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9148
9149         * inssel-x86.brg: use xor eax,eax.
9150         
9151         * basic.cs: new tests
9152
9153 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9154
9155         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
9156         in exception throwing code.
9157         
9158 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9159
9160         * inssel-x86.brg: use xor esi,esi.
9161
9162 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9163
9164         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
9165         can trace methods compiled during mini_init () too.
9166
9167         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
9168         CEE_CONV_U4.
9169
9170 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9171
9172         * Makefile.am: static link on x86 (r=zoltan)
9173
9174 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9175
9176         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
9177         code since it causes some programs to fail.
9178
9179 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
9180
9181         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
9182
9183 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
9184
9185         * mini.c: ovfops_op_map - add STACK_OBJ case for
9186         CONV_I 
9187         * basic.cs: add test_0_pin_string as test
9188         case for above.
9189
9190 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
9191
9192         * Makefile.am: build C# if srcdir != builddir
9193
9194 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9195
9196         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
9197         fall-through blocks.
9198
9199 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9200
9201         * driver.c: enable loop by default again and include abcrem in -O=all.
9202
9203 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
9204
9205         * iltests.il: Add some localloc tests.
9206
9207         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
9208
9209         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
9210         Fixes #62574.
9211
9212         * inssel-amd64.brg: Add some optimizations.
9213
9214         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
9215         for gcc-3.4.
9216
9217         * Makefile.am: Statically link mono against libmono on AMD64.
9218         
9219         * mini-amd64.c inssel-amd64.brg: Optimizations.
9220
9221 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
9222
9223         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
9224
9225         * tramp-amd64.c: Patch calling code in trampolines.
9226
9227 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
9228
9229         * mini-amd64.c: pinvoke struct passing fixes.
9230
9231 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
9232
9233         * mini-sparc.c: redo change, make mono_arch_cpu_init call
9234         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
9235
9236 2004-08-05  Duncan Mak  <duncan@ximian.com>
9237
9238         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
9239         CEE_LDELEM_ANY.
9240
9241 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9242
9243         * mini-amd64.c (emit_move_return_value): Move return value for normal
9244         calls too.
9245
9246 2004-08-05  Martin Baulig  <martin@ximian.com>
9247
9248         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
9249         `type->type'; just modify `type' itself when dealing with enums
9250         and generic instances.
9251         (check_call_signature): Make `simple_type' a `MonoType *'.
9252
9253 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9254
9255         * mini.c: Use OP_PADD to add offsets to addresses.
9256
9257         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
9258
9259 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
9260
9261         * mini-sparc.c (mono_arch_emit_epilog): fix check
9262         for folding last op into restore instruction
9263
9264 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9265
9266         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
9267         helper methods using the code manager.
9268         
9269         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
9270
9271         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
9272
9273 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9274         
9275         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
9276           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
9277
9278         * mini-s390.c: fix tail processing
9279
9280 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
9281
9282         * mini-ppc.c: mul.ovf.un exception name fix.
9283
9284 2004-08-03  Martin Baulig  <martin@ximian.com>
9285
9286         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
9287         instances; before jumping to `handle_enum', also modify `ptype'.
9288
9289 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
9290
9291         * cpu-sparc.md: fcall maximal length too small.
9292
9293 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
9294
9295         * mini-amd64.c mini.h: Add initial support for passing/returning 
9296         structures to/from pinvoked methods.
9297
9298 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
9299
9300         * mini-ppc.c: reg allocator fix.
9301
9302 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
9305
9306         * inssel.brg: Optimize memset on 64 bit machines.
9307
9308         * mini-amd64.c: Fix some vararg cases.
9309
9310 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9311
9312         * mini-s390.c: Corrected macro in emit_float_to_int
9313
9314         * s390-abi.cs: Tests to exercise the s390 ABI
9315
9316 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9317
9318         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
9319         caller saved regs.
9320
9321         * basic.cs: Add a test for add.ovf.un.
9322
9323 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
9324
9325         * mini-sparc.c: add case for OP_IDIV_UN
9326
9327 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9328
9329         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
9330         
9331         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
9332
9333 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
9334
9335         * basic.cs: regression tests.
9336
9337         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
9338         regressions.
9339
9340 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * basic.cs: Add a new test.
9343
9344         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
9345         and AOT. Various fixes and optimizations.
9346
9347         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
9348
9349 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9350
9351         * mini-ppc.c: make sure temp regs are not used for global reg
9352         allocation.
9353
9354 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
9355
9356         * cpu-sparc.md: conv_i8 fix for 64bits
9357
9358         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
9359
9360 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
9361         
9362         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
9363         add opcode for cmp BYTE PTR [eax], imm.
9364
9365         * inssel.brg: Make memcpy and memset takes bases.
9366
9367 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
9368
9369         * *-amd64.*: More AMD64 work.
9370         
9371 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
9372
9373         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
9374         add a compare-not-equal opcode.
9375         
9376 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
9377
9378         * mini.c: Use mono_init_from_assembly instead of mono_init.
9379         
9380 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
9383
9384         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
9385
9386         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
9387
9388         * inssel.brg: 64 bit fixes.
9389
9390         * mini.h (MonoCallInst): Add some AMD64 specific data.
9391
9392         * mini.h: Add some OP_P opcodes.
9393
9394 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
9395
9396         * basic.cs: tests for 61797 and 61740
9397
9398 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9399
9400         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
9401         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
9402
9403 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
9404
9405         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
9406
9407         * *-amd64*.*: Ongoing AMD64 work.
9408
9409 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
9410
9411         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
9412
9413         * *-amd64*: Ongoing AMD64 work.
9414
9415         * mini-arch.h: Add AMD64 support.
9416
9417         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
9418
9419         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
9420
9421         * mini-ops.h: Add new opcodes.
9422
9423         * Makefile.am: Add AMD64 support.
9424
9425         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
9426         rules into the inssel-long*.brg files.
9427
9428         * *-amd64.*: Add beginnings of AMD64 backend.
9429
9430 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
9431
9432         * mini.c (print_dfn): commenting out the code that prints
9433         the cil. With -O=deadce, this makes -v -v crash.
9434         
9435         * cpu-pentium.md: make checkthis have a length of 2
9436
9437 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
9438
9439         * mini-sparc.h: fix implementations of __builtin
9440         functions for Sun compiler for V9.
9441
9442 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
9443
9444         * mini.c: use the new stelem.ref wrapper
9445         * exceptions.cs, arrays.cs: new stelem.ref tests
9446
9447 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9448
9449         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
9450         new XSP should work with these changes).
9451
9452 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
9453         
9454         * inssel-{long32,x86,}.brg: trivial optimizations.
9455         
9456 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9457
9458         * mini.c: load value when emitting box operation in
9459         constrained calls.
9460
9461 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
9462
9463         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
9464         is one byte shorter than cmp DWORD PTR [eax], 0.
9465
9466 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
9467
9468         * inssel-ppc.brg: arguments on the stack are always
9469         relative to the stack pointer (spotted by Neale Ferguson).
9470
9471 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9472
9473         * exceptions-x86.c: delay appending the method name to the trace until
9474         after mono_jit_info_table_find is called, as this gets the real
9475         MonoMethod.
9476
9477 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
9478
9479         * aot.c: register roots
9480
9481 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9482
9483         * aot.c : I could just use PLATFORM_WIN32 flag.
9484
9485 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9486
9487         * aot.c : Reverting the previous fix. This time it broke linux build.
9488
9489 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9490
9491         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
9492
9493 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
9494
9495         * mini.c (handle_stack_args): Remove some more debugging code.
9496         
9497         * mini.c (handle_stack_args): Remove debug output left in by mistake.
9498
9499         * driver.c mini.h aot.c: Allow additional options to be specified with
9500         --aot and pass them to mono_compile_assembly.
9501
9502         * aot.c: Add experimental code to AOT compile all loaded assemblies
9503         on demand and save the code into a cache in the filesystem.
9504
9505         * aot.c: Add support for more wrapper methods.
9506         
9507         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
9508         58863.
9509
9510         * cpu-*.md: Remove removed opcodes.
9511
9512         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
9513         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
9514         related icalls to marshal.c.
9515
9516 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
9517
9518         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
9519
9520         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
9521
9522         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
9523
9524 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
9525         * liveness.c: If liveness is recomputated we need to reset the information
9526         for each variable. This way, if the liveness range has been narrowed
9527         by optimizations that happened after the last computation, we can return
9528         a smaller range.
9529         
9530         For example, if you have
9531         
9532         {
9533                 int i = 0;
9534                 
9535                 // Tons of code that does not affect i
9536                 
9537                 i = foo ();
9538                 ...
9539         }
9540         
9541         i = 0 is dead code and will be removed by SSA. However, when
9542         linear scan gets to the code, i will still appear to be live
9543         throughout the entire block. This prevents good register allocation.
9544
9545 2004-07-06  Martin Baulig  <martin@ximian.com>
9546
9547         * debug-mini.c (mono_debug_init_method): Allow
9548         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
9549         (mono_debug_add_icall_wrapper): New method.
9550
9551         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
9552
9553 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
9554
9555         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
9556         optimization.
9557
9558 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
9559
9560         * aot.c (mono_aot_load_method): Fix loading of debug info.
9561
9562 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9563
9564         * aot.c: Add logging support.
9565
9566 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
9567
9568         * mini.h: Add prototype for mono_print_method_from_ip.
9569
9570         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
9571
9572         * inssel.brg: 64 bit fixes.
9573
9574         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
9575         inssel-long32.brg.
9576
9577         * Makefile.am: Add SPARC64 support.
9578
9579 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9580
9581         * aot.c: Fix alignment problems on 32 bit platforms.
9582
9583 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
9584
9585         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
9586         SPARC64.
9587
9588         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
9589         problems.
9590
9591         * mini.h: Bump AOT file version. Some 64 bit fixes.
9592
9593 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * inssel-sparc.brg: Add new rule to avoid register moves.
9596
9597         * inssel.brg: Add ldind_to_load_membase helper function.
9598
9599 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
9600
9601         * mini.c: OffsetToStringData intrinsic.
9602         
9603 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9604
9605         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
9606
9607         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
9608         regression tests.
9609
9610         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
9611 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
9612
9613         * mini.c: reinstated mono_compile_get_interface_var()
9614         on x86, too, since the change breaks the Gtk# build there as well.
9615
9616 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9617
9618         * driver.c: remove loop from the default optimizations: it seems to
9619         interact badly with some of the other options (see bug #60613).
9620
9621 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
9622
9623         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
9624         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
9625
9626 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
9627
9628         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
9629         vararg-using methods.
9630
9631 2004-06-21  Martin Baulig  <martin@ximian.com>
9632
9633         * mini/mini-exceptions.c
9634         (mono_handle_exception): Added `gpointer original_ip' argument.
9635         After calling mono_unhandled_exception(), call
9636         mono_debugger_unhandled_exception() and if that returns true,
9637         restore the context and return.
9638
9639 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9640
9641         * mini-ppc.c: prefer the use of relative branches so
9642         they won't need to be patched in aot code (patch from Patrick Beard).
9643
9644 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
9645
9646         * aot.c: patch from Patrick Beard to make the output assembly
9647         more correct for the MacOSX assembler. Small tweak to
9648         generate sane images on Linux/PPC, too.
9649
9650 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9651
9652         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
9653         case until bug #59509 is fixed (shows up in #60332).
9654
9655 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9656
9657         * mini.c: make sure the needed wrappers are compiled, too, with
9658         precomp.
9659
9660 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
9661
9662         * driver.c: remove NPTL reference in --version output.
9663
9664 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9665
9666         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
9667         generate valid assembly for the Mach-O assembler.
9668
9669 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
9670
9671         * driver.c: don't include abcrem in the all optimization specifier
9672         since it slows down jit compilation too much for now.
9673
9674 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
9675
9676         * mini.c: use BIGMUL only if both operands have the same signage.
9677         * iltests.il: Test for bug 60056. (errors related to signage in
9678         BIGMUL).
9679
9680         r=lupus.
9681
9682 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
9683
9684         * mini.c, aot.c: memory leak fixes.
9685
9686 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9687
9688         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
9689
9690 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
9691
9692         * Makefile.am: remove the -static hack completely, it links in
9693         statically glib as well.
9694
9695 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
9696
9697         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
9698         * exceptions.cs: make it compile with new mcs/csc.
9699
9700 2004-06-03 Massimiliano Mantione <massi@ximian.com>
9701         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
9702         and added relevant test case.
9703
9704 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
9705
9706         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
9707         regressions in gtk-sharp.
9708
9709 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9710
9711         * exceptions.cs: New regression tests.
9712
9713         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
9714
9715 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9716
9717         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
9718
9719 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9720
9721         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
9722
9723         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
9724
9725 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
9726
9727         * mini.c (mono_jit_runtime_invoke): Init class in this
9728         method instead of trusting mono_jit_compile_method to
9729         do the work (because wrappers can be in object class)
9730
9731 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
9732
9733         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
9734
9735         * basic-long.cs: New regression test.
9736
9737 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
9738
9739         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
9740         and div/rem checks.
9741
9742 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
9743
9744         * Makefile.am: fix miguel's change to build mono statically against
9745         libmono (track build dependencies).
9746
9747 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9748
9749         * cfold.c: Some glib versions do not have G_MININT32.
9750
9751 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
9752
9753         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
9754         with precision of tan, atan, sin and cos, and implemented related
9755         regressions tests (fixes bug 54467, but one new problem appeared and
9756         is not fixed yet).
9757
9758 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9759
9760         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
9761
9762         * exceptions.cs: Add test for constant folding && division by zero.
9763
9764         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
9765         since driver.c is in libmono too, so the optimization was useless.
9766
9767         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
9768         variable to driver.c so the compiler can emit more efficient code to
9769         access them.
9770
9771 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9772
9773         * Makefile.am: don't distribute generated inssel.[ch] files.
9774
9775 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9776
9777         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
9778         into the default appdomain. Fixes #58707.
9779
9780         * jit-icalls.c: Remove the broken approximation for truncl, doing
9781         no conversion is better.
9782
9783         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
9784         Fixes #58863.
9785
9786 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
9787
9788         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
9789         of the mcrxr instruction which is not available on some processors
9790         even if it's documented to be. Implement add and sub overflow correctly
9791         (still not complete for long unsigned). Speed up icalls a bit.
9792
9793 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
9794
9795         * mini.c (mono_jit_compile_method_with_opt): Make sure that
9796         we run .cctor in the current domain instead of target_domain.
9797         
9798         Fixes bug #58558, .cctor not being called in -O=shared.
9799
9800 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9801
9802         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
9803
9804 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
9805
9806         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
9807         which can be done with an imm8, do it that way.
9808         (mono_arch_output_basic_block): ditto for a jmp
9809         (mono_arch_emit_prolog): Computate maximum offset of a label.
9810
9811 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
9812
9813         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
9814         now tries to allocate prefered physical reg's for virtual
9815         regs. This reduces the number of emited spills/loads with
9816         20-30% on our core assemblies.
9817
9818 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9819
9820         * jit-icalls.c: truncl() is not needed and trunc() is
9821         the correct thing to do anyway (bug #58287).
9822
9823 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
9824
9825         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
9826         if available.
9827
9828 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9829
9830         * driver.c: enable loop optimizations by default.
9831
9832 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
9833
9834         * mini-x86.c: fix calc of max loop size when aligning loops start.
9835
9836 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
9837
9838         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
9839         the stack.
9840
9841 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
9844         should set carry.
9845
9846         * basic-long.cs: Add tests for add/subtract of immediates with carry.
9847
9848         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
9849         
9850         * mini.c (inline_method): Allways inline some wrappers even if the cost
9851         is too large. Fixes #58785.
9852
9853         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
9854         
9855 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9856
9857         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
9858         (crichton@gimp.org). Beginning of support for sparc/linux.
9859
9860         * mini-sparc.c: Optimize retrieval of LMF address.
9861
9862 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
9863
9864         * exceptions-ppc.c:  handle alloca in methods with clauses.
9865
9866 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
9867
9868         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
9869
9870 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9871
9872         * mini.c: Delegate most of the abort signal work to 
9873           mono_thread_request_interruption, which also handles Stop and Suspend
9874           states.
9875
9876 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9877
9878         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
9879         supports the save/restore lmf opcodes.
9880
9881 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
9882
9883         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
9884         by gcc-3.4 as well.
9885
9886         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
9887
9888 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9889
9890         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
9891         methods which contain array accesses.
9892
9893         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
9894         boundaries. Fixes #58537.
9895
9896         * iltests.il: Add regression test for #58537.
9897
9898 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
9899
9900         * mini-x86.c (mono_arch_local_regalloc): Last part of
9901         fix for bug #58633 (releasing register to early).
9902
9903 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
9904
9905         * basic-long.cs: Add new regression test.
9906
9907 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
9908
9909         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
9910         register too early on the chain.
9911
9912 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9913
9914         * mini.c (create_helper_signature): Use a helper function to reduce
9915         the code which needs to be written. Also set the calling convention of
9916         icalls on windows. Fixes #57840.
9917
9918 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
9919
9920         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
9921         exceptions-ppc.c: added helper function to get the instruction address
9922         from a signal handler context.
9923
9924 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9925
9926         * helpers.c: use g_get_tmp_dir. Invokes happyness 
9927         from gonzalo.
9928
9929 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9930
9931         * helpers.c: Add new env variable to pass args to objdump.
9932         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
9933
9934 2004-05-17  Radek Doulik  <rodo@ximian.com>
9935
9936         * Makefile.am (common_sources): added abcremoval.h so it get
9937         disted and daily mono packages on go-mono.com will build again
9938
9939 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
9940
9941         * abcremoval.c: Fixed coding style, added copyright header.
9942
9943         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
9944
9945         * mini.h: Added prototype for abc removal main function.
9946
9947         * build_relations_propagation_table.pl: Added copyright header.
9948
9949 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
9950
9951         * basic-long.cs: reg test for complex ceq_long bug.
9952
9953 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
9954
9955         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
9956         reg in long and clob case (bug #58343). Fixed/added comments.
9957
9958 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9959
9960         * mini.c (mono_jit_runtime_invoke): Follow new convention
9961         of calling the invoke method with an function pointer.
9962
9963 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9964
9965         * ChangeLog: Fix author of memory leak patch.
9966
9967 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
9968
9969         * Makefile.am: fix make dist as well...
9970
9971
9972 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
9973
9974         * cfold.c: Made so that conversions from pointer to int4 are no-ops
9975         on archs where pointers are 4 bytes long.
9976
9977         * Makefile.am: Added abcremoval.c source file.
9978
9979         * abcremoval.c: Added abcremoval.c.
9980
9981         * abcremoval.h: Added abcremoval.h.
9982
9983         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
9984
9985         * inssel.brg: Enabled bounds check removal.
9986
9987         * mini.c: Added support for abcrem optimization.
9988
9989         * mini.h: Added abcrem optimization label.
9990
9991         * driver.c: Added support for abcrem optimization.
9992
9993         * propagated_relations_table.def: Added propagated_relations_table.def.
9994
9995 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
9996
9997         * mini.c, cfold.c: fix style.
9998
9999 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10000
10001         * mini.c: handle issue with the low-level implementation of
10002         some long opcodes (bug #54209).
10003
10004 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10005
10006         * basic.cs: test for my new cmov stuff.
10007
10008 2004-05-13      Patrik Torstensson
10009
10010         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10011         opt and added peephole documentation.
10012
10013 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10014
10015         * tramp-ppc.c: rewrote the generic trampoline code.
10016
10017 2004-05-11      Patrik Torstensson
10018
10019         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10020
10021 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10022
10023         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10024
10025         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10026         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10027
10028         * mini.c: Add new icalls for AsAny marshalling.
10029
10030 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10031
10032         * tramp-ppc.c, mini-ppc.c: more cleanups.
10033
10034 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10035
10036         * mini.c: no warnings.
10037
10038 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10039
10040         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10041
10042 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10043
10044         * mini.c: In the thread abort signal handler, if the thread is in the
10045         process of being stoped, don't throw the Abort exception, just stop the
10046         thread.
10047
10048 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10049
10050         * tramp-ppc.c: removed old code.
10051
10052 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10053
10054         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10055         do some simple speed optimizations on ppc.
10056
10057 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10058
10059         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10060         and large offsets in load/store.
10061
10062 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10063
10064         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10065         it causes regressions.
10066
10067 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10070         support.
10071
10072 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10073
10074         * jit-icalls.c: remove warnings.
10075         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10076         speedups for unsafe code.
10077
10078 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10079
10080         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10081
10082 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10083
10084         * basic-calls.cs: Add new regression test.
10085
10086         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10087         more portable.
10088
10089         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10090
10091         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10092         is no longer used.
10093
10094 2004-05-06      Patrik Torstensson
10095
10096         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10097         long reg allocation in any reg (not only eax:edx) and implemented 
10098         long shl/shr ops in asm instead of helpers.
10099
10100 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10101
10102         * mini-sparc.h: Fix warnings.
10103
10104         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10105         stack.
10106
10107         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10108         separate statement for clarity.
10109
10110         * mini-sparc.c: Update status.
10111
10112 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10113
10114         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10115         here.
10116
10117 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10118
10119         * inssel-ppc.brg: another small pre-release workaround:
10120         we don't do overflow detection for long_sub_un.
10121
10122 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10123
10124         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10125         (also works around a weird ppc bug: 57957).
10126
10127 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10128
10129         * tramp-ppc.c: trampoline fixes.
10130
10131 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10132
10133         * mini-ppc.c: fixed typos.
10134
10135 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10136
10137         * mini-ppc.c, exceptions-ppc.c: more code saves registers
10138         at the top of the stack. Fixed typos. Use a frame registers
10139         for all the methods with exception clauses.
10140
10141 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10142
10143         * exceptions-ppc.c: restore fp registers.
10144
10145 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10146
10147         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
10148         order from the stack top (moved the stack room to save the
10149         return value for trace after the param area). Fixed corruption
10150         in restoring registers on unwind.
10151
10152 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10153
10154         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
10155
10156 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10157
10158         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
10159         and prolog/epilog for methods that use it. Allow
10160         enough param area room for varargs methods. Fix miguel's
10161         breakage in exception handling.
10162
10163 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10164
10165         * Makefile.am: run genmdesc only on current arch.
10166
10167 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10168
10169         * exceptions-x86.c:
10170         * mini-x86.h: fix the build on windows.
10171
10172 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
10173
10174         * 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.
10175
10176         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
10177
10178         * mini-exceptions.c: New file.
10179         
10180         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
10181         Move some parts of the x86 exception handling code to an 
10182         arch-independent file so it can be shared with other ports.
10183
10184 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
10185
10186         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
10187
10188 2004-04-26  David Waite  <mass@akuma.org>
10189
10190         * driver.c: remove comma from end of enumeration declaration
10191
10192 2004-04-26  Jackson Harper  <jackson@ximian.com>
10193
10194         * driver.c: parse config file before loading first assembly. This
10195         allows the user gac to be enabled/disabled. 
10196         
10197 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
10198
10199         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
10200         simpler mechanism: we do not care what is encoded initially
10201         (branch absolute or relative), we care about the code and its
10202         target.  I kept the old code for reference for now.
10203
10204         The new code tries first to determine if the jump is anywhere in
10205         the -/+32 absolute meg range, if it succeeds, it encodes using the
10206         absolute branch;  If not, it tried to find something in the
10207         relative range, if not, it uses the handle_thunk code. 
10208
10209 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
10210
10211         * exceptions-ppc.c: use the correct ip register on macosx.
10212
10213 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
10214
10215         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
10216
10217 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
10218
10219         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
10220         Raise exception on integer divide by zero by hand since the hw
10221         doesn't support it. Handle NaNs in FP compares.
10222
10223 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10224
10225         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
10226         code reducing duplication between the platforms and enabled
10227         signal exception handling (on linux for now).
10228
10229 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
10230
10231         * exceptions-ppc.c: more macosx support.
10232
10233 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10234
10235         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
10236
10237 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
10238
10239         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
10240
10241 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10242
10243         * iltests.il: more tests.
10244
10245 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10246
10247         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
10248         vars as well.
10249
10250 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10251
10252         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
10253
10254 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10255
10256         * liveness.c: Mark variables as volatile in all basic blocks reachable
10257         from exception clauses.
10258
10259 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
10260
10261         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
10262         inlining.
10263
10264 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10265
10266         * iltests.il, basic.cs: more tests for regalloc.
10267
10268 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10269
10270         * iltests.il: Some tests for register allocation modifications
10271         I have locally.
10272
10273 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
10274
10275         * exceptions.cs: Add regression test for bug #56782.
10276
10277         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
10278         original stack trace if an exception is rethrown. Fixes #56782. Oh,
10279         the beauty of fixing the same thing in 5 different files...
10280
10281 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
10282
10283         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
10284         methods.
10285
10286 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
10287
10288         * mini.c: Add support for STRWLPARRAY marshalling convention.
10289
10290 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10291
10292         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
10293         to init the context to setup the regs pointer).
10294
10295 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10296
10297         * exceptions-ppc.c: more exceptions work.
10298
10299 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10300
10301         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
10302         not allowed.
10303
10304 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10305
10306         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
10307         can use the memory directly.
10308
10309         * cpu-pentium.md: Update documentation from a post from Zoltan. 
10310
10311         add x86_add_membase, x86_sub_membase, x86_mul_membase
10312
10313 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10314
10315         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
10316         GENERAL_REGS they were also hardcoded for all PPC ports.
10317
10318         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
10319
10320         Remove hard-coded limit for floating point registers, use
10321         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
10322
10323         Notice that in MacOS X calling conventions you can fit a lot more
10324         floating point values in registers, so I should update the PInvoke
10325         test to excercise the passing of floating point values on the
10326         stack (currently broken).
10327         
10328 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
10329
10330         * tramp-ppc.c (create_trampoline_code): Added
10331         JUMP_TRAMPOLINE_SIZE. 
10332         (ppc_magic_trampoline): Follow the pattern from
10333         x86_magic_trampoline: if code is set to zero, return. 
10334         (create_trampoline_code): Always pass MonoMethod to the jump
10335         trampoline, before it was passing a null.
10336         (mono_arch_create_jump_trampoline): Implement the jump stub, could
10337         share the code with mono_arch_create_jit_trampoline. 
10338
10339         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
10340         implemented.
10341         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
10342         implemented.  
10343
10344         * cpu-g4.md: Added length for jmp instruction, the worst case
10345         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
10346         for save_lmf).
10347
10348 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
10349
10350         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
10351
10352 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
10353
10354         * mini.c: Only set bblock->real_offset when adding a new bblock, and
10355         before each IL instruction.
10356
10357         * mini.c (CEE_BOX): Fix warnings.
10358
10359 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10360
10361         * mini.c: removed a few unused vars and extra whitespace.
10362
10363 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
10364
10365         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
10366         checks.
10367         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
10368         index.
10369         (OP_GETCHR): use the above
10370         (CEE_LDELEMA): use the above.
10371
10372         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
10373         version of the generic impl.
10374         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
10375         (CEE_LDELEMA): use the above.
10376
10377 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10378
10379         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
10380         Fixes #56317.
10381
10382         * iltests.il: Added new regression test for #56317.
10383
10384 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10385
10386         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
10387         under NetBSD. Fixes #56450.
10388
10389         * liveness.c (update_gen_kill_set): Fix previous patch.
10390
10391 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10392
10393         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
10394
10395 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
10398         ldsfld and ldsflda.
10399
10400         * inssel-sparc.brg: Add more optimizations.
10401
10402         * mini-sparc.c: Replace multiply/divide with shifts if possible.
10403
10404 2004-04-01  Martin Baulig  <martin@ximian.com>
10405
10406         * mini.c (handle_box): New static function; moved the
10407         implementation of CEE_BOX here.
10408         (mono_method_to_ir): Added `constrained_call' variable.
10409         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
10410         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
10411         mono_method_get_constrained() to get the method.
10412
10413 2004-04-01  Martin Baulig  <martin@ximian.com>
10414
10415         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
10416         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
10417         (mono_method_to_ir): We don't need these macros anymore since
10418         mono_class_get_full() already takes care of it. 
10419
10420 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10421
10422         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
10423         use @function (as doesn't accept #function here) and check the return
10424         value of system and stop if fails.
10425
10426 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10427
10428         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
10429
10430 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
10431
10432         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
10433
10434         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
10435
10436         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
10437         #56223.
10438
10439         * basic-long.cs: Add test for negation of Int64.MinValue.
10440
10441 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
10442
10443         * mini-sparc.c: Update status.
10444
10445         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
10446
10447         * exceptions-sparc.c: Fix return value in filters.
10448
10449         * inssel-sparc.brg: Fix register allocation in some rules.
10450
10451 2004-03-28  Martin Baulig  <martin@ximian.com>
10452
10453         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
10454         if neccessary.  
10455
10456 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10457
10458         * mini-x86.c (mono_arch_patch_code): Fix warnings.
10459         
10460         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
10461         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
10462         remove unused conv_u4 opcode.
10463
10464         * mini-x86.c: Remove valgrind workaround since it slows down things
10465         even when mono is not run under valgrind.
10466
10467 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
10468
10469         * mini-sparc.c: Update status.
10470
10471         * inssel-sparc.brg: Add some optimizations.
10472
10473         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
10474         future delay slot filling. Add support for varargs, tail calls and JMP.
10475
10476         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
10477         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
10478
10479         * inssel.brg: Fix register allocation in OP_ARGLIST.
10480
10481         * inssel.brg: Fix warnings.
10482
10483 2004-03-25  Martin Baulig  <martin@ximian.com>
10484
10485         * mini.c (inflate_generic_field): Removed.
10486         (mini_get_method): Removed, use mono_get_method_full(),
10487         (mini_get_class): Removed, use mono_class_get_full().
10488         (mono_method_to_ir): Pass our generic context to
10489         mono_field_from_token().        
10490
10491 2004-03-25  Martin Baulig  <martin@ximian.com>
10492
10493         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
10494         of a `MonoMethod *'.
10495         (mini_get_method): Take a `MonoGenericContext *' instead
10496         of a `MonoMethod *'.
10497         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
10498         a new local variable called `generic_context' which holds the
10499         current `MonoGenericContext *'; use it to lookup things.
10500
10501 2004-03-24  Martin Baulig  <martin@ximian.com>
10502
10503         * mini.c (mini_get_class): New static method; if we're inside a
10504         generic instance, inflate the class if neccessary.
10505         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
10506
10507 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10508
10509         * iltests.il: New regression test for #55976.
10510
10511         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
10512         #55976.
10513
10514 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
10515
10516         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
10517         output.
10518
10519 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * liveness.c: Consider SSA stores as well as loads when making vars
10522         volatile.
10523
10524         * exceptions.cs: New regression tests for register allocation.
10525         
10526 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10527
10528         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
10529         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
10530           domain lock only to protect puntual access to data structures.
10531           Added access lock for sighash, jit_icall_hash_name, 
10532           jit_icall_hash_addr and domain->code_mp.
10533
10534 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
10535
10536         * driver.c: Print SIGSEGV handling method.
10537
10538         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
10539
10540         * mini.c (setup_jit_tls_data): Handle case when this is called
10541         multiple times for a thread.
10542
10543         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
10544         is different from fbxx_un. Fixes #54303. Also use constants instead of
10545         magic numbers in a lot of places.
10546
10547 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
10548
10549         * exceptions.cs: Fix cctor test when --regression is used.
10550
10551 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
10552
10553         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
10554         for Linux/ppc.
10555
10556 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
10557
10558         * inssel-ppc.brg: fixed register assignments for some rules.
10559
10560 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10561
10562         * exceptions.cs: Add test for exceptions in static constructors.
10563
10564         * mini.c (mono_jit_compile_method_with_out): Move the calling of
10565         static constructors outside the domain lock. Fixes #55720.
10566
10567 2004-03-17  Martin Baulig  <martin@ximian.com>
10568
10569         * mini.c (get_generic_field_inst): Removed, this'll never happen.
10570         (inflate_generic_field): Take the `MonoMethod *' instead of the
10571         `MonoClass *' and added support for generic method.
10572         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
10573         have a `field->parent->gen_params', only inflate the field if it's
10574         an open constructed type.
10575
10576 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
10579         exception object instead of the preconstructed ones.
10580
10581 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10582
10583         * mini.c: reverted changed to sigsegv_signal_handler commited
10584         accidentally in the previous patch.
10585
10586 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10587
10588         * mini.c:
10589         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
10590         running --aot with an old assembly.
10591
10592 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
10595         point values.
10596
10597         * mini-sparc.c: Add support for v9 branches with prediction.
10598
10599 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
10600
10601         * mini.c (mini_init): #warning is GNUC only
10602
10603         * mini-sparc.h: implement __builtin_frame_address
10604         and __builtin_return_address for Sun C compiler
10605
10606 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
10607
10608         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
10609
10610 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10611
10612         * basic-calls.cs: Add test for unaligned byref long argument passing.
10613
10614         * mini-ops.h: Add sparcv9 compare and branch instructions.
10615
10616         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
10617         v9 instructions if we have a v9 cpu.
10618
10619         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
10620         registers for global allocation.
10621
10622         * exceptions-sparc.c: Fixes.
10623         
10624 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
10625
10626         * liveness.c (mono_analyze_liveness): Optimized version.
10627
10628         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
10629
10630         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
10631         sparc work.
10632
10633         * basic-float.cs basic-calls.cs: New regression tests.
10634
10635 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
10638         sigaltstack implementation.
10639
10640         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
10641         
10642         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
10643         stuff if SIGSEGV_ON_ALTSTACK is not defined.
10644
10645 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10646
10647         * mini.c: Fix warnings.
10648         
10649         * mini.c (mono_resolve_patch_target): New function which contains the
10650         arch independent part of the patching process.
10651
10652         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
10653         patching code to a separate function.
10654
10655 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
10656
10657         * mini.c (add_signal_handler): ifdef out on Windows
10658
10659 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
10660
10661         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
10662         cpu-sparc.md: Add exception handling support + other fixes.
10663
10664         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
10665         typed GC detection in --version.
10666
10667         * basic.cs exceptions.cs: New regression tests.
10668
10669         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
10670         the arch specific code can store data during a compilation.
10671
10672         * mini-ops.h: Add OP_SETFRET.
10673
10674         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
10675         function, register a separate icall for each arity, so the icalls can
10676         get a wrapper.
10677         
10678         * mini.c (mono_print_tree): Print negative offsets in a more readable
10679         form.
10680         
10681         * mini.c: Make signal handling work on sparc.
10682         
10683         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
10684
10685         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
10686
10687         * jit-icalls.c: Emulate truncl by aintl on solaris.
10688
10689         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
10690
10691 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
10694
10695 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10696
10697         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
10698         a MarshalByRef type, inline a method that performs the check, taking into
10699         account that the object can be a proxy. Also implemented tow new opcodes:
10700         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
10701         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
10702         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
10703
10704 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10705
10706         * mini-ppc.c: if a relative branch displacement is too big
10707         but it points to and area reachable with an absolute branch, 
10708         avoid the thunks.
10709
10710 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10711
10712         * mini.c: optimize small copies in cpblk.
10713
10714 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
10715
10716         * basic-calls.cs basic-float.cs: New regression tests.
10717
10718         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
10719         negative offsets from %fp. Implement localloc. Fix local register 
10720         allocation. Fix the case when the this argument needs to be saved to
10721         the stack. Implement some missing opcodes.
10722
10723 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10724
10725         * mini.c (mini_method_compile): Reenable global regalloc in methods
10726         with exception handlers.
10727
10728         * linear-scan.c (mono_varlist_sort): Fix warning.
10729
10730         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
10731
10732         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
10733         regalloc costs.
10734
10735         * liveness.c: Make all variables uses in exception clauses volatile, to
10736         prevent them from being allocated to registers. Fixes #42136.
10737
10738 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
10739
10740         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
10741         causes regressions.
10742
10743         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
10744         argument to mono_arch_regalloc_cost.
10745
10746         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
10747         precisely.
10748
10749 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
10750
10751         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
10752         Make the cost of allocating a variable to a register arch dependent.
10753
10754         * basic-calls.cs: Fix compilation of tests.
10755         
10756         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
10757         helper function to cut back on the number of #ifdefs needed.
10758
10759         * mini-ppc.c: Fix compilation.
10760
10761         * basic-calls.cs: New regression tests.
10762
10763         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
10764
10765         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
10766         of l0 since that is callee saved.
10767
10768         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
10769         to virtual calls.
10770
10771         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
10772         of delay instruction.
10773
10774         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
10775
10776         * mini.h (MonoCallInst): Add 'virtual' flag.
10777
10778         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
10779
10780 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10781
10782         * *.cs: New regression tests.
10783
10784         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
10785         work.
10786
10787         * mini.c (mono_runtime_install_handlers): Fix build.
10788
10789         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
10790         'signal_stack_size' members.
10791
10792         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
10793         alternate signal stack.
10794
10795         * exceptions-x86.c: Add stack overflow handling.
10796
10797         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
10798         functions to arch independent code.
10799
10800         * mini.c (mono_print_tree): Print more detailed info for load_membase
10801         opcodes.
10802         
10803 2004-02-23  Martin Baulig  <martin@ximian.com>
10804
10805         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
10806
10807 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
10808
10809         * mini-x86.c: fixed reg allocation for div/rem.
10810
10811 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
10812
10813         * driver.c (mono_main): Report some configuratio options on --version.
10814
10815 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
10816
10817         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
10818         low in the address space. Correctly flush memory in thunks where we
10819         output native code.
10820
10821 2004-02-20  Martin Baulig  <martin@ximian.com>
10822
10823         * mini.c (mini_get_method): New static method; inflate all generic
10824         methods and methods in open generic instances.
10825         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
10826         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
10827
10828 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
10829
10830         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
10831
10832         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
10833
10834 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
10835
10836         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
10837
10838         * mini-sparc.c (flushi mono_arch_output_basic_block): make
10839         it compile using Sun's compiler.
10840
10841 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
10842
10843         * 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.
10844
10845         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
10846
10847 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10848
10849         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
10850         code.
10851         * mini-ppc.c: handle calls outside of the allowed range with thunks
10852         allocated using the code manager.
10853         * tramp-ppc.c: use the code manager to hold generated native code.
10854         Fixed the magic trampoline to just patch vtable entries.
10855
10856 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
10857
10858         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
10859         independent file.
10860
10861 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
10862
10863         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
10864         PPC.
10865
10866         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
10867         if we have a working __thread implementation.
10868
10869         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
10870         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
10871
10872 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * mini-x86.c: Fix compilation under gcc 2.
10875         
10876 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10877
10878         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
10879         contains a call to the wrapped function.
10880
10881         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
10882         OP_<CALL>_IMM opcodes, and use them under X86.
10883         
10884         * mini.c (mono_jit_find_compiled_method): Fix warning.
10885
10886         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
10887
10888         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
10889
10890         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
10891         functionality to mini.c.
10892
10893         * mini.c (mono_create_jump_trampoline): New function to create a jump
10894         trampoline. Return a compiled method instead of a trampoline if it
10895         exists. Add a cache for jump trampolines.
10896
10897         * mini.c (mono_jit_find_compiled_method): New function to return a
10898         compiled method if it exists.
10899
10900         * mini-x86.c: Call mono_create_jump_trampoline instead of 
10901         mono_arch_create_jit_trampoline.
10902
10903         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
10904         a jump trampoline. Fixes #52092.
10905         
10906 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10907
10908         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
10909         which is not up-to-date. Add check_corlib_version () instead.
10910
10911         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
10912         have to call it.
10913         
10914         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
10915         since newer valgrind versions do not need it.
10916
10917         * mini.c (mono_jit_compile_method_with_opt): New helper function to
10918         compile a method with a given set of optimizations.
10919
10920         * mini.c: Compile icall wrappers on-demand instead of at startup.
10921
10922         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
10923         wrapper for an icall.
10924
10925 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10926
10927         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
10928         #54063.
10929
10930         * iltests.il: Add test for non-empty stack before switch instruction.
10931
10932 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
10933
10934         * mini.c: Add support for new stringbuilder marshalling conventions.
10935
10936         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
10937
10938 2004-02-01  Martin Baulig  <martin@ximian.com>
10939
10940         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
10941         in `ginst->mtype_argv'.
10942
10943 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
10944
10945         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
10946         facilitate grepping.
10947
10948 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
10949
10950         * mini.c: fixed buglet in initobj generic implementation for references.
10951
10952 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
10953
10954         * Makefile.am: make the version script conditional.
10955         * jit-icalls.c: handle missing truncl().
10956
10957 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10958
10959         * exceptions.cs: Add more tests for double->int conversion.
10960
10961         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
10962         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
10963
10964 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
10965
10966         * driver.c: make --verbose --version emit an error
10967         if the loaded corlib doesn't match the runtime version.
10968
10969 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
10970
10971         * mini-ppc.h: export ppc_patch().
10972         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
10973         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
10974         on par or better than on MacOSX.
10975
10976 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
10977
10978         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
10979         mono_lookup_pinvoke_call.
10980
10981         * mini-x86.c: Under windows, the default pinvoke calling convention is
10982         stdcall. Fixes #52834.
10983
10984         * mini.c (optimize_branches): Add an upper bound to the number of
10985         iterations to prevent infinite loops on strange loops. Fixes #53003.
10986
10987 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10988
10989         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
10990         and ISINST. Fixes #52093.
10991
10992         * objects.cs (test_0_vector_array_cast): New tests.
10993         
10994 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
10995
10996         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
10997         checking in Array.Set ().
10998
10999         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11000         #52590.
11001
11002         * object.cs (test_0_multi_array_cast): New regression test.
11003
11004 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11005
11006         * exceptions-ppc.c: fix build on Linux/PPC.
11007
11008 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11009
11010         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11011         running under valgrind.
11012         (x86_magic_trampoline): Fix build bustage.
11013
11014         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11015         negative values as well. This is needed for the encoding of the line number
11016         info, since sometimes the line numbers are not in increasing order.
11017
11018 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11019
11020         * cpu-pentium.md (localloc): Increase the size of the localloc 
11021         instruction since it is a loop under Win32.
11022
11023         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11024         allocation.
11025
11026 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11027
11028         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11029         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11030         Max Horn (max@quendi.de). Fix file names in comments.
11031
11032 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11035         avoid stack overflow.
11036         (replace_usage): Avoid uninitialized variable warnings.
11037
11038         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11039         and taking the address of valuetype variables.
11040
11041 2004-01-03  Patrik Torstensson
11042
11043         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11044         for other purposes than FP later on.
11045
11046 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11047
11048         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11049         of tail calls.
11050
11051 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11052
11053         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11054
11055 2003-12-30  Patrik Torstensson <p@rxc.se>
11056
11057         * mini-x86.h: Decreased number of availiable fp regs.
11058         Solves corner cases with FP spilling.
11059
11060 2003-12-23  Patrik Torstensson <p@rxc.se>
11061
11062         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11063         for floating point stack tracking / spilling on x86. 
11064         Fixes bug #49012.
11065         
11066         * basic-float.cs: added float mul overflow test.
11067
11068 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11071
11072 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11073
11074         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11075         supports for cond branches that overflow the immediate
11076         overflow offset. mcs can compile simple programs.
11077
11078 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11079
11080         * exceptions-ppc.c: exception handling support wip:
11081         finally handlers get run on exception.
11082
11083 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11084
11085         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11086         profiling.
11087
11088 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11089
11090         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11091         initial support for stack walking and unwinding.
11092
11093 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11094
11095         * driver.c (mono_main): Make corlib-out-of-sync message more 
11096         descriptive. Also remove verify_corlib call.
11097
11098 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11099
11100         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11101         not overlap with other call's arguments, too.
11102
11103 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11104
11105         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11106         move to arch-specific code the choice of arch-specific
11107         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11108         * mini.c: ensure emulation calls will not interleave
11109         with other calls.
11110
11111 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11112
11113         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11114         the magic trampoline stack frame is dropped before executing
11115         the new method.
11116
11117 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11118
11119         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11120         and integer to fp conversions. Added support for overflowing
11121         arguments on the stack. Reserve a couple more registers as temps.
11122         Added support for aot compilation (as output still needs to be
11123         tweaked, though).
11124
11125 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11126
11127         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11128         Don't overwrite return register in some corner cases.
11129
11130 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11131
11132         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
11133         static constructors when AOT compiling.
11134
11135         * driver.c (mono_main): Call mono_check_corlib_version.
11136
11137 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11138
11139         * cpu-g4.md, basic.cs: fixed div target register.
11140
11141 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11142
11143         * mini-ppc.c, basic.cs: shl_imm fix with test.
11144
11145 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11146
11147         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
11148         structures by value. Misc fixes.
11149         * objects.cs: more tests.
11150
11151 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
11152
11153         * mini-ppc.c: lconv.ovf.i implemented.
11154
11155 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11156
11157         * mini.c:
11158         (mini_init): don't error out if someone already called g_thread_init.
11159
11160 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11161
11162         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
11163         to be any type per the spec. Fix abnormal memory usage when
11164         the same object is repeatedly thrown.
11165
11166 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
11167
11168         * mini.c: check for overruns in IL code.
11169
11170 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * TODO: Add/remove some todo entries.
11173
11174 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11175
11176         * driver.c (mono_main): Call mono_verify_corlib.
11177
11178 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11179
11180         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
11181         This has been moved to mini.c
11182         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
11183         type being casted is marshalbyref it could be a proxy, so instead of
11184         emitting the type check code, emit a call to a runtime method that will
11185         perform the check by calling CanCastTo if needed.
11186
11187 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
11188
11189         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
11190         methods with large stack frames under Win32.
11191
11192 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11193
11194         * Makefile.am: Distribute regression tests.
11195
11196         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
11197         at the end instead of inserting each variable into the sorted list.
11198
11199         * linear-scan.c (mono_varlist_sort): New helper function.
11200         
11201 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11202
11203         * mini.c: ensure arguments and locals are within bounds.
11204
11205 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11206
11207         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
11208         related fixes.
11209
11210 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11211
11212         * mini.c (mono_cprop_copy_values): Fix crash.
11213
11214         * aot.c: Set verbosity back to 0.
11215         
11216 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11217
11218         * regalloc.c: complete memory leak fix by Laurent Morichetti
11219         (l_m@pacbell.net).
11220
11221 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11222
11223         * driver.c (main_thread_handler): Revert the previous patch.
11224
11225         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
11226         under valgrind.
11227
11228         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
11229         memory from the memory pool.
11230
11231         * driver.c (main_thread_handler): Turn on all optimizations when
11232         --aot is used.
11233
11234         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
11235         an array for better performance.
11236
11237         * regalloc.c (mono_regstate_assign): Fix memory leak.
11238
11239         * debug-mini.c (mono_debug_serialize_debug_info): New function to
11240         serialize the debug info.
11241
11242         * debug-mini.c (mono_debug_add_aot_method): New function to load the
11243         debug info from the serialized representation.
11244
11245         * aot.c: Save debug info into the generated file and load it when 
11246         loading a method.
11247
11248         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
11249
11250 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
11251
11252         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
11253         More FP-related fixes.
11254
11255 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
11256
11257         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
11258         and register allocation buglet. Hello world now runs.
11259
11260 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
11261
11262         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
11263         * tramp-ppc.c: fixed class init trampoline.
11264         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
11265
11266 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
11267
11268         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
11269         mini.c: more ppc changes/fixes.
11270
11271 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
11272
11273         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
11274         Also optimize the case when the arguments are the same in the caller 
11275         and in the callee.
11276
11277         * iltests.il: Add tests for tail calls with valuetype arguments.
11278
11279 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
11280
11281         * mini-ppc.c: fixes for struct return type.
11282
11283 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
11284
11285         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
11286         mono_spillvar_offset() to arch-specific code.
11287
11288 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
11289
11290         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
11291
11292 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
11293
11294         * exceptions-x86.c: Fix stack space leaks.
11295         
11296         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
11297         registers from the lmf if the method has save_lmf set.
11298
11299 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11300
11301         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
11302         of icall wrappers into InvokeInDomain, since these are now per-domain.
11303
11304 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
11305
11306         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
11307         make some opcode emulation and intrinsic ops enabled/disabled 
11308         according to the architecture. More fixes.
11309
11310 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
11311
11312         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
11313
11314 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
11315
11316         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
11317         arch-specific handling for 'this' and struct return type to
11318         arch-specific code.
11319
11320 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11321
11322         * aot.c: prevent divide by zero error when reporting (it happened with
11323         Accessibility.dll).
11324
11325 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
11326
11327         * mini.h (inst_switch): Remove unused macro.
11328
11329 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11330
11331         * aot.c:
11332         (load_aot_module): free 'info->methods' and 'info' properly. No more
11333         "free(): invalid pointer blah" messages when you have an old aot
11334         compiled assembly.
11335
11336 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
11337
11338         * jit-icalls.c, mini.c: Added support for context static fields.
11339
11340 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11341
11342         * mini.c (mono_method_blittable): Methods which set LastError are not 
11343         blittable either. Fixes #51108.
11344         
11345 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
11346
11347         * mini.c: flush icache.
11348         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
11349
11350 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11351
11352         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
11353
11354 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11355
11356         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
11357         safe on IA32.
11358
11359         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
11360         vararg calls.
11361
11362         * inssel.brg (CEE_MKREFANY): Fix AOT case.
11363
11364 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11365
11366         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
11367         instruction when the result is discarded.
11368
11369         * iltests.il (test_0_div_regalloc): New regression test.
11370
11371         * arrays.cs: Fix compilation error.
11372
11373 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11374
11375         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
11376         float rules to inssel-x86.brg: sane architectures with FP registers
11377         don't need to implement these rules.
11378
11379 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11380
11381         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
11382
11383 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11384
11385         * mini.h, inssel-long32.brg: fixed endianess issues in int64
11386         implementation of 32 bit systems.
11387
11388 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11389
11390         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
11391         (Jeroen Zwartepoorte).
11392
11393 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
11396         the caller and the callee matches.
11397         
11398         * mini.c (mono_method_to_ir): Add comment.
11399
11400         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
11401         signbit is missing on some platforms.
11402
11403 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
11404
11405         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
11406
11407         * mini.c (setup_jit_tls_data): Call the new function.
11408         
11409         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
11410
11411         * mini-x86.c: Add experimental support for fast access to the lmf
11412         structure under NPTL/Linux 2.6.x.
11413
11414 2003-11-06  Martin Baulig  <martin@ximian.com>
11415
11416         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
11417         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
11418         the debugger.
11419
11420 2003-11-02  Martin Baulig  <martin@ximian.com>
11421
11422         * mini.c (inflate_generic_field): New static method.
11423         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
11424         generic instance and the field is declared in a generic type, call
11425         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
11426
11427 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * mini.h mini.c (mono_method_same_domain): New function to return
11430         whenever the caller and the callee are in the same domain.
11431
11432         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
11433
11434 2003-10-30  Martin Baulig  <martin@ximian.com>
11435
11436         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
11437         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
11438         method parameters.
11439         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
11440         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
11441
11442 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
11443
11444         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
11445         propagation.
11446
11447         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
11448         object here, so it is in the correct appdomain etc.
11449
11450 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11451
11452         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
11453         already done.
11454         (mono_method_to_ir): Avoid freeing the type created returned from
11455         mono_type_create_from_typespec, since it is put into an internal cache
11456         by the function. Fixes pointer.exe.
11457
11458         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
11459         trampolines for icalls and pinvokes as well. Fixes #33569.
11460
11461 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11462
11463         * mini.c: Update after appdomain changes.
11464
11465         * mini.c (mono_jit_compile_method_inner): Allways compile native
11466         method wrappers in the root domain, since there can only be one
11467         instance of them, whose address is stored in method->info.
11468
11469 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
11470
11471         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
11472         environment variable. Instead detect automatically whenever running
11473         under valgrind using the magic macro RUNNING_ON_VALGRIND from
11474         valgrind.h.
11475
11476 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
11477
11478         * trace.c, trace.h: New files that implement the new trace option
11479         parsing. 
11480
11481         * driver.c: Document new --trace options.
11482
11483         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
11484         mini-x86.c: Apply:
11485
11486         -       if (mono_jit_trace_calls)
11487         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
11488
11489         * mini.h: prototypes.
11490         
11491 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
11494
11495         * mini.c inssel.brg: Implement typedefbyref opcodes.
11496
11497         * mini.c (mono_jit_compile_method): Remove unused local variable.
11498
11499         * mini.c (mono_jit_compile_method_inner): Ditto.
11500         
11501 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
11502
11503         * tramp-x86.c (x86_class_init_trampoline): Fix build.
11504         
11505         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
11506
11507 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
11508
11509         * mini.c (mono_no_aot): Remove unused global variable.
11510
11511         * mini.c: Thread safety fixes.
11512
11513 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
11514
11515         * mini.c (mono_create_class_init_trampoline): Add a lock around
11516         class_init_hash_addr.
11517
11518         * arrays.cs (test_0_newarr_emulation): Add new regression test for
11519         #30073.
11520
11521         * mini.c: Decompose the NEWARR instruction before decomposing its
11522         arguments. Fixes #30073.
11523
11524 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
11525
11526         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
11527         convention.
11528
11529 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
11530
11531         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
11532
11533         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
11534
11535         * driver.c: Add support for compiling icall wrappers to --compile.
11536
11537 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
11538
11539         * inssel.brg: The empty value in class->interface_offsets is -1, not
11540         0. Fixes #49287.
11541
11542 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * objects.cs: New test for 'is' operator on an array of interfaces.
11545
11546 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11547
11548         * tramp-ppc.c: update trampoline code to support jumps
11549         and class initialization.
11550
11551 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
11552
11553         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
11554
11555         * inssel.brg (OP_UNBOXCAST): Fix #46027.
11556
11557         * inssel.brg (OP_UNBOX): Remove unused rule.
11558
11559         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
11560         region instead of one for each method. Fixes #47813.
11561
11562 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
11563
11564         * exceptions.cs (test_0_nested_finally): New regression test for
11565         nested exception handlers.
11566
11567         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
11568
11569         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
11570
11571         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
11572         inlining.
11573
11574         * mini.c (mono_method_check_inlining): Make the inlining limit 
11575         configurable by an environment variable.
11576         
11577         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
11578
11579         * mini.h: Bump AOT file version.
11580
11581         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
11582         token, store the image along with the token, since the token might not 
11583         refer to the same image as the method containing the relocation, 
11584         because of inlining.
11585
11586 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * mini.c (mono_precompile_assemblies): New function to compile
11589         all methods in all loaded assemblies.
11590
11591         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
11592
11593         * regalloc.h regalloc.c (MonoRegState): Change the type of 
11594         iassign and fassign to int*, since they can contain large negative
11595         values if the register is spilled. Also added some comments. Fixes
11596         #45817.
11597
11598         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
11599         under Win32. Fixes #42964.
11600
11601 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
11602
11603         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
11604
11605         * aot.c: Added support for AOT compiling methods which contain calls
11606         to wrappers. Currently, only remoting-invoke-with-check wrappers are
11607         handled.
11608         
11609         * driver.c (compile_all_methods): Run the compilation in a thread
11610         managed by mono. Fixes #44023.
11611
11612         * mini.c (mono_codegen): Print full method name in verbose output.
11613
11614         * mini-x86.c (mono_arch_patch_code): Fix warning.
11615         
11616         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
11617         jumps, since the method we are jumping to might be domain-specific.
11618
11619         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
11620
11621 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11622
11623         * inssel.brg: string chars are unsigned.
11624
11625 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
11626
11627         * TODO: New todo item.
11628
11629         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
11630         which calls mono_runtime_class_init and patches the call site to
11631         avoid further calls.
11632         (mono_arch_create_class_init_trampoline): New arch specific function 
11633         to create a class init trampoline.
11634         (create_trampoline_code): Generalized so it can create
11635         class init trampolines as well.
11636
11637         * mini.c (helper_sig_class_init_trampoline): New helper variable.
11638         (mono_create_class_init_trampoline): New function to create and cache
11639         class init trampolines.
11640         (mono_find_class_init_trampoline_by_addr): New function to lookup the
11641         vtable given the address of a class init trampoline. Used by the
11642         patching process.
11643         (mono_codegen): Generate a call to a trampoline instead of
11644         mono_runtime_class_init in LDSFLD[A].
11645         (mono_codegen): Add relocations for the new trampoline.
11646         
11647         * mini.h mini-x86.c aot.c: Added a new relocation type: 
11648         MONO_PATCH_INFO_CLASS_INIT.
11649
11650         * mini.h: Bump AOT version number.
11651
11652         * aot.c: Create a copy of the loaded code instead of using the original
11653         so methods which call each other will be close in memory, improving
11654         cache behaviour.
11655         
11656         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
11657         patch since it breaks the regression tests.
11658         
11659         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
11660         for the register saving instruction sequence since the 
11661         frame_state_for function in glibc 2.3.2 don't seem to detect it.
11662
11663 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
11664
11665         * TODO: Fix todo item && remove another.
11666
11667 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
11668
11669         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
11670         previous checkin.
11671
11672         * aot.c: Moved the check for MONO_LASTAOT into the initialization
11673         function of the module.
11674
11675         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
11676         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
11677         --no-aot command line option.
11678
11679 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
11680
11681         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
11682         by Bernie Solomon (bernard@ugsolutions.com).
11683
11684         * inssel.brg: Refactor the interface offset table related code into
11685         its separate functions and add support for the AOT case.
11686
11687 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
11688
11689         * aot.c (mono_aot_get_method_inner): Fix memory leak.
11690         
11691         * aot.c: Added mono_aot_verbose variable and made all debugging
11692         output depend on the value of this variable.
11693
11694         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
11695         method_label and info_label.
11696
11697         * mini.h mini-x86.c aot.c: Added a new relocation type 
11698         MONO_PATCH_INFO_IID for klass->interface_id.
11699
11700         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
11701         the MonoJitInfo structure.
11702
11703         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
11704         a non-root appdomain in shared mode.
11705
11706 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
11707
11708         * aot.c: make aot loader less verbose. Remove free of unused variable.
11709
11710 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
11711
11712         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
11713
11714         * .cvsignore: Added *.dll.
11715
11716         * mini.c (mono_print_tree_nl): New function callable while debugging.
11717
11718         * mini.c (mono_print_code): Export this.
11719
11720         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
11721         patched code.
11722
11723 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
11724
11725         * mini.h (MonoCompile): Added 'jit_info' field.
11726
11727         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
11728         the cfg structure, since it is needed by the AOT compiler.
11729
11730         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
11731
11732         * aot.c: A major rewrite. Changes include:
11733         - save exception tables for methods which have them.
11734         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
11735         to g_module_symbol.
11736         - reworked the file format so it is now much smaller and needs
11737         fewer relocation entries.
11738         
11739 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11740
11741         * aot.c (load_aot_module): Fix build bustage on platforms without
11742         Boehm GC.
11743
11744 2003-09-04  Martin Baulig  <martin@ximian.com>
11745
11746         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
11747
11748 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * TODO: Some new optimization ideas.
11751
11752         * aot.c: Move AOT module loading logic here from mono_assembly_open.
11753
11754         * aot.c: Save the optimization flags used to compile the code into
11755         the AOT module.
11756
11757         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
11758         support emitting domain specific code.
11759         
11760         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
11761         no longer domain neutral. It can be made domain neutral by compiling 
11762         with --optimize=shared.
11763
11764         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
11765         between appdomains.
11766
11767         * driver.c mini.h mini.c: New --no-aot debugging option which disables
11768         loading of AOT code.
11769
11770         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
11771         
11772         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
11773         if there is no domain neutrality information.
11774
11775 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
11778         format version into the generated library.
11779
11780         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
11781         callee method into the caller since one of them could be shared.
11782
11783         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
11784         system exceptions from AOT code now works.
11785
11786         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
11787         method if it is domain neutral and the callee is not.
11788
11789         * graph.c (cfg_emit_one_loop_level): Fix warning.
11790
11791 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
11792
11793         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
11794         last checkin.
11795
11796 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
11799         is needed  by code which is executed before mono_runtime_init ().
11800         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
11801         
11802         * mini.c (mono_thread_abort): Fix warning.
11803         (mono_jit_compile_method): Call static constructor in the AOT case too.
11804
11805         * aot.c (mono_compile_assembly): Fix warning.
11806
11807 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11808
11809         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
11810
11811 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
11812
11813         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
11814
11815         * cpu-pentium.md: Fix the length of call opcodes so they include the
11816         ESP restoring instruction. Fixes #47968.
11817
11818 2003-08-28  Martin Baulig  <martin@ximian.com>
11819
11820         * mini-x86.c (mono_arch_call_opcode): Added support for
11821         MONO_TYPE_GENERICINST.
11822
11823         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
11824
11825 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
11826
11827         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
11828         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
11829
11830         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
11831         metadata_section.
11832
11833 2003-08-26  Martin Baulig  <martin@ximian.com>
11834
11835         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
11836         when reporting an error, set this to the actual error location.
11837         (mono_method_to_ir): Report the correct error location if
11838         get_basic_blocks() returned an error.
11839
11840 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
11841
11842         * mini.c (mono_type_blittable): OBJECT is not blittable.
11843         (mono_method_blittable): Methods which have marshalling descriptors
11844         are not blittable either. Fixes #47842.
11845
11846 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
11847
11848         * driver.c mini.c: Use an environment variable instead of a global 
11849         variable. Also fix the build.
11850
11851         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
11852         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
11853         reporting this. 
11854
11855         * driver.c mini.c: Added --with-valgrind option to turn off some
11856         code which prevents mono from running under valgrind.
11857
11858         * mini.c (mono_emit_call_args): Fixed warning.
11859
11860         * mini.c (mono_emulate_opcode): Fixed warning.
11861
11862 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11863
11864         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
11865         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
11866         regalloc.c, regalloc.h: specify available registers in arch-specific
11867         code and support floats in the regallocator (patch by Laurent Morichetti 
11868         <l_m@pacbell.net>)
11869
11870 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
11871
11872         * mini.c: mono_thread_current() can be called only after
11873         mono_runtime_init(): rearrange code to not call it early on.
11874
11875 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11876
11877         * mini.c: allocate jump tables in the code mempools.
11878
11879 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11880
11881         * mini.c, mini.h: make sure per-thread data allocated by the jit is
11882         freed.
11883
11884 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
11885
11886         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
11887         12 to 16.  This fixes bug #47453.
11888
11889
11890 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11891
11892         * mini-ppc.c: fixed indexed load and unsigned compares.
11893
11894 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
11895
11896         * mini.c: reenabled installation of handler for
11897           thread abort signal.
11898
11899 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11900
11901         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
11902         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
11903         until it's fixed and actually useful.
11904
11905 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11906
11907         * inssel-long32.brg: couple more opcodes implemented.
11908
11909 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
11910         
11911         * mini-sparc.c: Even more opcodes implemeted.
11912
11913 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
11914
11915         * mini-sparc.c: More opcodes implemented.
11916
11917 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
11918
11919         * mini-sparc.c: More opcodes implemented.
11920
11921 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
11922
11923         * inssel-sparc.brg: Add some needed rules.  Direct
11924         copy from PPC.
11925         * Makefile.am: Use inssel-sparc.brg
11926         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
11927         an assert happy for now.
11928
11929 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
11930
11931         * mini-sparc.c: Fixed compile errors.
11932         * exceptions-sparc.c: Same.  We now produce a mono binary 
11933         on sparc-linux.  Yea.
11934
11935 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
11936
11937         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
11938         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
11939         They compile, but do not work.
11940
11941 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11942
11943         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
11944         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
11945         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
11946         (ct@gentoo.org).
11947
11948 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11949
11950         * mini.c: more opcodes implemented and better support for generics.
11951
11952 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
11953
11954         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
11955         * mini.c, mini.h: first cut at generics support: some new instructions 
11956         added and changed the behaviour of some of the existing ones.
11957
11958 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
11959
11960         * mini.c: Removed definition of metadata_shared mutex here.
11961
11962 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
11963
11964         * mini-x86.c: make vararg calls work for instance methods.
11965
11966 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11967
11968         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
11969         returns the arguments in a separte list, now.
11970
11971 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
11972
11973         * aot.c, mini.c: updates for array type representation changes.
11974
11975 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
11976
11977         * mini.c: register function to perform jit shutdown.
11978
11979 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11980
11981         * mini.c: use a faster allocator if possible.
11982
11983 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11984
11985         * aot.c: some cleanups and portability changes.
11986
11987 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11988
11989         * mini.c: use faster allocation for CEE_BOX if possible.
11990
11991 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
11992
11993         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
11994         Moved inlined mempcy code to its own function so that is can be
11995         reused. Added an inline memset function as well (optimized initobj).
11996         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
11997
11998 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11999
12000         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12001
12002 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12003
12004         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12005         arch code can setup the cpu for CLR execution, if needed.
12006         We use it on x86 to set the precision of FP operations.
12007
12008 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12009
12010         * mini.c: disable some optimizations if we can guess they'll cost too
12011         much for a given method.
12012
12013 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12014
12015         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12016         
12017 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12018         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12019         info collection support.
12020
12021 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12022
12023         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12024         is now implemented in the profiling API. Get rid of a couple of
12025         unnecessary global variables.
12026
12027 2003-06-15  Nick Drochak <ndrochak@gol.com>
12028
12029         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12030         * cpu-g4.md: add op_bigmul and op_bigmul_un
12031         * cpu_pentium.md: add op_bigmul_un
12032         * inssel-long32.brg: add rule for unsigned bigmul
12033         * mini-ops.h: define OP_BIGMUL_UN
12034         * mini-x86.c: THE BUG: handle (un)signed properly
12035         * mini.c: choose unsigned opcode if needed.
12036         This set of patches fixes bug #44291
12037
12038 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12039
12040         * mini.c (optimize_branches): improved to handle all kinds of
12041         conditional branches.
12042
12043 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12044
12045         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12046         don't raise exceptions.
12047
12048 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12049
12050         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12051         to arch-specific files.
12052
12053 2003-06-09  Martin Baulig  <martin@ximian.com>
12054
12055         * Makefile.am (libs): Added $(LIBGC_LIBS).
12056
12057 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12058
12059         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12060         and OP_ATAN (fixes bug#44293).
12061
12062 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12063
12064         * Makefile.am, mini-x86.c: rename cpu description array to
12065         pentium_desc, since some compilers define the 'pentium' preprocessor
12066         symbol.
12067
12068 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12069
12070         * mini.c (mini_select_instructions): add explicit branch if the
12071         following block is not the false target of a conditional branch -
12072         we need this with any optimization that reorder or remove bblocks
12073
12074         * mini.c (optimize_branches): bug fixes
12075
12076 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12077
12078         * mini.c (mono_method_to_ir): inline static readonly fields
12079
12080         * ssa.c (fold_tree): start cfold support for long (very simple
12081         cases only)
12082
12083         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12084
12085 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12086
12087         * inssel.brg: fixed memcpy (bug #44219).
12088
12089 2003-06-05  Dick Porter  <dick@ximian.com>
12090
12091         * driver.c: Set the glib log levels to not abort if g_message
12092         recurses.
12093
12094         g_set_prgname() has to happen before mini_init() so that the
12095         process handle gets the info.
12096         
12097 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12098
12099         * driver.c: add intrins to the default optimizations to get wider
12100         exposure.
12101
12102 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12103
12104         * mini.h: some large basic blocks will overflow a 16-bit
12105         integers for symbolic registers.
12106
12107 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12108
12109         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12110         (mono_arch_output_basic_block): fix bug 43499 
12111
12112 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12113
12114         * mini.c: kill duplicated definition of mono_debug_format.
12115
12116 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12117
12118         * mini-x86.c, arrays.cs: fixed register allocation bug.
12119
12120 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12121
12122         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12123
12124         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12125
12126 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12127
12128         * mini.c:
12129         (print_method_from_ip): also print source location information if
12130         available.
12131
12132 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
12133
12134         * mini.c (mono_find_block_region): bug fix in region code
12135         (mini_method_compile): enable removing unreachable code again, but
12136         only in methods without exception clauses.
12137
12138 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12139
12140         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
12141         Implemented arglist opcode and handling of TypedReference type.
12142         Fixed x86 call convention when a structure is returned.
12143         Minimal support for calling static vararg methods.
12144
12145 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
12146
12147         * mini.c (mini_method_compile):  always remove unreachable code,
12148         because the code in them may be inconsistent  (access to dead
12149         variables for example).
12150
12151 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12152
12153         * driver.c, debug-mini.c: warning fixes.
12154
12155 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12156
12157         * Makefile.am, jit.h, mini.h: install header for embedding mono.
12158
12159 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
12160
12161         * mini.c: thread-static fields are registered in mono_class_vtable(),
12162         so ensure the function is called before checking for them.
12163
12164 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
12165
12166         * mini.c (optimize_branches): fix for bug 43586
12167
12168         * jit-icalls.c (mono_llmult_ovf): added an additional check for
12169         overflow (fixes Bug #43639)
12170
12171 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12172
12173         * mini.c, objects.cs: allow the use of stobj for primitive types.
12174
12175 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12176
12177         * mini.c: be less strict about argument checking until we support
12178         running the verifier.
12179
12180 2003-05-27  Nick Drochak <ndrochak@gol.com>
12181
12182         * basic-long.cs: tests for (ulong)int * (ulong)int also
12183         * mini.c: use the same trick for (ulong)int * (ulong)int
12184
12185 2003-05-27  Nick Drochak <ndrochak@gol.com>
12186
12187         * basic-long.cs: add regression test for (long)int * (long)int
12188         * cpu-pentium.md: add op_bigmul specification
12189         * inssel-long32.brg: add OP_BIGMUL rule
12190         * mini-ops.h: add OP_BIGMUL
12191         * mini-x86.c: register allocator: handle case where src1 needs to be
12192         in EAX.
12193         * mini.c: substitute special BIGMUL opcode in the tree for 
12194         (long)int * (long)int
12195
12196 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12197
12198         * jit-icalls.c: call the type ctor on field access if needed.
12199
12200 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12201
12202         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
12203         to a method (including results of ldelema, bug#43207).
12204
12205 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
12206
12207         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
12208         colors to show exception handler blocks.
12209
12210         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
12211         (fix for pinvoke7.cs).
12212
12213 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12214
12215         * mini.h, mini.c: ensure correct initialization order for types that
12216         require it. Prepare for lazy compilation of jit icall wrappers.
12217         Provide a name for opcode emulation to reduce unneeded mallocing.
12218
12219 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12220
12221         * mini-x86.c: better register restoring code and profiling
12222         support for tail calls.
12223
12224 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12225
12226         * mini.h, driver.c: prepare for leaf methods optimization.
12227
12228 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12229
12230         * mini.c: get targets of branches before converting a method.
12231
12232 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
12233
12234         * mini.c (optimize_branches): added some experimental code (disbaled) 
12235
12236 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
12237
12238         * mini.c (optimize_branches): fix branch to branch optimization 
12239
12240         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
12241
12242         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
12243
12244         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
12245
12246         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
12247         if needed.
12248
12249 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
12250
12251         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
12252         enable use of interface variables again.
12253
12254         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
12255         I1 to registers because there is no simply way to sign extend 8bit
12256         quantities in caller saved registers on x86.
12257
12258         * inssel-float.brg: set costs of some rules to 2 so
12259         that monobure always select the arch. specific ones if supplied,
12260         regardless of the order we pass the files to monoburg.
12261
12262 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12263
12264         * mini.c, mini-x86.c: since the magic trampoline for jumps
12265         can't patch the code directly, we do it as soon as the
12266         method gets compiled.
12267
12268 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12269
12270         * mini-x86.c, mini.h: introduce a new patching method
12271         to support CEE_JMP and tail calls.
12272         * mini.c: obey tail.call. Don't precompile methods target
12273         of CEE_JMP.
12274         * tramp-x86.c: new trampoline code to handle methods
12275         reached through a jump.
12276
12277 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
12278
12279         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
12280         bit values to registers
12281
12282 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
12283
12284         * mini.c (mono_compile_get_interface_var): share interface
12285         variables if possible.
12286
12287 2003-05-16  Martin Baulig  <martin@ximian.com>
12288
12289         * debug-mini.c (mono_init_debugger): New function to initialize
12290         the debugger.  This is not in the debugger since it needs to
12291         access some of mini's internals.
12292
12293 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
12294
12295         * mini.c (mono_method_to_ir): inlining fixes/cleanups
12296
12297 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
12298
12299         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
12300         for value type handling.
12301
12302 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
12303
12304         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
12305         (mono_method_check_inlining): enable inlining of all kinds of wrappers
12306
12307 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
12308
12309         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
12310           the constructor through a proxy.
12311
12312 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12313
12314         * jit-icalls.c, inssel.brg: fixes to array element address
12315         calculations.
12316
12317 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
12318
12319         * mini-x86.c (is_regsize_var): allocate pointer to registers
12320
12321 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12322
12323         * driver.c: fixed typo, added intrins to the set of optimizations
12324         tested with regressions.
12325
12326 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12327
12328         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
12329         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
12330         test case.
12331
12332 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
12333
12334         * inssel.brg: remove some common pop instructions without side effects
12335
12336 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12337
12338         * inssel-x86.brg: fixed thinko in int to double conversions.
12339
12340 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12341
12342         * mini.c, jit-icalls.c: added runtime thread-static variable support.
12343
12344 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12345
12346         * inssel-long32.brg: two more missing instructions.
12347
12348 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
12349
12350         * mini.c (mono_emit_call_args): set the cil_code for all arguments
12351         if not already set.
12352
12353 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
12356         correctly.
12357
12358         * basic-float.cs: Added tests for negative zero.
12359
12360 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12361
12362         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
12363         a couple of missing operations for long casts, with test cases.
12364
12365 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12366
12367         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
12368
12369 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
12370
12371         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
12372         code size estimation.
12373
12374 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
12375
12376         * mini.c (mono_jit_create_remoting_trampoline): make it work with
12377         abstract methods (fix bug 42542)
12378
12379         * aot.c: add ability to handle array types
12380         
12381 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
12382
12383         * mini.c: Call the _specific versions of the object allocation
12384         functions if possible.
12385
12386 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12387
12388         * driver.c: call setlocale ().
12389
12390 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12391
12392         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
12393         windows build.
12394
12395 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
12396
12397         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
12398
12399         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
12400         wrappers (fix bug 42122)
12401
12402 2003-05-04  Martin Baulig  <martin@ximian.com>
12403
12404         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
12405
12406         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
12407         s/mini_set_defaults/mono_set_defaults/g.
12408
12409 2003-05-04  Martin Baulig  <martin@ximian.com>
12410
12411         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
12412
12413 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12414
12415         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
12416         (reported by Don Roberts).
12417
12418 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12419
12420         * mini.c: temporarily work around two bugs for this release.
12421
12422 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12423
12424         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
12425         that contains -export-dynamic and it makes using the ld script
12426         useless.
12427         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
12428
12429 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12430
12431         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
12432         specific cpu.
12433
12434 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12435
12436         * mini.c: make sure leave calls all the needed finally blocks,
12437         even when the target jumps out of multiple exception clauses.
12438
12439 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12440
12441         * ldscript, Makefile.am: add linker script to reduce the number of
12442         exported symbols (should also fix the issues with libwine defining
12443         some of the same symbols in io-layer).
12444
12445 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
12446
12447         * driver.c (mini_main): Avoid assertion when no file name is given on 
12448         the command line.
12449
12450 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
12451
12452         * driver.c: added --version/-V command line option.
12453         Added the inline optimization in the regression tests.
12454
12455 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12456
12457         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
12458         to the type in the method signature (fixes bug#42134).
12459
12460 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
12461
12462         * mini.c: when inlining, check this is not null only when needed (bug #42135).
12463
12464 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
12465
12466         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
12467
12468 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12469
12470         * driver.c: fixed bug #42100.
12471
12472 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
12473
12474         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
12475
12476 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12477
12478         * mini.c: moved most of the code required to do inlining to its own
12479         function so it can be reused. Inline also ctors if appropriate.
12480
12481 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * Makefile.am: Link with -export-dynamic so shared libs loaded by
12484         the runtime can call mono API functions.
12485
12486 2003-04-27  Martin Baulig  <martin@ximian.com>
12487
12488         * debug-mini.c (mono_debug_init_method): Added
12489         `guint32 breakpoint_id' argument; if the method has a breakpoint,
12490         send a notification to the debugger.
12491
12492         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
12493         running in the Mono Debugger, just pass the breakpoint number to
12494         mono_debug_init_method().
12495
12496         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
12497
12498 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
12499
12500         * mini.c: allow some more unsafe compares.
12501
12502 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12503
12504         * mini-x86.c, Makefile.am: make distcheck works (partially from
12505         a patch by Richard Lee <r.h.lee@attbi.com>).
12506         * regset.c, regset.h: removed, they are unused.
12507
12508 2003-04-25  Dick Porter  <dick@ximian.com>
12509
12510         * driver.c: Usage reports the name as 'mono' not 'mini'
12511         * exceptions-x86.c: Build and run on freebsd
12512
12513 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12514
12515         * Makefile.am: install the program with the 'mono' name and
12516         the library as libmono instead of mini and libmini.
12517
12518 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12519
12520         * driver.c: provide the APIs for the embedding interface of the old jit.
12521
12522 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
12523
12524         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
12525
12526 2003-04-23  Martin Baulig  <martin@ximian.com>
12527
12528         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
12529
12530         * driver.c: Added `--debug' command line argument to enable
12531         debugging support.
12532
12533 2003-04-23  Martin Baulig  <martin@ximian.com>
12534
12535         * debug.[ch]: Removed.  The code is now in
12536         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
12537
12538         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
12539         last six months.
12540
12541 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
12542
12543         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
12544
12545 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12546
12547         * mini.c:
12548         (mini_cleanup): moved mono_runtime_cleanup call after the call to
12549         mono_domain_finalize.
12550         (mini_method_compile): use mono_method_profile* if the the option is
12551         enabled.
12552
12553 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
12554
12555         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
12556         methods with their wrapper.
12557
12558         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
12559         methods with their wrapper.
12560
12561         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
12562         their wrapper.
12563
12564         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
12565         wrapper.
12566
12567         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
12568         methods.
12569
12570 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
12571
12572         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
12573
12574 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
12575
12576         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
12577         of the mempool. This is slightly faster and uses less memory
12578
12579 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12580
12581         * mini.c: avoid O(n) allocation for variables.
12582
12583 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12584
12585         * mini.c: handle items on the stack after inlining methods.
12586
12587 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12588
12589         * mini.c: make the method->opcode optimization dependent
12590         on MONO_OPT_INSTRINS and do it lazily.
12591
12592 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12593
12594         * driver.c: print overall results at the end of regression run.
12595
12596 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12597
12598         * inssel.brg: don't overwrite symbolic registers.
12599
12600 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
12601
12602         * inssel-x86.brg: fix conversion from long to float.
12603
12604 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
12605
12606         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
12607
12608 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
12609
12610         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
12611
12612         * driver.c: Added --print-vtable option as in the old JIT.
12613
12614 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12615
12616         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
12617
12618 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
12619
12620         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
12621
12622 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
12623
12624         * mini.c regalloc.c regalloc.h: Fix memory leak.
12625
12626 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
12627
12628         * aot.c (mono_aot_get_method): register all used strings
12629
12630 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12631
12632         * mini.c: always intern strings references with ldstr at compile time.
12633
12634 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12635
12636         * Makefile.am: add BUILT_SOURCES.
12637
12638 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
12639
12640         * driver.c: give a better error message when the assembly to execute
12641         doesn't have an entry point.
12642
12643 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
12644
12645         * Makefile.am: added hack for automake
12646
12647         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
12648         correct sematics.
12649
12650         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
12651
12652 22003-04-07  Martin Baulig  <martin@ximian.com>
12653
12654         * Makefile.am: Added Makefile.am.
12655
12656         * debugger-main.c: Removed, this is now in the debugger where it
12657         belongs.
12658
12659         * mini.pc.in: Call this package `mini' for the moment.
12660
12661
12662
12663
12664
12665
12666
12667