3607ba6bcea15850d437bc2825a4eccc506f92bd
[mono.git] / mono / mini / ChangeLog
1 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * mini.h: Added MiniVerifierMode enumeration.
4
5         * mini.c: Added mini_verifier_set_mode to control
6         the usage of the new verifier.
7
8         * mini.c (mono_method): Integrated the new verifier.
9
10         * driver.c: Extended --security option with validil and
11         verifiable options to activate the new verifier.
12
13 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
14
15         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
16         optimization to ctors taking 0 or 2 arguments too.
17
18         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
19         a bit.
20
21         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
22
23         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
24
25 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
26
27         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
28         non-aot case as well.
29
30         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
31
32         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
33         changes.
34
35         * aot-compiler.c (encode_patch): Ditto.
36
37         * mini.h (G_MININT32): Fix the definition of this.
38
39 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
40
41         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
42
43         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
44
45 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
46
47         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
48         methods returning vtypes in registers.
49         (mono_arch_allocate_vars): Ditto.
50
51         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
52
53         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
54
55         * generics.cs: Add a test from the linear IR branch.
56
57         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
58
59         * mini.c (inline_method): Cache failed inline attempts.
60
61 2008-03-04  Mark Probst  <mark.probst@gmail.com>
62
63         * mini.c: For shared methods of generic classes put the location
64         of "this" into the MonoGenericJitInfo.
65
66         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
67         register out of a MonoContext by register number.  Add the generic
68         sharing context as an argument to mono_arch_find_this_argument().
69
70         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
71         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
72         for new arch function.
73
74         * mini-exception.c: Handle open exception clauses in shared
75         generic code.
76
77         * mini-trampolines.c: Supply additional argument to
78         mono_arch_find_this_argument().
79
80 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
81
82         * Makefile.am (regtests): Run the bench.exe tests last.
83
84 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
85
86         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
87         a bit.
88
89 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
90
91         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
92         with MS.
93
94         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
95         
96         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
97
98         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
99         whose class has no cctor.
100
101         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
102
103 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
104
105         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
106         unverified.
107
108 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
109
110         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
111         to be in sync with the code on the linear IR branch.
112
113         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
114
115         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
116
117 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
118
119         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
120
121         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
122
123         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
124
125         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
126
127         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
128         
129         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
130         body.
131
132 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
133
134         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
135         OP_LOADR4_MEMBASE emission.
136
137         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
138         (mono_spillvar_offset_float): Ditto.
139
140         * mini-mips.c (mono_arch_emit_prolog): Ditto.
141
142         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
143         emission.
144
145         * basic-long.cs: Add regression tests for them.
146
147         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
148         use.
149         (mono_arch_allocate_vars): Fix representation of single-precision float
150         argument.
151         (mono_arch_output_basic_block): Ditto.
152
153         * inssel-mips.brg: Ditto, remove duplicate items.
154
155         * mini-mips.c (emit_load_volatile_arguments): New function to handle
156         arguments of tail calls as on other platforms.
157         (mono_arch_output_basic_block): Handle tail calls.
158
159         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
160         register.
161
162         * objects.cs (test_5_pass_static_struct): Add test for it.
163
164         Contributed under MIT/X11 license.
165
166 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
167
168         * Makefile.am: Use gmcs for compiling the regression tests.
169
170         * *.2.cs *.2.il: Rename to *.cs and *.il.
171
172 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
173
174         * regalloc.h: Make the vassign array smaller.
175
176         * mini.c (mini_method_compile): Remove an unused field in cfg.
177
178         * mini-codegen.c: Add a bunch of micro optimizations.
179
180 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
181
182         * regalloc.h: Remove some unused fields.
183
184 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
185
186         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
187
188         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
189
190 2008-02-22  Mark Probst  <mark.probst@gmail.com>
191
192         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
193
194         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
195         trampoline: Fetch an entry from the runtime generic context.  If
196         it's NULL, jump to the actual trampoline to fill the runtime
197         generic context.  Otherwise, return it.
198
199         * mini.c: Call the lazy fetch trampoline to get entries out of the
200         runtime generic context.
201
202         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
203         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
204         tramp-sparc.c: Stubs for the lazy fetch trampoline.
205
206 2008-02-21  Mark Probst  <mark.probst@gmail.com>
207
208         * mini.c: Fetch data out of the extensible part of the runtime
209         generic context instead of calling a helper function.
210
211         * generic-sharing.c: Some functions moved into
212         metadata/generic-sharing.c.  Helper function for fetching other
213         types now checks and asserts against extensible rgctx (just for
214         debugging purposes - the helper function isn't called anymore
215         unless for debugging).
216
217 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
218
219         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
220         for tail calls up to the point that the tests in iltests.exe run. Also add a
221         dummy CKFINITE implementation.
222         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
223         needed for trampoline LMF frames.
224
225         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
226         trampoline LMF frames.
227
228 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
229
230         * mini.c (inline_method): clean any pending loader error when inlining fail.
231         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
232
233 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
234
235         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
236
237         * aot-runtime.c (decode_patch_info): Ditto.
238
239         * mini.c (mono_resolve_patch_target): Ditto.
240         
241         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
242         icall wrappers.
243
244         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
245         
246         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
247         if it references an icall address.
248
249 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
250
251         * cpu-s390x.md: Remove some more unused opcodes.
252         
253         * cpu-s390x.md: Remove some unused opcodes.
254
255         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
256         mono_op_imm_to_op ().
257
258         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
259         instead of a switch statement.
260         
261         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
262         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
263
264         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
265         
266         * mini-codegen.c: Remove unused mono_regstate2_... functions.
267
268         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
269         -1.
270
271 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
272
273         * driver.c (mono_main): Improve error reporting when an assembly cannot be
274         opened. Fixes #362607.
275
276         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
277
278         * iltests.il.in: Add a test for static methods in interfaces.
279
280 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
281
282         * genmdesc.c (build_table): Fix a crash on older glib versions.
283
284         * cpu-sparc.md: Remove some unused opcodes.
285         
286         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
287         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
288
289         * cpu-amd64.md: Remove some unused opcodes.
290
291         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
292         like the other opcodes.
293
294 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
295
296         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
297
298         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
299
300         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
301         variables 'cfg' instead of 'm' for consistency.
302
303         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
304
305         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
306         argument holding the vtype return address, to avoid the ambigious use of
307         cfg->ret for this purpose.
308
309         * mini.c (NEW_RETLOADA): Use vret_addr if set.
310
311         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
312         
313         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
314         new mono_print_ins () function which only takes one argument.
315
316 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
317
318         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
319         macro arguments.
320
321 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
322
323         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
324
325         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
326
327         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
328         opcodes and other small changes.
329
330         * mini-ops.h: Add some new opcodes from the linear IR branch.
331
332         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
333
334         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
335         opcodes, use the REG_MEMBASE opcodes instead.
336         
337         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
338         opcodes, use the REG_MEMBASE opcodes instead.
339         
340         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
341         linear IR branch.
342
343         * mini.c (mono_op_imm_to_op): New helper function.
344
345         * mini-ops.h: Add some opcodes from linear IR branch.
346
347 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
348
349         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
350         <tsv@solvo.ru>.
351
352 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
353
354         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
355         OP_ICONV_TO_R4/R8.
356
357         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
358
359 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
360
361         * aot-compiler.c (emit_method_code): Add an assert.
362
363         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
364         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
365         methods.
366
367 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
368
369         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
370         some load/store opcodes so they are consistent. 
371         (mono_arch_emit_prolog): Simplify some code.
372
373         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
374
375         * objects.cs: Add tests for large argument offsets on ARM.
376
377         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
378         stack offsets. Fixes #359651.
379
380         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
381
382         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
383
384         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
385
386         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
387
388         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
389
390         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
391         rid of CEE_CONV_R_UN.
392
393         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
394
395 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
396
397         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
398
399         * mini.c (mono_normalize_opcodes): Add some more opcodes.
400
401         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
402
403         * cpu-amd64.md: Remove some unused opcodes.
404
405         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
406
407         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
408
409         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
410         arch specific functions for its parts. Call the peephole pass after local
411         regalloc so the prolog can compute a more accurate max_offset.
412         
413         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
414         the corresponding OP_I/OP_L opcodes.
415
416         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
417
418         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
419
420 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
421
422         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
423         as they are handled in mini.c.
424
425         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
426         
427         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
428         case since it is handled in mini.c.
429
430         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
431
432         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
433
434         * *.c: Use the new opcodes in the IR and back end code.
435
436         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
437
438         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
439
440 2008-02-06  Mark Probst  <mark.probst@gmail.com>
441
442         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
443         an assert because it has a race condition.
444
445 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
446
447         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
448
449         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
450
451         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
452
453         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
454         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
455
456 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
457
458         * cpu-amd64.md (move): Correct the maximum size of move.
459
460 2008-02-05  Mark Probst  <mark.probst@gmail.com>
461
462         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
463         the generic class init trampoline to return quickly if the class
464         is already inited.
465
466 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
467
468         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
469         issues where an 32 bit callsite cannot be patched by a 64 bit address.
470
471 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
472
473         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
474         branch.
475
476 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
477
478         * objects.cs: Add some soft-float tests.
479
480         * mini.c: Fix a couple more soft-float issues.
481
482         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
483
484         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
485         avoid a REX prefix.
486
487 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
488
489         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
490         exception happens while compiling a virtual method.
491
492 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
493
494         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
495         
496         * mini-sparc.c: Fix build.
497
498         * mini-sparc.c (get_call_info): Add support for generic sharing.
499
500         * mini-exceptions.c: Add a FIXME.
501
502 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
503
504         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
505         altstack handling code.
506
507         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
508         
509         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
510
511         * mini-s390.c: Add support for generic sharing.
512
513         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
514         Fix CAS on s390.
515         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
516
517         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
518
519         * mini-s390x.c: Add support for generic sharing.
520         
521         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
522         Fix CAS on ia64.
523         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
524
525         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
526         can be used since it takes a 16 bit signed immediate.
527
528         * inssel-s390x.brg: Fix OP_SETRET.
529
530         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
531
532         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
533
534         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
535
536         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
537
538         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
539         in one place.
540
541         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
542         stuff.
543
544         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
545         of the unused mono_arch_patch_delegate_trampoline stuff.
546
547 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
548
549         * basic-long.cs: Move the fp related tests to basic-float.cs.
550
551         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
552
553         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
554
555         * basic-calls.cs: Add a test for proper float argument passing.
556
557         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
558         if the context corresponds to an exception received through a signal.
559
560         * exceptions.cs: Add a test for nullref handling at the start of a try
561         clause.
562
563         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
564
565         * jit-icalls.c (mono_break): New JIT icall.
566
567         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
568
569         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
570
571 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
572
573         * cpu-*.md: Get rid of unused opcodes.
574
575         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
576
577         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
578         by all platforms.
579
580         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
581         define.
582
583         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
584         the arch independent trampoline code in mini-trampolines.c.
585
586         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
587
588         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
589
590         * mini-s390.h: Remove an unused define.
591         
592         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
593         the arch independent trampoline code in mini-trampolines.c.
594
595         * mini-arm.c (mono_arch_emit_prolog): Fix build.
596
597 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
598
599         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
600
601         * mini-s390.c (mono_arch_emit_prolog): Fix build.
602
603         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
604
605         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
606
607         * cpu-amd64.md: Use smaller sizes for int opcodes.
608
609         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
610
611         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
612         objects.cs.
613
614         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
615         debugging.
616
617         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
618         instead of though a pointer to save an indirection when accessing elements of
619         the array.
620
621         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
622         some typos.
623         (NOT_IMPLEMENTED): New helper macro.
624         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
625         of a bb.
626
627         * *.c: Use the new helper macro.
628
629 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
630
631         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
632
633 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
634
635         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
636         stack slots.
637
638 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
639
640         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
641         profiling is enabled.
642         
643         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
644         the end.
645         (mono_arch_emit_prolog): Add more first bblock optimizations.
646
647         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
648         in order if possible.
649         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
650         bblock, since the arguments are still in their original registers.
651
652         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
653
654 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
655
656         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
657         as well.
658
659         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
660         offset 0.
661
662         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
663
664         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
665         process async exceptions received while in unmanaged code.
666
667         * mini.c (mini_init): Install a callback with the runtime which will be called
668         when a thread receives an async exception while in unmanaged code.
669
670         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
671
672         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
673
674 2008-01-16  Wade Berrier  <wberrier@novell.com>
675
676         * cpu-g4.md:
677         * cpu-arm.md:
678         * cpu-s390x.md:
679         fix build
680
681 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
682
683         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
684         compilation with sun cc.
685
686         * cpu-*.md: Fix the build.
687
688         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
689
690         * mini-amd64.h: Add some comments to the MonoLMF structure.
691
692         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
693         
694         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
695         in the LMF structure if possible. This saves two instructions in the
696         managed->native wrappers.
697
698         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
699
700 2008-01-16  Mark Probst  <mark.probst@gmail.com>
701
702         * generic-sharing.c: New type argument lookup code which uses the
703         runtime generic context template.
704
705 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
706
707         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
708
709         * mini-arm.c (add_general): Fix arm eabi parameter passing.
710         (mono_arch_output_basic_block): Fix localloc implementation.
711
712         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
713
714         * mini-ia64.c (peephole_pass): Fix ia64 build.
715
716         * mini-amd64.c (peephole_pass): Fix a warning.
717         
718         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
719         at a constant offset from sp/fp.
720
721         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
722         instead of obtaining it from *lmf in the managed method case.
723
724 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
725
726         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
727
728 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
729
730         * mini.h (MonoInstList): New type.
731         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
732         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
733         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
734         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
735         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
736         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
737         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
738         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
739         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
740         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
741         MONO_INST_LIST_FOR_EACH_ENTRY,
742         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
743         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
744         mono_inst_list_first, mono_inst_list_last,
745         mono_inst_list_next, mono_inst_list_prev): New instruction
746         list handling interfaces.
747         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
748         list head 'ins_list'.
749         (MonoInst): Replace next pointer with list head 'node'.
750         (MonoCallInst): Make 'out_args' a MonoInstList.
751         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
752         (MonoCompile): Delete reverse_inst_list and
753         reverse_inst_list_len.
754         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
755         mono_arch_lowering_pass, mono_arch_local_regalloc,
756         mono_arch_output_basic_block, mono_arch_emit_prolog):
757         Convert to new instruction lists.
758         (insert_after_ins): Delete.
759         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
760         instruction lists.
761         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
762         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
763         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
764         mono_emulate_opcode, mono_emit_load_got_addr,
765         inline_method, mono_method_to_ir, mono_print_bb_code,
766         print_dfn, decompose_pass, nullify_basic_block,
767         replace_out_block_in_code, remove_block_if_useless,
768         merge_basic_blocks, move_basic_block_to_end,
769         try_unsigned_compare, optimize_branches, mono_print_code,
770         mini_select_instructions, remove_critical_edges): Likewise.
771         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
772         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
773         mono_arch_output_basic_block, mono_arch_emit_prolog):
774         Likewise.
775         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
776         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
777         mono_arch_output_basic_block): Likewise.
778         (inst_list_prepend, insert_after_ins): Delete.
779         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
780         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
781         instruction lists.
782         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
783         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
784         mono_arch_emit_prolog): Likewise.
785         * cfold.c (mono_constant_fold): Likewise.
786         * liveness.c (visit_bb, mono_analyze_liveness,
787         optimize_initlocals): Likewise.
788         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
789         * graph.c (mono_draw_code_cfg): Likewise.
790         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
791         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
792         mono_ssa_cprop): Likewise.
793         * abcremoval (get_relations_from_previous_bb, process_block):
794         Likewise.
795         * local-propagation (mono_cprop_invalidate_values,
796         mono_local_cprop_bb): Likewise.
797         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
798         peephole_pass, mono_arch_output_basic_block,
799         mono_arch_emit_prolog): Likewise.
800         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
801         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
802         mono_arch_emit_prolog): Likewise.
803         (insert_after_ins): Delete.
804         * aliasing.c (print_code_with_aliasing_information,
805         mono_build_aliasing_information, mono_aliasing_deadce):
806         Convert to new instruction lists.
807         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
808         peephole_pass, NEW_INS, mono_arch_lowering_pass,
809         mono_arch_local_regalloc, mono_arch_output_basic_block):
810         Likewise.
811         (insert_after_ins): Delete.
812         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
813         peephole_pass, mono_arch_output_basic_block): Convert to
814         new instruction lists.
815         * mini-codegen (InstList, inst_list_prepend,
816         insert_after_ins): Delete.
817         (insert_before_ins, get_register_force_spilling,
818         get_register_spilling, free_up_ireg, free_up_reg,
819         create_copy_ins, create_spilled_store, alloc_int_reg,
820         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
821         to new instruction lists.
822         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
823         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
824         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
825         (insert_after_ins): Delete.
826         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
827         mono_arch_local_regalloc, mono_arch_output_basic_block,
828         mono_arch_call_opcode): Convert to new instruction lists.
829         (insert_after_ins): Delete.
830         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
831         peephole_pass, mono_arch_output_basic_block,
832         mono_arch_emit_prolog): Convert to new instruction lists.
833
834 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
835
836         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
837
838         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
839         Fixes #353182.
840
841         * Makefile.am (version.h): Make this work with non-bash shells.
842
843 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
844
845         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
846
847 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
848
849         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
850         the InitializeArray optimization.
851
852 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
853
854         * mini.c driver.c: Don't include os/gc_wrapper.h.
855
856 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
857
858         * mini.c (print_jit_stats): Print GC statistics if available.
859
860 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
861
862         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
863
864 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
865
866         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
867
868 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
869
870         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
871         
872         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
873
874         * driver.c (mono_main): Ditto.
875
876 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
877
878         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
879
880         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
881         in the vtable can't be encoded.
882         (compile_method): Ditto.
883
884 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
885
886         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
887         defined.
888
889         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
890         lmf->rbp.
891
892         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
893         the top LMF entry belongs to the current method.
894
895         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
896
897 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
898
899         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
900         
901         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
902
903         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
904
905         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
906
907         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
908
909         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
910         implementation.
911
912         * basic-float.cs: Add an ulong->double cast test.
913
914 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
915
916         * mini.c (mono_method_to_ir): Fix a warning.
917
918 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
919
920         * mini-ops.h: Add OP_SWITCH.
921
922         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
923         CEE_SWITCH in back-end code, use OP_SWITCH instead.
924
925 2007-12-11  Geoff Norton  <gnorton@novell.com>
926
927         * mini-s390x.c: Minor change to the MAX() define to allow
928         it to compile with other gcc versions.
929
930 2007-12-11  Geoff Norton  <gnorton@novell.com>
931
932         * cpu-s390x.md:
933         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
934
935 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
936
937         exceptions-arm.c (mono_arch_get_restore_context): Restore
938         the frame pointer.
939
940         exceptions-arm.c (throw_exception): Save the frame pointer.
941         This is a partial fix for #323747. Only the client side is
942         fixed.
943
944 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
945
946         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
947         was using an unrelated variable to log the class which
948         needed the cctor to be called. This was crashing on arm.
949
950 2007-12-09  Robert Jordan  <robertj@gmx.net>
951
952         * mini-x86.c (mono_arch_emit_epilog):
953         Consider all kinds of 64-bit types. Fixes #323114.
954
955 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
956
957         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
958
959 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
960
961         * mini-amd64.c (peephole_pass): Add a missing instruction check.
962
963 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
964
965         * mini.c: run type ctor before allocating an object, not only
966         when running it's constructor method (fixes at least part of bug #342507).
967
968 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
969         
970         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
971         
972         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
973         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
974         function.
975
976         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
977         mono_generic_class_init_trampoline () the same as it is done with the other
978         trampolines.
979
980         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
981         aot-runtime.c aot-compiler.c: Implement AOT support.    
982
983 2007-12-07  Mark Probst  <mark.probst@gmail.com>
984
985         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
986         build for archs which don't have the vtable trampoline defined
987         yet.
988
989 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
990
991         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
992
993         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
994
995         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
996
997         * tramp-<ARCH>.c: Use the new helper function.
998
999 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1000
1001         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
1002         trampoline call, which takes a vtable argument.
1003
1004         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
1005         OP_TRAMPCALL_VTABLEs like other calls.
1006
1007         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
1008         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
1009         call.  Implemented a support function which fetches the vtable
1010         from a register set.
1011
1012         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
1013         Implemented a generic class init trampoline, using the
1014         OP_TRAMPCALL_VTABLE opcode.
1015
1016         * mini.c: Implemented static field access when sharing generic
1017         code.  This implies initing the class using the new
1018         OP_TRAMPCALL_VTABLE call.
1019
1020 2007-12-07  Mark Probst  <mark.probst@gmail.com>
1021
1022         * mini.c: Don't compile methods with sharing enabled if their
1023         classes are disabled for sharing.
1024
1025 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1026
1027         * inssel.brg: Add a missing sign extension to the GETCHR and array access
1028         opcodes. Fixes #346563.
1029
1030         * objects.cs: Add a new test.
1031
1032         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
1033
1034         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
1035         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
1036
1037 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
1038
1039         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
1040
1041 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
1042
1043         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
1044         code stream.
1045
1046 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
1047
1048         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
1049
1050         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
1051         optimization in the AOT case.
1052         
1053 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
1054
1055         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
1056         
1057         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
1058
1059         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
1060
1061         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
1062
1063         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
1064         is created by the inlined delegate ctor.
1065
1066         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
1067
1068         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
1069
1070 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * cpu-x86.md: Fix the length of ckfinite.
1073
1074 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
1075
1076         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
1077         
1078         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
1079         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
1080
1081         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
1082
1083         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
1084         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
1085
1086 2007-11-28  Martin Baulig  <martin@ximian.com>
1087
1088         * mini-x86.c
1089         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
1090         after creating the trampoline.
1091
1092 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
1093
1094         * aot-runtime.c (load_aot_module): Check runtime version if needed.
1095
1096         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
1097         the same version.
1098
1099         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
1100         instead of the calling method to help AOT.
1101
1102         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
1103
1104 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
1105
1106         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
1107         is defined.
1108
1109 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
1110
1111         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
1112         
1113         * aot-compiler.c (compile_method): Correct check for generic method definitions.
1114         (encode_method_ref): No need to handle generic method definitions specially.
1115
1116         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1117
1118         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
1119         decode_klass_info.
1120
1121         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
1122         encode_klass_info.
1123         (compile_method): Enable generic sharing.
1124
1125 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
1126
1127         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
1128         (mini_method_compile): Add preliminary support for AOTing shared generic code.
1129
1130         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
1131         generic code.
1132
1133         * mini-trampolines.c: Fix a warning.
1134
1135         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
1136         NEW_PCONST.
1137         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
1138         (generic_class_is_reference_type): Remove unused function.
1139
1140         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
1141         in the generic vtable trampoline case.
1142
1143         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
1144         
1145         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
1146         return an AOT method based on a vtable slot.
1147
1148         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
1149
1150         * mini.c (mini_get_vtable_trampoline): Export this.
1151
1152 2007-11-22  Martin Baulig  <martin@ximian.com>
1153
1154         * debug-debugger.h
1155         (MonoDebuggerInfo): Move `debugger_version' up.
1156
1157 2007-11-22  Martin Baulig  <martin@ximian.com>
1158
1159         * mini-amd64.c
1160         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
1161
1162         * mini-trampolines.c
1163         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
1164         after compiling the method.
1165
1166 2007-11-20  Martin Baulig  <martin@ximian.com>
1167
1168         * debug-mini.c
1169         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
1170         (mono_debugger_remove_breakpoint): Likewise.
1171         (mono_debugger_check_breakpoints): Likewise.
1172
1173         * debug-debugger.c: Implement the new breakpoint interface here.
1174
1175 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
1176
1177         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
1178         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
1179
1180         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
1181
1182 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
1183
1184         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
1185
1186         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
1187         mini.c.
1188
1189         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
1190         mini.c.
1191
1192         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
1193         returning a vtype in a register.
1194
1195         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
1196         here from the arch specific code.
1197
1198         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
1199         mini.c.
1200
1201         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
1202         (mono_arch_emit_prolog): Increment maximum prolog size.
1203
1204         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
1205         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
1206
1207         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
1208         MonoGenericSharingContext.
1209
1210         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
1211         MonoGenericSharingContext. Allocate memory from the cfg mempool.
1212
1213 2007-11-15  Mark Probst  <mark.probst@gmail.com>
1214
1215         * mini.c, mini.h, generic-sharing.c: Functions for producing code
1216         which extract fields out of the runtime generic context.  Full
1217         sharing of the NEWARR opcode.
1218
1219 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
1220
1221         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
1222         --enable-minimal=ssa.
1223
1224 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
1225
1226         * mini-trampolines.c (mono_delegate_trampoline): Update after 
1227         mono_marshal_get_delegate_invoke () signature change.
1228
1229 2007-11-13  Mark Probst  <mark.probst@gmail.com>
1230
1231         * mini.c: Removed the shared context in favor of the generic
1232         sharing context.  Allocate the MonoJitInfo structure with room for
1233         the generic sharing context if it's needed.
1234
1235         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
1236         domain-internals.h now.
1237
1238         * mini-x86.c: Pass the generic sharing context to get_call_info ().
1239
1240         * generic-sharing.c: Several changes for working without a shared
1241         context and instead operating on open types instead.
1242
1243 2007-11-12  David S. Miller  <davem@davemloft.net>
1244
1245        * inssel-sparc.brg: Fix double instruction emit.
1246
1247 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
1248
1249         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
1250         Get/Set/Address methods.
1251         
1252         * mini.c debug-debugger.c mini-trampolines.c: Update after 
1253         mono_marshal_get_delegate_invoke signature change.
1254
1255 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1256
1257         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
1258         This can happens with dynamic methods. Fixes the other bug in #322722.
1259
1260 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1261
1262         * tramp-arm.c (mono_arch_patch_callsite): Support patching
1263         BX call sequence.
1264
1265         * mini-arm.c (arm_patch): Implement patching of BX call
1266         sequence. Fixes one of the bugs in #322722.
1267
1268 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
1269
1270        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
1271        under Linux.  We only need to flush every 32-byte cache line.    
1272
1273 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
1274
1275         * mini.c:
1276         move_basic_block_to_end: Add branches when needed, eventually creating
1277         a new BB.
1278         optimize_branches: added a parameter that tells if it's ok to create
1279         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
1280         and avoid calling move_basic_block_to_end when it's not ok.
1281         Fixes bug 318677.
1282
1283 2007-11-07  Mark Probst  <mark.probst@gmail.com>
1284
1285         * mini.c: Abort inlining call to InitializeArray if something
1286         looks wrong.  Let the icall handle it, which now has proper safety
1287         checks.
1288
1289 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1290
1291         * mini.c (mono_spill_call): add support for soft-float.
1292
1293         * mini.c (mono_method_to_ir): add support for soft-float
1294         to inlined functions that return float.
1295
1296         * mini.c (mono_method_to_ir): add support for soft-float
1297         to cee_stsfld opcode on float fields.
1298
1299 2007-11-05  Geoff Norton  <gnorton@novell.com>
1300
1301         * mini-x86.h: Fix the structure access for X86 Leopard.
1302
1303
1304 2007-11-05  Martin Baulig  <martin@ximian.com>
1305
1306         * mini-trampolines.c
1307         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
1308         after compiling the method to notify the debugger.
1309
1310 2007-11-05  Martin Baulig  <martin@ximian.com>
1311
1312         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
1313
1314 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
1315
1316         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
1317         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
1318
1319 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
1320
1321         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
1322         native-to-managed wrappers.
1323         
1324 2007-11-01  Geoff Norton  <gnorton@novell.com>
1325
1326         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
1327         members.
1328
1329 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
1330
1331         * mini.c, mini-x86.c: when getting back from unmanaged code
1332         to managed via a marshaled delegate we also need to set the
1333         right domain.
1334
1335 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
1336
1337         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
1338         for amd64.
1339
1340 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
1341
1342         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
1343         let the debugger or other external agents to tell the JIT when
1344         a sw breakpoint has been inserted in the code that the JIT needs
1345         to be able to inspect.
1346
1347 2007-10-31  Martin Baulig  <martin@ximian.com>
1348
1349         * debug-debugger.h
1350         (MonoDebuggerInfo): Remove `runtime_class_init'.
1351
1352 2007-10-30  Martin Baulig  <martin@ximian.com>
1353
1354         * debug-mini.h
1355         (mono_debugger_thread_created): Added `MonoThread *' argument.
1356         (mono_debugger_extended_notification): New public method.
1357         (mono_debugger_trampoline_compiled): New public method.
1358
1359         * debug-mini.c
1360         (MonoDebuggerThreadInfo): Added `thread' and
1361         `extended_notifications' fields.
1362
1363         * debug-debugger.c
1364         (debugger_executable_code_buffer): New static variable.
1365
1366         * debug-debugger.h
1367         (MonoDebuggerInfo): Added `executable_code_buffer',
1368         `executable_code_buffer_size', `breakpoint_info_area',
1369         `breakpoint_table' and `breakpoint_table_size'.
1370
1371 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
1372
1373         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
1374         that IP  either is an unused value or the vtable pointer. IMT 
1375         calls use vtable + offset now. Reduced by almost half the size
1376         of IMT entries.
1377
1378 2007-10-26  Jonathan Chambers <joncham@gmail.com>
1379
1380         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
1381         defines to access param registers. Replace long usage with
1382         gsize as sizeof(long) != sizeof(void*) on Win64.
1383
1384         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
1385         on Win64. Fix intrinsic, use _AddressOfReturnAddress
1386         instead of non-existant _GetAddressOfReturnAddress.
1387
1388         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
1389         param registers. Save/restore %rdi and %rsi in MonoLMF.
1390
1391         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
1392         param registers. Modify (throw_exception) signature to take 
1393         %rdi and %rsi on Win64. 
1394
1395         Code is contributed under MIT/X11 license.
1396
1397 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1398
1399         * helpers.c: unlink debugging output files.
1400
1401 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
1402
1403         * mini.c: Move mono_create_ftnptr () to object.c.
1404
1405 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1406
1407         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
1408         optional. This function can now be used to disassemble code generated
1409         outside the JIT such as trampolines and IMT thunks.
1410
1411         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
1412
1413         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
1414         vtable pointer from a ldr instruction.
1415
1416         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
1417         new IMT call sequence.
1418
1419         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
1420         call sequence for interface invocations.
1421
1422         * mini-arm.c (mono_arch_emit_imt_argument): added, required
1423         for imt support. This function is empty since IMT on ARM requires no
1424         special handling on the IR side.
1425
1426         * mini-arm.c (mono_arch_find_imt_method): added, required for
1427         imt support.
1428
1429         * mini-arm.c (mono_arch_find_this_argument): added, required
1430         for imt support.
1431
1432         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
1433         a ldr instruction to load a value stored in the code stream.
1434
1435         * mini-arm.c (mono_arch_build_imt_thunk):added, required
1436         for imt support.
1437
1438
1439 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
1440
1441         * mini.c (mini_init): Install the jump trampoline callback.
1442
1443 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1444
1445         * mini-trampolines.c: handle synchronized methods with the common
1446         vtable trampoline (bug #335601).
1447
1448 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
1449
1450         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
1451
1452         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
1453         64 bit platforms.
1454
1455         * mini-ia64.h mini-ia64.c: Add support for IMT.
1456
1457         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
1458         prolog. Fixes #331958.
1459
1460 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
1461
1462         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
1463
1464 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1465
1466         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
1467         trampoline.
1468
1469 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1470
1471         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
1472         trampoline.
1473
1474 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
1475
1476         * mini-x86.c, mini-x86.h: x86 support for the common vtable
1477         trampoline.
1478
1479 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
1480
1481         * mini-trampolines.c: changed the magic rampoline to understand
1482         the common vtable trampoline method: the method to invoke is
1483         determined by the vtable displacement of the call.
1484
1485 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1486
1487         * mini.c, mini.h: register the common vtable trampoline if the
1488         architecture supports it.
1489
1490 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1491
1492         * cpu-amd64.md: use the correct max length for tls_get.
1493
1494 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
1495
1496         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
1497         CEE_STELEM_ANY. Fixes #333696.
1498
1499 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
1500
1501         * exceptions-x86.c: provide more graceful handling of the case where
1502         we followed a bogus function pointer from managed code (bug #332866).
1503
1504 2007-10-11  Mark Probst  <mark.probst@gmail.com>
1505
1506         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
1507         replaces the generic_shared flag and will carry more information
1508         in the future.
1509
1510         * generic-sharing.c: Added mini_type_stack_size() which allows
1511         allows open types if given a generic sharing context.
1512         mini_get_basic_type_from_generic() takes a
1513         MonoGenericSharingContext* instead of a MonoCompile* now.
1514
1515         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
1516         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
1517         mini-sparc.c, mini-x86.c: Trivial changes required by the two
1518         changes above.  Just passing arguments through to the right
1519         places.
1520
1521 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1522
1523         * mini-arm.c: unify the call emission to emit_code_seq().
1524
1525 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
1526
1527         * tramp-arm.c: reduced the trampoline size.
1528
1529 2007-10-10  Mark Probst  <mark.probst@gmail.com>
1530
1531         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
1532         variable handling out of arch-specific code.
1533
1534 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
1535
1536         * mini-arm.c: implemented fast delegate dispatch.
1537
1538 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
1539
1540         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
1541         that fp elimination is turned off if the space required by locals is too
1542         big. Fixes #331958.
1543
1544 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1545
1546         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
1547         ARM to the new style trampoline.
1548
1549 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
1550
1551         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
1552
1553         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
1554
1555 2007-10-09  Martin Baulig  <martin@ximian.com>
1556
1557         * debug-debugger.h
1558         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
1559         `field_info_offset_offset'.     
1560
1561 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
1562
1563         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
1564         removed more internal usage of the r11 register and made it available
1565         to the register allocator.
1566
1567 2007-10-08  Mark Probst  <mark.probst@gmail.com>
1568
1569         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
1570         when sharing generics and treat type variables as references.
1571
1572 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1573
1574         * mini-ppc.c: started removing the internal uses of register r11
1575         to eventually allow the register allocator to manage it as an
1576         additional available register.
1577
1578 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
1579
1580         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
1581
1582 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
1583
1584         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
1585         specific trampolines as they are not performance critical as a jump
1586         target (maybe align as before only for AOT code?). This saves about
1587         200 KB of native code on x86 for monodevelop startup.
1588
1589 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1590
1591         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
1592         monodevelop startup.
1593
1594 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
1597
1598         * mini-sparc.h mini-sparc.c: Implement IMT support.
1599
1600         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
1601         its smaller and doesn't clobber sparc_g1.
1602
1603         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
1604
1605 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1606
1607         * mini-ppc.c: optimized the size of the IMT thunks a bit.
1608
1609 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
1610
1611         * mini-ppc.c: implemented fast delegate invocation.
1612
1613 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
1614
1615         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
1616
1617 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1618
1619         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
1620         code to the new style trampoline in preparation for IMT support.
1621
1622 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1623
1624         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
1625         systems already. This also reduces the specific trampiline sizes and
1626         prepares for the use of r12 as the IMT identifier register.
1627
1628 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1629
1630         * mini-mips.h: endianess fix (simplified from a patch by
1631         Thomas Kunze <thommy@tabao.de>, bug #323737).
1632
1633 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1634
1635         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
1636         to access ucontext fields and enable netbsd support
1637         (partially from Magnus Henoch <mange@freemail.hu>).
1638
1639 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1640
1641         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
1642         use the preprocessor from the CPP env var if it is set.
1643
1644 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1645
1646         * mini-trampolines.c: fixed an assertion and moved it earlier in the
1647         code, before interface_offset gets used.
1648
1649 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
1650
1651         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
1652         mono_class_setup_vtable () before accessing klass->vtable.
1653
1654 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
1655
1656         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
1657         hackish.
1658
1659 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
1660
1661         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
1662         IMT slots (this saves hundreds of KB of memory in programs like
1663         IronPython and Monodevelop).
1664
1665 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
1666
1667         * mini.c: print the delegate counter.
1668
1669 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
1670
1671         * mini-x86.c: make it easier to enable the debugging code for IMT
1672         slots.
1673
1674 2007-09-28  Martin Baulig  <martin@ximian.com>
1675
1676         * debug-debugger.h
1677         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
1678         `mono_method_klass_offset' and `mono_method_token_offset'.
1679
1680 2007-09-20  Mark Probst  <mark.probst@gmail.com>
1681
1682         * mini.c: First generics sharing implementation.  Can only share
1683         in very simple cases.  If sharing doesn't work it falls back to
1684         dedicated compilation.
1685
1686         * mini.h: Flag in MonoCompile to specify whether generic
1687         compilation is shared.  Flags enum for marking which generic inst
1688         of a context is used.  Prototypes for helper functions.
1689
1690         * generic-sharing.c: Helper functions for generic method sharing.
1691
1692         * optflags-def.h: Optimization flag (gshared) for enabling generic
1693         method sharing added.
1694
1695         * Makefile.am: generic-sharing.c added.
1696
1697 2007-09-19 Daniel Nauck <dna@mono-project.de>
1698
1699         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
1700
1701 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
1702         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
1703         fixes bug 325507.
1704
1705 2007-09-19  Martin Baulig  <martin@ximian.com>
1706
1707         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
1708         mono_debug_cleanup() is now part of mono_cleanup().
1709
1710 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1711
1712         * driver.c (mono_main): Fix a warning.
1713
1714 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
1715
1716         * aot-compiler.c: Optimize various parts when processing large assemblies.
1717         Fixes ##325568.
1718
1719         * mini.c (mono_patch_info_hash): Improve hash function.
1720
1721 2007-09-14  Jonathan Chambers <joncham@gmail.com>
1722
1723         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
1724         
1725         Code is contributed under MIT/X11 license.
1726
1727 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1728
1729         * mini.c (mini_init): Fix a leak.
1730
1731         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
1732
1733 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
1734
1735         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
1736
1737 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
1740
1741 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
1744         variance tests.
1745
1746         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
1747
1748         * mini.c (handle_alloc): Enable managed allocators in AOT code.
1749
1750         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
1751
1752         * aot-runtime.c (decode_patch_info): Ditto.
1753
1754 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1755
1756         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
1757         static case. Cache delegates in architecture specific code, 
1758         based on number of parameters.
1759         
1760         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
1761         in architecture specific code, based on number of parameters.
1762         
1763         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
1764         caching happen in architecture specific code now.
1765         
1766         Code is contributed under MIT/X11 license.
1767
1768 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1769
1770         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
1771         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
1772         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
1773
1774         Code is contributed under MIT/X11 license.
1775
1776 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
1777         * mini.c: (mono_thread_abort) Fixed bug #82416.
1778
1779 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1780
1781         * mini.: hook the new managed GC allocation feature into the JIT.
1782
1783 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
1784
1785         * mini.c: implementation for the new runtime tls opcode.
1786
1787 2007-09-11  Martin Baulig  <martin@ximian.com>
1788
1789         * debug-debugger.h
1790         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
1791         `mono_method_inflated_offset'.
1792
1793 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
1794
1795         * driver.c mini.h mini.c: Add a new devel command line option for injecting
1796         async exceptions into a method.
1797
1798         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
1799         purpose of testing whenever the unwinder works at every instruction.
1800
1801 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
1802
1803         * mini.c: check accessibility of method used in ldftn (fixes
1804         bug #82635).
1805
1806 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
1809
1810         * inssel.brg: Fix a warning.
1811
1812 2007-09-03  Martin Baulig  <martin@ximian.com>
1813
1814         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
1815         now takes the `main_method' as argument.
1816
1817 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
1818
1819         * cpu-sparc.md (endfilter): Add missing src1:i argument.
1820
1821 2007-08-30  Jonathan Chambers <joncham@gmail.com>
1822
1823         * driver.c: include the cil-coff.h header on Windows.
1824         
1825         Code is contributed under MIT/X11 license.
1826
1827 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
1828
1829         * mini.c, driver.c: don't include the cil-coff.h header.
1830
1831 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1832
1833         * mini.c: flag places that needs fixes fo soft-float support.
1834
1835 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
1836
1837         * mini.h, inssel-float.brg: fix soft-float constant loads on big
1838         endian systems (partially from Dean Jenkins, bug #81924).
1839
1840 2007-08-28  Mark Probst  <mark.probst@gmail.com>
1841
1842         * mini.c (check_linkdemand): Remove embedded reference object in
1843         call to LinkDemandSecurityException.
1844         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
1845         with an IntPtr instead of a reference object.
1846
1847 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1848
1849         * mini.c (handle_initobj): Handle alignment properly.
1850
1851         * inssel.brg (mini_emit_memset): Ditto. 
1852
1853         * inssel.brg (mini_emit_memcpy): Ditto. 
1854
1855         * inssel-sparc.brg: Ditto.              
1856
1857         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
1858
1859 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
1860
1861         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
1862         exceptions raised in unmanaged code. Fixes part of #82594.
1863
1864 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1865
1866         * mini.c (mono_method_to_ir), declsec.c
1867         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
1868
1869 2007-08-22  Martin Baulig  <martin@ximian.com>
1870
1871         * debug-mini.h
1872         (MonoDebuggerThreadInfo): New typedef.
1873         (mono_debugger_thread_table): New global variable.
1874         (mono_debugger_thread_created): New public function.
1875         (mono_debugger_thread_cleanup): New public function.
1876
1877         * debug-debugger.h
1878         (MonoDebuggerInfo):
1879         - removed `get_current_thread' and `lookup_assembly'.
1880         - removed `data_table'.
1881         - added `thread_table'.
1882
1883         * mini.c
1884         (mono_thread_start_cb): Call mono_debugger_thread_created().
1885         (mono_thread_attach_cb): Likewise.
1886         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
1887         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
1888         initial domain.
1889
1890         * driver.c (mono_main): Move mono_debug_init() up, before calling
1891         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
1892
1893 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1894
1895         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
1896         together when passing several arguments of type double (gives a small
1897         speedup and saves a few bytes of generated code).
1898
1899 2007-08-20  Jb Evain  <jbevain@novell.com>
1900
1901         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
1902
1903 2007-08-20  Jb Evain  <jbevain@novell.com>
1904
1905         * mini.c (mono_method_to_ir): throw MethodAccessException
1906         and FieldAccessException instead of InvalidProgramException.
1907
1908 2007-08-20  Mark Probst  <mark.probst@gmail.com>
1909
1910         * mini.c: CoreCLR security checks.
1911
1912         * mini.h: Removed MonoSecurityMode (moved to
1913         metadata/security-manager.h) and mono_security_mode global var
1914         (replaced by set/get functions in security-manager.h).
1915
1916         * driver.c: Added "core-clr-test" security mode for testing.  Used
1917         set-function for setting security mode.
1918
1919 2007-08-17  Mark Probst  <mark.probst@gmail.com>
1920
1921         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
1922         the new jit_info_table.
1923
1924         * driver.c: Test code for the new jit_info_table (enabled by the
1925         define MONO_JIT_INFO_TABLE_TEST).
1926
1927 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
1930         detection of call <REG> instruction sequence. Fixes build on freebsd.
1931
1932 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * mini-exceptions.c: Fix a warning.
1935
1936 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
1939         stack overflow handling code on amd64 too.
1940
1941         * mini-exceptions.c (mono_setup_altstack): Make this use 
1942         mono_thread_get_stack_bounds ().
1943
1944         * mini-x86.h: Disable sigaltstack on solaris x86.
1945
1946 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
1947
1948         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
1949
1950 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
1951
1952         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
1953
1954 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
1957
1958         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
1959
1960 2007-08-03  Neale Ferguson <neale@sinenomine.net>
1961
1962         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
1963         due to alignment.
1964
1965 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
1966
1967         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
1968         to be emitted (bug #82281).
1969
1970 2007-08-01  Martin Baulig  <martin@ximian.com>
1971
1972         Merged the `debugger-dublin' branch.
1973
1974         * debug-debugger.h (MonoDebuggerInfo):
1975         Removed the `old_*' compatibility entries.
1976         Added `debugger_version' and `data_table'.
1977         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
1978         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
1979
1980         * debug-mini.c
1981         (MiniDebugMethodBreakpointInfo): Add `address_list'.
1982         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
1983         instead of a `gconstpointer'.
1984         (mono_debugger_insert_method_breakpoint): Return a
1985         `MonoDebugMethodAddressList *'.
1986
1987 2007-06-28  Martin Baulig  <martin@ximian.com>
1988
1989         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
1990
1991 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
1992
1993         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
1994         __builtin_frame_address () since it is broken on older gcc versions.
1995
1996 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1997
1998         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
1999         on the stack overflow handling and made the managed stack overflows
2000         catchable in most cases using soft guard pages.
2001         * exceptions-x86.c: added code to restore the protection in the soft
2002         guard pages at the end of exception handling.
2003
2004 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2005
2006         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
2007
2008 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2009
2010         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
2011         exception handling.
2012
2013 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
2014
2015         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
2016         signal handling support until it has been ported to the new mechanism.
2017         * mini.c: fixed stack overflow detection and use the new
2018         architecture code  to handle signals on the altstack.
2019
2020 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2021
2022         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
2023         stack overflows on the alt stack.
2024
2025 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
2026
2027         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
2028         stack overflows on the alt stack.
2029
2030 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
2031
2032         * exceptions-ppc.c: cleanup preparing for altstack support.
2033
2034 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2035
2036         * exceptions-arm.c: cleanup preparing for altstack support.
2037
2038 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2039
2040         * mini.c (print_jit_stats): Output hazard pointer stats.
2041
2042 2007-07-26  Mark Probst  <mark.probst@gmail.com>
2043
2044         * driver.c, mini.c: Replaced security mode flags with a single
2045         enum variable.
2046
2047 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2048
2049         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
2050
2051 2007-07-25  Mark Probst  <mark.probst@gmail.com>
2052
2053         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
2054         (which doesn't do anything yet) for activating Core CLR
2055         (Silverlight) security.
2056
2057 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2058
2059         * mini-codegen.c: work around a possible gcc bug on arm.
2060
2061 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2062
2063         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
2064         message for platforms that don't support AOT compilation.
2065
2066 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
2067
2068         * mini.h, mini.c, driver.c: temporary smcs hack.
2069
2070 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
2071
2072         * mini-arm.h, mini-arm.c: arm EABI fixes.
2073
2074 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2075
2076         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
2077         case.
2078
2079         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
2080         trampolines taking a method argument.
2081
2082         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
2083
2084         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
2085         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
2086
2087         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
2088         JIT compilation throws an exception. Fixes #82050.
2089
2090 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2091
2092         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
2093         with the MONO_EXCEPTION_ defines.
2094
2095 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
2096
2097         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
2098         #82117.
2099         
2100         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
2101         the cause of an assertion.
2102
2103 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
2104
2105         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
2106         removed.
2107
2108 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2109
2110         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
2111         assert. Should fix #82103.
2112
2113 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2114
2115         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
2116         here too. Fixes #82095.
2117
2118         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
2119         addresses.
2120
2121         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
2122
2123         * mini-amd64.h: Enable IMT for amd64.
2124         
2125         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
2126
2127 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
2128
2129         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
2130
2131 2007-07-12  Mark Probst  <mark.probst@gmail.com>
2132
2133         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
2134         as soon as check_linkdemand sets an exception_type.
2135
2136 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2137
2138         * mini-x86.c: fixed offsets for IMT call sequence.
2139         * mini-x86.h: enable IMT again.
2140
2141 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * trace.c (mono_trace_enter_method): Decode MonoType too.
2144
2145         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
2146
2147         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
2148
2149         * mini-amd64.c: Add preliminary IMT implementation.
2150         
2151 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
2152
2153         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
2154         understand the new IMT-base interface invocation (thanks to
2155         Daniel Nauck for the report and the remote debugging session).
2156
2157 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2158
2159         * mini-x86.c: size and speed optimizations for the IMT bsearch.
2160
2161 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2162
2163         * Makefile.am (aotcheck): Make this actually use the AOTed code.
2164
2165 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
2166
2167         * mini-trampolines.c: implement AOT IMT support.
2168         * mini-x86.h: enable IMT support for wider testing.
2169
2170 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * inssel.brg (emit_imt_argument): Add aot support here.
2173
2174         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
2175
2176 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2177
2178         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
2179         of the IMT implementation, partially from massi, with my
2180         implementation of the bsearch sequence. Disabled by default until
2181         the AOT code is implemented.
2182
2183 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2184
2185         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
2186
2187         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
2188
2189 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2190
2191         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
2192         arch-independent IMT JIT code from Massimiliano
2193         Mantione (massi@ximian.com) with small cleanups from me.
2194
2195 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
2196
2197         * Makefile.am: fix svn invocation to get the svn revision to be
2198         independent of the local language (build fix).
2199
2200 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2201
2202         * mini.c (inline_method): Reset cfg->exception_type if the
2203         inlining is aborted.  Fixes: 82049.
2204
2205 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
2206
2207         * mini.c: remove assert from exception handling code when exception_ptr
2208         is not set.
2209
2210 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2211
2212         * mini.c (mono_codegen): Add an assert.
2213
2214         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
2215         enter and leave code.
2216         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
2217
2218 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2219
2220         * mini-ppc.c: fixed memory corruption for localloc(0)
2221         (bug #81852).
2222
2223 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2224         
2225         * mini.c: Fix warnings.
2226
2227 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
2228
2229         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
2230         to emit better double->int conversions.
2231
2232 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2233
2234         * mini.c: the provided Min/Max optimizations are valid for unisgned
2235         ints.
2236
2237 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
2238
2239         * 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
2240
2241 2007-06-28  Miguel de Icaza  <miguel@novell.com>
2242
2243         * mini.c (mono_running_on_valgrind): Add support for reporting the
2244         method and  its boundaries to valgrind.
2245
2246 2007-06-28  Martin Baulig  <martin@ximian.com>
2247
2248         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
2249
2250 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
2251
2252         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
2253
2254         * generic.2.cs: Add new test case.
2255
2256 2007-06-25  Martin Baulig  <martin@ximian.com>
2257
2258         Merged the `debugger-dublin' branch.
2259
2260         * debug-mini.c
2261         (mono_debugger_insert_method_breakpoint): New public method.
2262         (mono_debugger_remove_method_breakpoint): Likewise.
2263         (mono_debugger_check_breakpoints): New static method.
2264         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
2265
2266         * debug-debugger.h (MonoDebuggerInfo):
2267         Renamed (to keep backward compatibility in the vtable):
2268         `insert_breakpoint' -> `old_insert_breakpoint'.
2269         `remove_breakpoint' -> `old_remove_breakpoint'.
2270         `create_string' -> `old_create_string'.
2271         `lookup_class' -> `old_lookup_class'.
2272         `lookup_type' -> removed; changed into a dummy field.
2273         `lookup_assembly' -> `old_lookup_assembly'.
2274         Added (same functionality, but different signature):
2275         `create_string', `lookup_class', `lookup_assembly'
2276         Added new:
2277         `get_method_addr_or_bpt', `remove_method_breakpoint',
2278         `runtime_class_init'.
2279
2280         * debug-debugger.c: Merged the `debugger-dublin' branch.
2281
2282 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
2283
2284         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
2285         well.
2286         (peephole_pass): Likewise.
2287
2288 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
2289
2290         * driver.c: hopefully make setaffinity work also for ancient
2291         versions of linux.
2292
2293 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
2294
2295         * driver.c : win32 build fix.
2296
2297 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
2298
2299         * driver.c: check for the MONO_NO_SMP env var and bind to a single
2300         processor if it is set.
2301
2302 2007-06-21  Martin Baulig  <martin@ximian.com>
2303
2304         * debug-mini.h: New file.
2305
2306         * debug-mini.c
2307         (mono_debugger_insert_breakpoint_full): Moved here from
2308         ../metadata/mono-debug-debugger.c.
2309         (mono_debugger_remove_breakpoint): Likewise.
2310         (mono_debugger_breakpoint_callback): Likewise.
2311
2312 2007-06-15  Raja R Harinath  <rharinath@novell.com>
2313
2314         * jit-icalls.c (mono_helper_compile_generic_method): Update to
2315         changes in MonoGenericClass.
2316
2317 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
2318
2319         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
2320
2321 2007-06-14  Raja R Harinath  <rharinath@novell.com>
2322
2323         * jit-icalls.c (mono_helper_compile_generic_method): Update to
2324         removal of MonoGenericMethod.
2325
2326 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2327
2328         * mini-exceptions.c: hooks for the exception events profiling API.
2329
2330 2007-06-14  Randolph Chung  <tausq@debian.org>
2331
2332         * Makefile.ma: Add hppa target.
2333         * mini-arch.h: Include mini-hppa.h
2334         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
2335         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
2336         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2337
2338 2007-06-14  Randolph Chung  <tausq@debian.org>
2339
2340         * inssel.brg: Add rules for "chained" compare-branch operations so that
2341         a single compare op can affect multiple branches.  Adjust cost for
2342         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
2343         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
2344         cost for some rules so that they can more easily be overridden by
2345         per-arch rules (with fixes from lupus).
2346         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2347
2348 2007-06-13  Randolph Chung  <tausq@debian.org>
2349
2350         * mini-ops.h: Reorder branch ops so that they match the order of the
2351         corresponding CEE_* ops.  The code expects them this way.
2352         Add new ops for HPPA target.
2353         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2354
2355 2007-06-13  Randolph Chung  <tausq@debian.org>
2356
2357         * mini-exceptions.c: Handle cases where the stack grows towards
2358         larger addresses.
2359         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
2360
2361 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2362
2363         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
2364         counter.
2365         * driver.c: explain where a non-matching corlib is found.
2366
2367 2007-06-13  Mark Probst  <mark.probst@gmail.com>
2368
2369         * mini.c (print_jit_stats): Output dynamic code allocation stats.
2370
2371 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
2372
2373         * mini-exceptions.c: Generate a method profile leave event during
2374         an exception to ensure that the profiler gets notified.
2375
2376 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
2377
2378         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
2379         branch.
2380
2381         * cpu-amd64.md: Add long_and/or/xor opcodes.
2382
2383 2007-06-06  Wade Berrier  <wberrier@novell.com>
2384
2385         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
2386         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
2387         length of instruction shr_imm (expected 8, got 10)
2388
2389 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
2390
2391         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
2392
2393 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2394
2395         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
2396         MonoInternalHashTable again (fixed bug in the internal hash table
2397         code).
2398
2399 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2400
2401         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
2402         Have to figure out what makes it crash the SWF regression.
2403
2404 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
2407
2408 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
2409
2410         * mini.c: optimize out the type check when storing null in a
2411         reference array.
2412
2413 2007-06-04  Mark Probst  <mark.probst@gmail.com>
2414
2415         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
2416         MonoInternalHashTable.
2417
2418 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2419
2420         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
2421         signed integer methods.
2422
2423 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
2424
2425         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
2426         permanently since the current approach doesn't work.
2427
2428 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
2429
2430         * inssel.brg (stmt): Only call delegate->invoke_impl if 
2431         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
2432
2433 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
2434
2435         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
2436         the sreg2==rdx case.
2437         
2438         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
2439         account if it contains a rex prefix.
2440         (peephole_pass): Handle OP_FMOVE as well.
2441
2442 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
2443
2444         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
2445         as it causes regressions.
2446
2447 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
2450         static case as well.
2451
2452         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
2453
2454         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
2455         (mono_arch_get_this_arg_from_call): Ditto.
2456
2457         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
2458
2459         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
2460         invoke_impl field.
2461
2462         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
2463         (mono_arch_get_this_arg_from_call): Ditto.
2464
2465         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
2466         
2467         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
2468         try to create optimized invoke code and use that for further invocations. 
2469         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
2470
2471         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
2472
2473 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
2474
2475         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
2476         sealed classes or methods.
2477         *devirtualization.cs: tests for the new optimization
2478
2479 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
2480
2481         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
2482         by the update_volatile () function.
2483
2484 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
2487         require it.
2488
2489         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
2490
2491 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
2492
2493         * mini.c: Add configure checks for header files.
2494         * mini-x86.c: Add configure checks for header files.
2495         * trace.c: Add configure checks for header files.
2496         * aot-runtime.c: Add configure checks for header files.
2497         * aot-compiler.c: Add configure checks for header files.
2498         * driver.c: Add configure checks for header files.
2499         * mini-codegen.c: Add configure checks for header files.
2500         
2501         Code is contributed under MIT/X11 license.
2502
2503 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
2506         icompare_imm -128 + op_iclt. Fixes #81703.
2507
2508 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
2509
2510         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
2511
2512 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
2513
2514         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
2515         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
2516         so that all isinst checks now use "interface_bitmap".
2517
2518 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
2519
2520         * cpu-amd64.md (jmp): Fix a warning.
2521
2522         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
2523
2524         * basic.cs: Add new regression test.
2525
2526         * basic.cs: Remove test which is now in basic-long.cs.
2527
2528         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
2529
2530         * basic-long.cs: Add new test.
2531         
2532 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
2535
2536 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
2537
2538         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
2539
2540         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
2541         places.
2542         
2543         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
2544         throwing code a bit.
2545
2546         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
2547         the exception throwing code a bit.
2548
2549         * mini-x86.c (get_call_info): Allocate result from a mempool.
2550
2551 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
2552
2553         * aot-compiler.c (find_typespec_for_class): Fix the assert.
2554
2555         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
2556
2557         * mini.h (MonoCompile): Add 'token_info_hash' field.
2558
2559         * mini.c: Save token->method associations during compilation so the AOT 
2560         compiler can use it.
2561         
2562         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
2563         which reference generic classes and methods.
2564
2565 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
2568
2569         * aot-compiler.c (compile_method): Fix a typo in a comment.
2570
2571         * aot-runtime.c (decode_cached_class_info): Skip generic types.
2572
2573         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
2574         everything generic.
2575
2576         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
2577
2578 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
2579
2580         * mini.h (MonoCompile): Add 'args' field.
2581
2582         * mini.c (mono_compile_create_vars): Store variables representing the arguments
2583         into cfg->args.
2584
2585         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
2586
2587 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
2588
2589         * mini.c (mono_compile_get_interface_var): Remove this unused function.
2590
2591         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
2592
2593         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
2594         opcodes for some opcodes.
2595
2596         * mini.h *.brg *.c: Use the new opcodes.
2597
2598 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
2599
2600         * mini.h: Bumped aot revision.
2601
2602         * inssel.brg: modified code generation of type checks for interfaces
2603         to use the new "MonoClass.interface_bitmap" instead of the old
2604         "MonoClass.interface_offsets".
2605
2606 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
2607
2608         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
2609
2610 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
2611
2612         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
2613         64 bit platforms.
2614
2615 2007-04-27  Neale Ferguson <neale@sinenomine.net>
2616
2617         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
2618
2619 2007-04-27  Wade Berrier  <wberrier@novell.com>
2620
2621         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
2622         mini.h) to fix build.
2623
2624 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
2627         
2628         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
2629         causes the corlib unit tests to fail.
2630
2631 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
2632
2633         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
2634
2635         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
2636
2637         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
2638         opcodes to the comparison relations.
2639
2640         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
2641         opcodes to their types.
2642         
2643         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
2644
2645         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
2646         it in cfg->arch.cinfo.
2647
2648         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
2649
2650         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
2651         cfg->cil_offset_to_bb.
2652
2653 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
2656         created becase of initlocals.
2657
2658 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
2659
2660         * mini-alpha.c cpu-alpha.md: More alpha port work from 
2661         Sergey Tikhonov <tsv@solvo.ru>.
2662
2663 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
2664
2665         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
2666
2667 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * cpu-s390.md (break): Correct the length of break instruction.
2670
2671 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
2672
2673         * mini.c: fix a couple of soft-float issues and comments.
2674
2675 2007-04-15  Miguel de Icaza  <miguel@novell.com>
2676
2677         * trace.c (is_filenamechar): - is also a filename char.
2678
2679 2007-04-15  Neale Ferguson <neale@sinenomine.net>
2680
2681         * mini-s390.c: Correct checking for enum type in return value processing.
2682
2683 2007-04-14  Raja R Harinath  <rharinath@novell.com>
2684
2685         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
2686         (version.h): Makefile is in the build directory.
2687
2688 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
2689
2690         * mini-amd64.h: fix for assertion failure on Solaris/amd64
2691
2692 2007-04-11  Martin Baulig  <martin@ximian.com>
2693
2694         * mini.c (can_access_member): Fix handling of generic classes;
2695         fixes #81259.
2696
2697 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
2700
2701 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
2702
2703         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
2704
2705 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
2706
2707         * mini-codegen.c: make sure the right spill amount is
2708         used for fp or integer registers (fixes the float_sub_spill() on ppc).
2709
2710 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
2711
2712         * mini-ppc.c: fixes for the fp_branch_nan test.
2713
2714 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
2715
2716         * basic.cs: Comment out new test which still fails on ia64.
2717
2718 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2719
2720         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
2721
2722 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2723
2724         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
2725
2726 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
2727
2728         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
2729         on 64 bit machines. Fixes part of #80738.
2730
2731         * basic.cs: Add regression test.
2732
2733 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
2734
2735         * inssel.brg basic.cs: Revert previous change to fix build.
2736
2737         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
2738         platforms.
2739         
2740         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
2741
2742         * basic.cs: Add new regression test.
2743
2744 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
2745
2746         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
2747         many arguments.
2748
2749 2007-03-16  Neale Ferguson <neale@sinenomine.net>
2750
2751         * cpu-s390x.md: Correct length of break instruction.
2752
2753 2007-03-16  Neale Ferguson <neale@sinenomine.net>
2754
2755         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
2756         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
2757
2758 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
2759
2760         * *.c: Begin WIN64 port.
2761         * mini.c:  Use correct register in profiler.
2762         * mini-amd64.c: No inline assembly on Win64.
2763         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
2764         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
2765         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
2766         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
2767         mono_arch_ip_from_context for Win64.
2768         
2769         Contributed under MIT/X11 license.
2770
2771 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
2772
2773         * exceptions-amd64.c (seh_handler): Ditto.
2774
2775         * exceptions-x86.c (seh_handler): Fix a memory leak.
2776
2777 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
2778
2779         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
2780         mini-s390x.c: fixed peephole optimizations to deal
2781         correctly with 1 and 2 byte reload avoidance.
2782
2783 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
2784
2785         * cpu-s390.md, cpu-s390x.md: update localloc length.
2786
2787 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2788
2789         * cpu-g4.md: added missing descriptions.
2790
2791 2007-03-14  Miguel de Icaza  <miguel@novell.com>
2792
2793         *  Makefile.am: Add support so the tail tests are not executed on
2794         PowerPC as that is a known limitation of the PowerPC port.
2795
2796 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
2797
2798         * runmdesc.bat:  Move to msvc directory.
2799         
2800 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
2801
2802         * runmdesc.bat:  Run executable that was produced by the current
2803         target and sent via an argument.
2804         
2805 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
2808         #81102.
2809
2810         * generics.2.cs: Add regression test.
2811
2812 2007-03-09  Wade berrier  <wberrier@novell.com>
2813
2814         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
2815
2816 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
2819         AOT code depends on this.
2820
2821 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
2822
2823         * mini.c: more precise tracking of types in the eval stack
2824         (part of fix for bug #81044).
2825
2826 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
2827
2828         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
2829
2830         * aot-compiler.c (encode_patch): Remove an obsolete comment.
2831
2832 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
2833
2834         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
2835
2836         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
2837
2838 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
2839
2840         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
2841         a pointer on 64 bit systems. Fixes #80190.
2842
2843         * iltests.il: Add new regression test.
2844
2845 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2846
2847         * mini.c: inline a constant for Environment.IsRunningOnWindows.
2848
2849 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
2850
2851         * trace.c: Remove an erroneous alignemnt check when tracing.
2852           Fixes --trace on OSX86.
2853
2854 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
2855
2856         * mini-$(arch).h: initialize SP in context for all the archs.
2857
2858 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
2859
2860         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
2861         regressions in the thread tests.
2862
2863 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
2866         - fixed implementation of LOCALLOC opcode
2867         - implemented non-un compare for floats
2868         - code cleanup
2869         - implementation of FDIV and CKFINITE opcodes
2870         - fixes for latest mono updates
2871         - additional arch opcodes
2872
2873 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
2874
2875         * Makefile.am: simplify and merge rules for cross-compilation.
2876
2877 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
2878
2879         * local-propagation.c: Actually *apply* the fix for bug 80591...
2880
2881 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2882
2883         * mini-exceptions.c: backuot part of the last change
2884         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
2885
2886 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
2887         * inssel.brg: Fix bug 59286.
2888
2889
2890 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
2891
2892         * mini-exceptions.c: patch from Zoltan to correctly check for
2893         stack boundaries (using the stack register, not the frame register),
2894         fixes bugs #80724, #79717.
2895
2896 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
2897
2898         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
2899         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
2900
2901         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
2902         presence of frame pointer elimination.
2903
2904 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
2905         
2906         * mini-x86.h: NetBSD UCONTEX_REG defines.
2907
2908 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
2909
2910         * inssel-amd64.brg: Fix amd64 build.
2911
2912 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
2913
2914         * mini.h: remove extern to workaround what looks likes gcc bug 26905
2915         on amd64.
2916
2917 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
2918
2919         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
2920         ends.
2921
2922         * mini-<ARCH>.c: Use mono_is_regsize_var ().
2923
2924 2007-01-30 Mark Mason <mason@broadcom.com>
2925
2926            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
2927            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
2928            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
2929            beginning support for CEE_JMP [not quite working yet]
2930            * tramp-mips.c: LMF handling now works
2931         
2932 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
2933
2934         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
2935
2936         * mini.h (NULLIFY_INS): New macro.
2937
2938 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2939
2940         * mini.c: statistical profiler fix for windows, patch
2941         from Tor Lillqvist (tml@novell.com).
2942
2943 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
2944         * local-propagation.c: Fix bug 80591.
2945
2946 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
2947
2948         * Makefile.am: put back the --export-dynamic option as with
2949         the previous gmodule flags (thanks to Robert Jordan).
2950
2951 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
2954
2955         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
2956         simplify and speed up the local register allocator. Also rename some fields
2957         like iassign->vassign.
2958         
2959         * regalloc.c: Remove some functions which are no longer used since their
2960         inlined version is in mini-codegen.c.
2961         
2962         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
2963
2964         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
2965
2966 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
2967
2968         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
2969         narrowing. Fixes #80622.
2970
2971         * iltests.il: Add new regresssion test. 
2972
2973 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
2974
2975         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
2976         debug-debugger.c, debug-debugger.h: warning fixes.
2977         * driver.c: updated copyright year and made it fit in one line.
2978
2979 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
2980
2981         * aot-runtime.c: updated to use mono-dl instead of gmodule.
2982
2983 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
2986
2987         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
2988
2989         * iltests.il: Add new test for bug #80507.
2990
2991 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2992
2993         * mini-arm.h: use soft-float also on vfp for now.
2994
2995 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
2996
2997         * mini.c: fix some more soft-float issues.
2998
2999 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
3002
3003 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
3004         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
3005         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
3006         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
3007
3008 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
3009
3010         * mini-arm.c: typo fix.
3011
3012 2007-01-23  Neale Ferguson <neale@sinenomine.net>
3013
3014         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
3015
3016 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
3017
3018         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
3019         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
3020
3021         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
3022
3023         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
3024
3025         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
3026         
3027         * inssel.brg: Fix a warning.
3028
3029         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
3030
3031         * abcremoval.c ssa.c ssapre.c: Update after this change.
3032         
3033         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
3034
3035         * dominators.c (df_set): Use mono_bitset_union_fast.    
3036
3037 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3038
3039         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
3040         mini-codegen.c: reduce relocations and memory usage for the cpu
3041         description.
3042
3043 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
3044
3045         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
3046
3047         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
3048         to reduce their size.
3049
3050 2007-01-19 Mark Mason <mason@broadcom.com>
3051
3052         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
3053         * mini-mips.c: more configuration macros, support long conditional branches, additional
3054         asserts, fix epilog instrumentation.
3055         * mini-mips.h: use standard stack walk
3056         * cpu-mips.md: increase size of div, rem and conditional branches
3057         
3058 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
3059
3060         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
3061         to cpu spec data.
3062
3063 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
3064
3065         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
3066         (compile_method): Ditto.
3067
3068         * aot-runtime.c (decode_klass_info): Ditto.
3069
3070         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
3071         needed by the code generated by inssel.brg. Also fix a warning.
3072
3073 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
3074
3075         * mini.c: deal with enums that become genericinsts by
3076         being nested in a generic class (bug #79956).
3077
3078 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
3079
3080         * mini.c: match the generic definition to check for
3081         private access with generic types (bug #78431).
3082
3083 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
3084
3085         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
3086         to make life easier for people cross-compiling that insist on not
3087         using scratchbox.
3088
3089 2007-01-17 Mark Mason <mason@broadcom.com>
3090
3091         * inssel-long.brg: patch to deal with mips missing flags
3092         * inssel-long32-mips.brg: implement overflow checks
3093         * insset-mips.brg: implement overflow checks
3094         * mini-mips.h: implement conditional exception handling
3095         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
3096           Remove unused code, minor cleanups.
3097         * exceptions-mips.c: minor cleanups
3098         * mini-ops.h: add mips conditional exception ops
3099         * cpu-mips.md: add mips conditional exception ops
3100
3101         
3102 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
3103
3104         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
3105         to deal with mips missing of flags.
3106
3107 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
3108
3109         * exceptions-ppc.c: execute fault handlers.
3110
3111 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
3112
3113         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
3114
3115 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3116
3117         * mini.c: handle also floating point values in initialize_array.
3118
3119 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3120
3121         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
3122         array initialization and make it conditional on the intrins option.
3123
3124 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3125
3126         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
3127         relocations and put the patch info names close to the enum definition.
3128
3129 2007-01-15 Mark Mason <mason@broadcom.com>
3130
3131         * basic.cs, exceptions.cs: break up large tests to increase debugability.
3132
3133 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3134
3135         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
3136
3137 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3138
3139         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
3140
3141 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3142
3143         * Makefile.am: distribute the mips sources.
3144
3145 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3146
3147         * mini-codegen.h: handle bug #80489 here, by excluding ecx
3148         directly.
3149
3150 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
3151
3152         * cpu-x86.md: back out for now as this triggers other regressions.
3153
3154 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3155
3156         * cpu-x86.md: force src1 and dest regpair for long shift instructions
3157         to eax:edx, so ecx can't get allocated to them (bug #80489).
3158
3159 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
3160
3161         * mini.c, mini-exceptions.c: enabled running fault handlers
3162         (bug #80469).
3163
3164 2007-01-03  Miguel de Icaza  <miguel@novell.com>
3165
3166         * driver.c: If nothing fail, do not use the string "failed",
3167         because it makes it very annoying to view test result logs on the
3168         web. 
3169
3170 2006-12-30  Miguel de Icaza  <miguel@novell.com>
3171
3172         * debug-debugger.c (mono_debugger_main): Rename "main" to
3173         "main_method" to prevent a warning.
3174
3175         Remove a warning for unused field.
3176
3177 2006-12-28  Martin Baulig  <martin@ximian.com>
3178
3179         * debug-debugger.c
3180         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
3181
3182 2006-12-22  Martin Baulig  <martin@ximian.com>
3183
3184         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
3185         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
3186         seperate `.mdb_debug_info' section, so we can access it from the
3187         debugger even if the binary is stripped.
3188
3189         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
3190         from the `.mdb_debug_info' here to prevent the linker from
3191         removing that section.
3192
3193         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
3194         mdb-debug-info64.s.
3195
3196 2006-12-19  Robert Jordan  <robertj@gmx.net>
3197
3198         * mini-x86: enable the code to return small structures in
3199         registers for FreeBSD as well. Fixes bug #80278.
3200         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
3201
3202 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3203
3204         * mini-x86.c: align the stack when calling the profiler
3205         function instrumenting the prolog (on OSX).
3206
3207 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
3208
3209         * mini.c: emit a break opcode where Debugger.Break () is called.
3210
3211 2006-12-13  Miguel de Icaza  <miguel@novell.com>
3212
3213         * mini.c (mono_method_to_ir): Provide useful information on this
3214         assert, to prevent others from debugging like I did.
3215
3216 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3217
3218         * mini.c: enable code which was incorrectly commented
3219         (bug #80235).
3220
3221 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
3222
3223         * mini-x86.c: enable on OSX, too, the code to return small
3224         structures in registers.
3225
3226 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3227
3228         * mini-x86.c: remove the use of the dynamic code manager here, too.
3229
3230 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3231
3232         * mini.h, debug-debugger.c, tramp-*.c: fixed 
3233         mono_debugger_create_notification_function() to use
3234         mono_global_codeman_reserve () instead of a dynamic code manager.
3235
3236 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
3237
3238         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
3239         ves_array_element_address() jit icall and use a generated
3240         managed method instead (which is about 4 times faster for a rank 3
3241         array access).
3242
3243 2006-11-29  Mark Mason  <mason@broadcom.com>
3244
3245         * basic-calls.cs: additional tests for passing
3246         structures as function arguments.
3247
3248 2006-11-29  Mark Mason  <mason@broadcom.com>
3249
3250         * mini-mips.h: disable custom exception handling
3251         * mini-mips.c: throw/rethrow should use jalr to call
3252         exception stubs.  Fixed bug with passing structures
3253         by value. More support for tracing floating point
3254         functions.
3255
3256 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3257
3258         * mini.c: fixed typo in the soft-float ldind.r4 handling
3259         (bug #80086).
3260
3261 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3262
3263         * mini.c, mini.h, driver.c: added --runtime command line
3264         option to select a different runtime than the autodetected one.
3265         * jit.h: added API for embedders to initialize with a specific
3266         runtime version.
3267
3268 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
3269
3270         * mini.c: handle also boxing of r4 values (bug #80024).
3271
3272 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3273
3274         * mini-ppc.c: force indirect calls until we reserve
3275         enough address space for all the generated code.
3276
3277 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
3278
3279         * exceptions-arm.c: workaround bugs in the libc definition
3280         of struct ucontext.
3281
3282 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3283
3284         * inssel.brg: fixes from me and Mark Mason.
3285
3286 2006-11-23  Dick Porter  <dick@ximian.com>
3287
3288         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
3289         semaphore display now we've fixed the initial value
3290
3291 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3292
3293         * inssel.brg: partially revert the last change to fix the build.
3294
3295 2006-11-21  Mark Mason  <mason@broadcom.com>
3296
3297         * inssel.brg: Add and use compare-and-branch macros to support
3298         architectures that do not have condition code registers (ie. MIPS).
3299         * *-mips.{c,brg,md}: Fix copyright statements
3300
3301 2006-11-20  Mark Mason  <mason@broadcom.com>
3302
3303         * Makefile.am: remove mini-codegen.c from list of MIPS sources
3304         * mini.c: Allow GET_CONTEXT to be specified by the arch port
3305         * mini.h: Added declaration for mono_print_ins()
3306         * mini-codegen.c: added ins_spec initializer for MIPS
3307         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
3308         vreg to be virtual and hreg to be non-virtual.
3309         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
3310         is not yet working/implemented correctly.
3311         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
3312         non-static, fixup calls to print_ins() from other parts in the file.
3313
3314 2006-11-20  Mark Mason  <mason@broadcom.com>
3315
3316         * basic-calls.cs: added tests for passing structures as arguments
3317         to calls.
3318
3319 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3320
3321         * inssel-long32.brg: optimize signed division by power of two.
3322
3323 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
3324
3325         * mini-arm.c: added support for interworking with thumb code
3326         (mono must be still be built using the ARM instruction encoding).
3327
3328 2006-11-19  Miguel de Icaza  <miguel@novell.com>
3329
3330         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
3331         verifier has different rules for it.   Fixes a few verifier issues
3332         in the test suite.
3333
3334         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
3335         at the end, so people know what happened.
3336
3337 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3338
3339         * brach-opts.c: in optimize_exception_target() make sure we
3340         are in a catch clause (fixes bug #79871).
3341
3342 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3343
3344         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
3345         more soft-float support fixes.
3346
3347 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
3348
3349         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
3350         that are passed half on the stack and half in registers.
3351
3352 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
3353
3354         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
3355         more mips integration work from Mark E Mason 
3356         <mark.e.mason@broadcom.com>.
3357
3358 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3359
3360         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
3361         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
3362         tramp-mips.c: added sources for the mips port, not
3363         integrated in the build yet. Contributed by
3364         Mark E Mason <mark.e.mason@broadcom.com>.
3365
3366 2006-11-14  Neale Ferguson <neale@sinenomine.net>
3367
3368         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
3369
3370 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3371
3372         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
3373         put the soft-float rules in its own file since it seems to
3374         break s390 compilation.
3375
3376 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
3377
3378         * mini-arm.c: fixed wrnings.
3379
3380 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
3381
3382         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
3383         inssel-arm.brg: ARM support for soft-float.
3384
3385 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
3386
3387         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
3388         loads and stores of 32 bit fp values.
3389
3390 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
3393
3394         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
3395         works. Fixes #79852 and #79463.
3396
3397 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
3398
3399         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
3400         more soft-float support WIP and fixes.
3401
3402 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
3403
3404         * mini-arm.c: some VFP updates.
3405
3406 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
3407
3408         * mini-exceptions.c: 0 is a valid local var offset in some
3409         architectures, don't assert (bug #78508).
3410
3411 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
3412
3413         * exceptions-arm.c: fixed off by one error in stack walk code.
3414
3415 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
3416
3417         * mini.h, mini.c: more precise tracking of type load exceptions.
3418
3419 2006-11-03  Robert Jordan  <robertj@gmx.net>
3420
3421         * Makefile.am: [WIN32] Add monow.exe target.
3422         * driver.c: [WIN32] Don't detach the console when debugging.
3423         Fixes bug #79797.
3424         
3425 2006-10-30  Miguel de Icaza  <miguel@novell.com>
3426
3427         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
3428
3429 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
3430
3431         * aot-compiler.c (emit_method_info): Add a case missed earlier.
3432
3433         * driver.c (mini_regression): Fix --regression with AOT.
3434
3435         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
3436
3437 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
3438
3439         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
3440
3441         * mini-sparc.h: Don't use sigaction on sparc/linux.
3442
3443         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
3444
3445         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
3446
3447         * mini-exceptions.c: Add proper include files for getpid ().
3448
3449 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
3450
3451         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
3452         address instead of a MonoJitInfo* to avoid decoding the exception info for the
3453         method.
3454
3455         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
3456         name cache to reduce its size.
3457
3458         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3459
3460 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
3461
3462         * mini-x86.c: Save/restore the current LMF structure more efficiently using
3463         the mono_lmf TLS variable.
3464
3465         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
3466         trampoline lmf frames.  
3467
3468         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
3469
3470 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
3473         the mono_lmf TLS variable.
3474
3475         * mini-exceptions.c: Access the LMF structure through accessors.
3476
3477         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
3478         variable instead of in jit_tls->lmf.
3479
3480         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
3481         
3482         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
3483         trampoline lmf frames.
3484
3485         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
3486
3487 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
3488
3489        * mini.c trace.c mini-x86.c: Revert these too.
3490         
3491        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
3492        signature change.
3493
3494 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
3495
3496         * genmdesc.c: removed now dead code.
3497
3498 2006-10-09  Robert Jordan <robertj@gmx.net>
3499
3500         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
3501
3502 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
3503
3504         * mini.h: do not leave gaps in the opcode values.
3505
3506 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
3507
3508         * jit-icalls.h: flag functions as internal here, too.
3509
3510 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
3511
3512         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
3513         functions with the internal attribute.
3514
3515 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
3516
3517         * aot-compiler.c: fclose the file descriptor in the profile read loop.
3518
3519 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
3520
3521         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
3522         for soft-float.
3523
3524 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
3525
3526         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
3527         tail calls as on other platforms.
3528
3529         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
3530
3531         * iltests.il: Add a few tailcall tests.
3532
3533 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
3534
3535         * driver.c: fix loop for old compilers (bug #79521).
3536
3537 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
3538
3539         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
3540
3541         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
3542
3543         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
3544         metadata without any code.
3545
3546         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
3547         more precise debugging information using gdb.
3548
3549 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
3550
3551         * inssel-ia64.brg: Make the helper methods static.
3552
3553 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
3554
3555         * inssel-x86.brg: make the helper methods static.
3556
3557 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
3558
3559         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
3560
3561 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
3562
3563         * mini.c: updates for monoburg changes.
3564         * inssel.brg: make a few helper functions static as they should.
3565
3566 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
3567
3568         * Makefile.am: Move mini-codegen.c to common_sources.
3569
3570 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
3571
3572         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
3573         instructions.
3574         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
3575         mini-ppc.h: port to use the common local register allocator.
3576
3577 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * mini.h: Remove the comment too then.
3580
3581 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
3582
3583         * mini.h: put back backend.data which is to be used shortly and
3584         doesn't increase the size of MonoInst. If any 64 bit arch aligned
3585         pointers on 4 byte boundaries it'd have much bigger issues running
3586         and you can ifdef it out anyway.
3587
3588 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3589
3590         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
3591         MonoInst size by 4 bytes on 64 bit machines.
3592
3593 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
3594
3595         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
3596         replacement with more meaningful field names. Arch maintainers, please
3597         check the assigned names are good enough for your arch.
3598
3599 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
3600
3601         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
3602         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
3603
3604 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
3605
3606         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
3607         relocations and memory requirements, put the optimization flags
3608         definitions in their own file.
3609
3610 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
3613
3614         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
3615
3616 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
3617
3618         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
3619
3620 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
3621
3622         * inssel.brg: use the correct function to get the size of an item
3623         in an array, given an element class.
3624         * aot-compiler.c: do not access class->class_size directly.
3625
3626 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
3627
3628         * mini.h, debug-mini.c: added a debugging function to print
3629         info about local variables and arguments in a jitted method.
3630
3631 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
3632
3633         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
3634
3635         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
3636
3637 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
3638
3639         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
3640         inner and outer loops when passing vtypes.
3641
3642 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
3643
3644         * mini-ppc.c: take into account the cpu errata for cache flushing
3645         which caused some random errors (bug #79381).
3646
3647 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
3648
3649         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
3650         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
3651
3652 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
3655         loaded.
3656
3657         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
3658         freebsd ports tree.
3659
3660         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
3661         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
3662
3663         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
3664         displacement.
3665
3666 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
3667
3668         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
3669
3670 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
3671
3672         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
3673         macro does not have to be changed during debugging.
3674
3675         * 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>.
3676
3677         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
3678
3679         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
3680         
3681         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
3682         MONO_ARCH_NO_EMULATE_MUL is defined.
3683
3684         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
3685
3686         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
3687
3688         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
3689
3690         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
3691         
3692 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
3695         stuff to mini-exceptions.c where it is used.
3696
3697         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
3698         setup code, the real one is in mini-exceptions.c.
3699
3700         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
3701         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
3702         some changes from the freebsd ports tree.
3703
3704         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
3705         constants.
3706         
3707         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
3708
3709 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
3710
3711         * mini.c: on Linux, check for /proc to be mounted
3712         (bug# 79351, novell bug#201204).
3713
3714 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
3715
3716         * mini.c: handle cases where pthread_attr_getstack() behaves
3717         incorrectly (bug #78096).
3718
3719 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
3720
3721         * mini-arm.c: support larger stack frames (bug #79272).
3722
3723 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
3724
3725         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
3726
3727         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
3728         tokens.
3729
3730         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
3731         mono_class_from_name () to find a class from its name.
3732
3733         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
3734
3735 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
3738
3739 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
3740
3741         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
3742
3743 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
3746         callinfo->trampoline.
3747
3748         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
3749         fixes #79271.
3750         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
3751         future.
3752
3753 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
3754
3755         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
3756
3757 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
3758
3759         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
3760         stats.method_trampolines, it is already done by the generic trampoline code.
3761
3762         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
3763         
3764 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
3765
3766         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
3767
3768         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
3769
3770         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
3771
3772         * mini.c (print_jit_stats): Print mscorlib mempool size too.
3773         
3774         * mini.c (print_jit_stats): Print new stats.
3775
3776         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
3777
3778 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
3779
3780         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
3781         Address on two dimensional arrays. Fixes #78729.
3782
3783         * mini.h (MonoCompile): Add a 'skip_visibility' field.
3784
3785         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
3786         a method.
3787
3788         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
3789
3790         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
3791         #79130.
3792         
3793         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
3794         a race condition.
3795         (mini_get_ldelema_ins): Ditto.
3796
3797 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
3798
3799         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
3800         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
3801         Fixes #79213.
3802
3803 2006-08-29 Neale Ferguson <neale@sinenomine.net>
3804
3805         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
3806         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
3807
3808         * exceptions-s390x.c: Cosmetic change.
3809
3810         * tramp-s390.c: Fix warning.
3811
3812         * cpu-s390.md: Correct length of mul_imm.
3813
3814 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
3815
3816         * aot-compiler.c: added binary writer with ELF backend
3817         implementation (only on Linux/x86 for now).
3818
3819 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * Makefile.am: Don't run net 2.0 AOT tests.
3822
3823         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
3824         (mono_compile_assembly): Skip net 2.0 assemblies as well.
3825
3826         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
3827
3828 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3829
3830         * aot-compiler.c: simplified and refactored the asm-writing code
3831         to allow different backends.
3832
3833 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
3834
3835         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3836
3837         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
3838         little. Share patches of type TYPE_FROM_HANDLE as well.
3839
3840         * mini.c (mono_patch_info_equal): New helper function.
3841         (mono_patch_info_hash): Ditto.
3842
3843         * aot-compiler.c (emit_method_code): Fix s390 build.
3844
3845         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
3846         is not handled because it is stored as a flag and not as a type ctor. Fixes
3847         #79016.
3848
3849 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
3850
3851         * aot-compiler.c: Fix computation of GOT slot statistics.
3852         
3853         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
3854         Also remove support for not PIC AOT.
3855
3856         * mini.h: Bump AOT file format version.
3857
3858         * objects.cs: Add a test for #78990.
3859
3860         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
3861         (peter.dettman@iinet.net.au). Fixes #79087.
3862
3863         * basic-long.cs: Add a test for the above.
3864
3865 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
3866
3867         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
3868         
3869         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
3870         code somewhat.
3871
3872 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
3873
3874         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
3875         exceptions.
3876
3877 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
3878
3879         * mini.c: Don't verify COM proxy invoke calls
3880         
3881
3882 2006-08-10  Dick Porter  <dick@ximian.com>
3883
3884         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
3885         which process is holding semaphores locked.
3886
3887 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
3888
3889         * mini-ia64.c mini-amd64.c: Fix #79027.
3890
3891         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
3892
3893         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
3894
3895         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
3896         implicit arguments in a vararg call. Fixes #79027.
3897
3898 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
3899
3900         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
3901         (mono_get_array_new_va_signature): Ditto.
3902
3903 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * aot-runtime.c: Call init_plt lazily.
3906
3907         * inssel-long.brg: Fix unsigned long->int conversion.
3908
3909         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
3910
3911         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
3912         that most data is now in the .rss/.data section.
3913
3914 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
3915
3916         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
3917
3918         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
3919
3920         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
3921
3922         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
3923
3924         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
3925         virtual call. Fixes #79010.
3926
3927         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
3928         and use the result as the this argument in the real call.
3929
3930         * generics.2.cs: Add a new test for #79010.
3931         
3932 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
3933
3934         * mini-x86.c: Fix a warning.
3935
3936         * aot-compiler.c: Add a bunch of statistics.
3937
3938         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
3939
3940 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
3941
3942         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
3943
3944 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
3945
3946         * 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>.
3947
3948 2006-07-13  Miguel de Icaza  <miguel@novell.com>
3949
3950         * mini.c (mono_method_to_ir): Obtain the original method in the
3951         CIL stream and use this to perform validation.
3952
3953         Fixed: #78816
3954
3955 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
3956
3957         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
3958         (mono_arch_call_opcode): Ditto.
3959
3960         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
3961         #78826.
3962
3963         * mini.c (mono_patch_info_dup_mp): New helper function.
3964         
3965         * aot-compiler.c (compile_method): Fix some of the memory allocated during
3966         compilation. Fixes #78827.
3967
3968 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
3969
3970         * declsec.c: Use original security informations for
3971           MONO_WRAPPER_MANAGED_TO_MANAGED.
3972
3973 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
3974
3975         * mini.c: Allow Com Interop methods/classes and
3976         don't verify COM wrapper calls
3977         
3978
3979 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
3980
3981         * inssel-long32.brg: Fix long->i4 checked conversion.
3982
3983         * exceptions.cs: Add a test for the above.
3984
3985 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
3986
3987         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
3988
3989         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
3990         leaks.
3991
3992         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
3993         #78775.
3994
3995 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
3996
3997         * mini.c: Fix solaris/x86 exception handling.
3998
3999         * Makefile.am: Get rid of $(ICU_LIBS).
4000
4001 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
4002
4003         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
4004         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
4005         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
4006
4007         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
4008
4009         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
4010         this function causes a SIGSEGV.
4011
4012 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
4013
4014         * mini.c: Remove unused solaris/x86 includes.
4015
4016 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
4017
4018         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
4019
4020 2006-06-20  Jb Evain  <jbevain@gmail.com>
4021
4022         * cpu-g4.md: fix max length of start_handler instruction.
4023
4024 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
4025         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
4026
4027 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
4028         * ssa.c: Fixed bug 78653 for SSA based deadce.
4029         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
4030         MonoInst.flags, used in SSA based deadce.
4031         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
4032         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
4033
4034 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4035
4036         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
4037         it can end up using non executable memory on ppc64 systems
4038         running ppc32 userspace (fix from Johannes Berg).
4039
4040 2006-06-14  Dick Porter  <dick@ximian.com>
4041
4042         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
4043         4.1.1
4044
4045 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
4046         * mini.c: Made so that inline is locally disabled if it would
4047         trigger a .cctor, because too many apps depend on this behavior
4048         (which seems to be also the one of the MS CLR).
4049
4050 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
4051
4052         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
4053         No idea why this worked before.
4054
4055         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
4056         which branch to outer exception clauses since they could skip the
4057         inner finally clauses. Fixes #78633.
4058
4059         * exceptions.cs: Add a test for the above.
4060
4061         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
4062         Fixes #78629.
4063
4064         * iltests.il: Add a test for the above.
4065
4066 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
4067
4068         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
4069         after the end of a try bblock, to prevent asserts in mini_method_compile ().
4070
4071         * iltests.il: Add a test for the above.
4072
4073 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
4074
4075         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
4076         
4077         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
4078         methods as instrinsics.
4079
4080 2006-06-09  Wade Berrier <wberrier@novell.com>
4081
4082         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
4083         (simple-cee-ops.h ssapre-mini-ops.h)
4084
4085 2006-06-09  Neale Ferguson <neale@sinenomine.net>
4086
4087         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
4088         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
4089         instruction).
4090         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
4091         * cpu-s390x.md: Fix max. length values for a couple of instructions.
4092
4093 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
4094
4095         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
4096
4097 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
4098
4099         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
4100         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
4101         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
4102         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
4103         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
4104         of opcodes, so that bug 78549 should not happen again.
4105         * ssapre.c: Updated to use the renamed files.
4106
4107 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
4108
4109         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
4110         in OP_ATOMIC_EXCHANGE_I4.
4111
4112 2006-06-07  Wade Berrier <wberrier@novell.com>
4113
4114         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
4115         in mono_debugger_create_notification_function)
4116
4117 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
4118
4119         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
4120         
4121         * mini.c (type_from_stack_type): Disable some changes which do not
4122         seem to work.
4123
4124         * driver.c: Reenable opts.
4125
4126         * mini.h (MonoStackSlot): New structure to keep track of the verification state
4127         of the evaluation stack.
4128         
4129         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
4130         evaluation stack trace at entry to the bblock.
4131
4132         * mini.c (merge_stacks): New function to perform verification of stack merges.
4133         Turned off by default.
4134
4135         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
4136         STACK_MP.
4137         
4138 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
4139
4140         * local-propagation.c: Fixed bug 78549.
4141
4142 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
4143
4144         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
4145
4146 2006-06-02  Miguel de Icaza  <miguel@novell.com>
4147
4148         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
4149         tramp-arm.c, tramp-ia64.c
4150         (mono_debugger_create_notification_function): Update signature to
4151         new signature and use new protocol for creating the notification
4152         function.  
4153
4154         Should fix the build.
4155
4156 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
4157
4158         * exceptions-ppc.c (mono_jit_walk_stack)
4159         (ves_icall_get_frame_info): Fix the build
4160
4161 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
4162
4163         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
4164
4165 2006-05-31  Raja R Harinath  <rharinath@novell.com>
4166
4167         * il2tests.2.il: New file for generics CIL tests.  Add test for
4168         #78019.
4169         * Makefile.am: Update.
4170
4171         Fix #78019
4172         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
4173         to nullable types.
4174
4175 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
4176
4177         * aliasing.c: Fixed bug 78311.
4178
4179 2006-05-29  Martin Baulig  <martin@ximian.com>
4180
4181         * mini-exceptions.c (mono_find_jit_info): When computing the
4182         native offset, check whether we're actually inside the method's
4183         code; call mono_debug_print_stack_frame() to format the frame.
4184         (ves_icall_System_Exception_get_trace): Call
4185         mono_debug_print_stack_frame() to format the stack frame.
4186         (ves_icall_get_trace): Update to the new debugging API.
4187         (mono_jit_walk_stack_from_ctx): Likewise.
4188         (ves_icall_get_frame_info): Likewise.
4189
4190         * mini.c (get_method_from_ip): Use the new debugging API.
4191         (mono_print_method_from_ip): Likewise.
4192
4193         * exceptions-ppc.c
4194         (mono_jit_walk_stack): Use the new debugging API.
4195         (ves_icall_get_frame_info): Likewise.   
4196
4197 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
4200
4201 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
4202
4203         * mini.c: Added "limitator" to inline for debugging.
4204
4205 2006-05-24  Martin Baulig  <martin@ximian.com>
4206
4207         * debug-debugger.c (mono_debugger_init): Create a private,
4208         malloc()-based code manager for the notification function and
4209         intentionally leak it on exit.  This fixes the crash-on-exit race
4210         condition.
4211
4212         * tramp-amd64.c
4213         (mono_debugger_create_notification_function): Added
4214         `MonoCodeManager *' argument.
4215
4216         * tramp-x86.c
4217         (mono_debugger_create_notification_function): Added
4218         `MonoCodeManager *' argument.
4219
4220 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
4221
4222         * aliasing.c: Fixed 64 bit issue.
4223         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
4224         default since all known bugs are fixed (one more time!).
4225
4226 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4227
4228         * mini.c: write barrier support.
4229
4230 2006-05-23  Martin Baulig  <martin@ximian.com>
4231
4232         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
4233         check at the top of the file.
4234
4235 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
4236
4237         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
4238         reverting changes without reason and without changelog entries.
4239
4240 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
4241
4242         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
4243         to a few opcodes. Fixes #78439.
4244
4245         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
4246         consistency with other archs.
4247
4248         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
4249
4250 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4251
4252         * debug-debugger.c: fix the build.
4253
4254 2006-05-17  Martin Baulig  <martin@ximian.com>
4255
4256         * debug-debugger.c
4257         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
4258         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
4259         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
4260         (debugger_attach): Call GC_mono_debugger_add_all_threads().
4261
4262 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
4263
4264         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
4265
4266 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
4267
4268         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
4269         MONO_TYPE_GENERICINST.
4270         
4271         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
4272         MONO_TYPE_GENERICINST.
4273
4274 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
4275
4276         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
4277         #78325.
4278
4279 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
4280
4281         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
4282         mempool.
4283         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
4284
4285 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
4286
4287         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
4288         mono_trace_cleanup ().
4289
4290         * iltests.il: Fix problem with the newly added test.
4291
4292         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
4293         due to register constraints, free up the previous hreg. Fixes #78314.
4294
4295         * iltests.il: Add new test for #78314.  
4296
4297         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
4298         Interlocked.Add. Fixes #78312.
4299
4300         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
4301         
4302 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
4303
4304         * inssel.brg (mini_emit_virtual_call): Fix a warning.
4305
4306 2006-05-05  Martin Baulig  <martin@ximian.com>
4307
4308         * debug-mini.c (mono_debug_open_block): New method.
4309
4310         * mini-amd64.c
4311         (mono_arch_output_basic_block): Call mono_debug_open_block() at
4312         the beginning of each basic block.
4313
4314         * mini-x86.c
4315         (mono_arch_output_basic_block): Call mono_debug_open_block() at
4316         the beginning of each basic block.
4317
4318 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
4319
4320         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
4321         default until I understand why they break the build on amd64.
4322
4323 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
4324
4325         * mini.c (mini_cleanup): Call mono_cleanup ().
4326
4327         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
4328         errors.
4329
4330 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
4331
4332         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
4333         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
4334         default since all known bugs are fixed, and I cannot reproduce bug
4335         77944... I'm asking Matt Hargett to test again after this commit.
4336
4337 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
4338
4339         * mini-codegen.c: Fixed typo that thrashed inline.
4340
4341 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
4342
4343         * dominators.c (compute_dominators): Avoid using a worklist since
4344         it is not correct in some cases. Instead, iterate over all bblocks as
4345         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
4346
4347 2006-04-28  Miguel de Icaza  <miguel@novell.com>
4348
4349         * mini.c (mono_jit_compile_method_inner): Use
4350         mono_prepare_exception_from_error that resets the value
4351         internally.
4352
4353 2006-04-27  Miguel de Icaza  <miguel@novell.com>
4354
4355         * mini.c: Move the mini_loader_error_to_exception to metadata. 
4356         
4357 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
4358
4359         * aliasing.c: Fixed bug 78210.
4360
4361 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
4362
4363         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
4364         default until all their problems (or the ones they trigger) are fixed.
4365
4366 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
4367
4368         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
4369         
4370         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
4371         as loaded only after resolving patches since that could invoke the same method.
4372
4373         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
4374
4375         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
4376         functions.
4377
4378         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
4379         AOT loader.
4380
4381         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
4382         stack.
4383
4384         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
4385         made from AOT code through the PLT table.
4386
4387         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
4388         holding the plt offset when a call is made to the aot plt trampoline.
4389         
4390 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
4393         amd64 AOT support.
4394
4395         * Makefile.am (common_sources): Fix build breakage.
4396
4397         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
4398         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
4399         intra-assembly calls if possible.
4400         
4401         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
4402
4403         * mini-trampolines.c: Handle PLT entries.
4404
4405         * mini.c: Avoid creating a GOT var for calls.
4406
4407         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
4408         from mscorlib code.
4409
4410         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
4411         from mscorlib code.
4412
4413         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
4414         AOT code.       
4415
4416         * mini.h: Bump AOT file format version.
4417         
4418         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
4419         covers more cases.
4420
4421 2006-04-25  Martin Baulig  <martin@ximian.com>
4422
4423         * driver.c: Disable copyprop, consprop and inline when running
4424         inside the debugger.
4425
4426 2006-04-25  Martin Baulig  <martin@ximian.com>
4427
4428         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
4429         with `get_current_thread' and added `detach'.
4430         (MonoDebuggerMetadataInfo): Added `thread_size',
4431         `thread_tid_offset', `thread_stack_ptr_offset' and
4432         `thread_end_stack_offset'.
4433
4434 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
4435
4436         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
4437         aot-runtime.c.
4438
4439         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
4440         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
4441
4442         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
4443
4444         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
4445
4446         * aot.c: Add support for ADJUSTED_IID.  
4447
4448 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * aot.c (emit_method_order): Don't align method_order_end.
4451
4452         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
4453         the interface ID changes.
4454
4455 2006-04-21  Dick Porter  <dick@ximian.com>
4456
4457         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
4458         cleaning up a thread.  Fixes the new part of bug 77470.
4459
4460 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
4461
4462         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
4463         to managed wrapper.
4464                      
4465 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
4466
4467         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
4468         
4469         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
4470         SIGSEGV. Fixes #78072.
4471
4472         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
4473         unregister our SIGABRT handler.
4474
4475 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
4476
4477         * mini.c: Disabled inline where it can alter the call stack in a
4478         way visible from managed code.
4479         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
4480         default.
4481
4482 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
4483
4484         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
4485         on other platforms. Fixes #78089.
4486
4487 2006-04-13  Martin Baulig  <martin@ximian.com>
4488
4489         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
4490         determine whether we're inside the debugger.
4491
4492         * debug-debugger.h
4493         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
4494
4495 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
4496
4497         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
4498         handler clauses. Fixes #78024.
4499
4500         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
4501         in the CALL_MEMBASE opcodes. Fixes #78088.
4502         (mono_arch_get_vcall_slot_addr): Ditto.
4503
4504 2006-04-10  Martin Baulig  <martin@ximian.com>
4505
4506         * debug-debugger.c: The thread handling code has now been moved
4507         into ../metadata/threads.c.
4508
4509 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
4510
4511         * driver.c (mono_main): Fix --with-gc=none build.
4512
4513         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
4514         (mono_spillvar_offset_float): Ditto.
4515         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
4516         hreg, not when its !global, since on ia64, there is a third category: stacked
4517         registers.      
4518
4519 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
4520
4521         * mini.c: set MonoInst->klass for load field address and a few other
4522         places.
4523
4524 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
4525
4526         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
4527
4528 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
4529
4530         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
4531         the branch opt changes.
4532
4533 2006-04-06  Dick Porter  <dick@ximian.com>
4534
4535         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
4536         
4537         * wapihandles.c (mini_wapi_seminfo): 
4538         * driver.c (mono_main): Add semaphore info option
4539
4540 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
4541
4542         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
4543         branch optimization changes. Fixes #78009.
4544
4545 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4546
4547         * mini.c: ignore accessibility of methods in managed->native wrappers.
4548
4549 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
4550
4551         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
4552         
4553         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
4554
4555 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
4556
4557         * mini.c: Modify the branch optimizations to preserve the invariant that
4558         the entries inside the in_bb and out_bb arrays are unique.
4559         (mono_unlink_bblock): Avoid creation of new arrays.
4560
4561 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
4562
4563         * mini.c (mono_unlink_bblock): Fix regression caused by previous
4564         change (#77992).
4565
4566 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
4567
4568         * mini.c (optimize_branches): Remove the "optimizations" in
4569         the cbranch1/cbranch2 -> branch cases which were causing several
4570         problems in the past. Fixes #77986.
4571
4572 2006-03-31  Chris Toshok  <toshok@ximian.com>
4573
4574         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
4575         default optimizations :(
4576
4577 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
4578
4579         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
4580         branch.
4581
4582 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
4583
4584         * local-propagation.c: Added comments to structs and removed
4585         "Mono" prefixes from local tree mover types.
4586
4587 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
4588
4589         * Makefile.am (arch_sources): Define this for each architecture so 
4590         libmono_la_SOURCES is defined in one place.
4591
4592 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
4593
4594         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
4595         from handles/.
4596
4597 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
4598
4599         * driver.c: print the GC name supplied by configure.
4600
4601 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
4602
4603         * local-propagation.c: Added tree mover, and moved here all the
4604         local propagation code from mini.c
4605         * mini.c: Added support for treeprop, and moved all the local
4606         propagation code to local-propagation.c
4607         * mini.h: Added support for treeprop
4608         * driver.c: Added support for treeprop, enabled consprop, copyprop,
4609         treeprop, inline and deadce by default
4610         * Makefile.am: Added local-propagation.c
4611
4612 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
4613
4614         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
4615
4616 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
4617
4618         * debug-debugger.c: make it compile without the Boehm GC.
4619
4620 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4621
4622         * mini.c: fixed issue with mismatch when an icall is registered
4623         with multiple names but same address.
4624
4625 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4626
4627         * declsec.c, mini-exceptions.c: use write barrier to set reference
4628         fields of managed objects.
4629
4630 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
4631
4632         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
4633         (can_access_internals): Fix a warning.
4634
4635         * mini.c (print_method_from_ip): Rename this to 
4636         mono_print_method_from_ip so it gets exported.
4637
4638         * trace.c: Deal with strings inside StringBuilder's containing garbage
4639         and fix memory leaks. Fixes #77848.
4640
4641 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
4642
4643         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
4644         fixes #77787.
4645
4646 2006-03-16 Neale Ferguson <neale@sinenomine.net>
4647         
4648         * mini-s390.c: Remove OP_X86_TEST_NULL.
4649
4650 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
4651
4652         * mini.c: use the correct GetHashCode() for the moving collector.
4653
4654 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
4655
4656         * liveness.c: Regalloc spill cost tuning.
4657
4658 2006-03-15 Neale Ferguson <neale@sinenomine.net>
4659         
4660         * mini-s390x.h: Correct S390_LONG macro.
4661
4662         * mini-s390x.c: Cleanup unused code.
4663
4664 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
4665
4666         * jit-icalls.h: New file.
4667
4668         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
4669         icalls and include that instead of including jit-icalls.c.
4670
4671         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
4672         OP_X86 opcodes.
4673
4674 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
4675
4676         * mini.c: when checking for member accessibility, also check for
4677         friend assemblies and for explicit interface implementations.
4678
4679 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
4682
4683         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
4684
4685         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
4686         common cases are done first.    
4687
4688         * mini-ops.h: Only define platform specific opcodes on the given platform.
4689
4690         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
4691         branch.
4692         
4693 2006-03-14  Martin Baulig  <martin@ximian.com>
4694
4695         Revert Paolo's change from r57348:
4696
4697         * mini.h: don't use gboolean for bitfields.
4698         * mini.c: verifier changes for fields and methods accessibility.
4699
4700 2006-03-13  Neale Ferguson <neale@sinenomine.net>
4701
4702         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
4703
4704         * mini-s390x.c: Fix conv_r_un.
4705
4706         * cpu-s390, cpu-s390x.md: Fix lengths.
4707
4708 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4709
4710         * mini.c: nested types have access to all the nesting
4711         levels, not just the enclosing types.
4712
4713 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4714
4715         * mini.c: added a few more verification checks.
4716
4717 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
4718
4719         * liveness.c: Merge optimizations from the linear-il branch.
4720
4721 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * mini-ia64.c (emit_call): Add a comment.
4724
4725         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
4726
4727         * tramp-ia64.c: Fix some warnings.
4728
4729 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4730
4731         * mini.h: don't use gboolean for bitfields.
4732         * mini.c: verifier changes for fields and methods accessibility.
4733
4734 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
4735
4736         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
4737         lazy icall wrapper changes.
4738
4739         * dominators.c: Replace all the dominator algorithms with faster
4740         ones from the linear-il branch.
4741
4742         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
4743         the mempool.
4744
4745         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
4746         common cases are done first.
4747
4748         * mini-amd64.c: Fix some warnings.
4749
4750         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
4751         from the mempool.
4752
4753         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
4754         added code.
4755
4756         * mini.h: Add a missing prototype.
4757
4758 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
4759
4760         * mini.c: Compile icall wrappers lazily.
4761
4762         * mini-codegen.c: Use printf instead of g_print since its much faster.
4763
4764         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
4765         function.
4766
4767         * mini.c (optimize_branches): Cache the negative result from 
4768         remove_block_if_useless ().
4769
4770         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
4771         Also fix some bblock linking issues.
4772
4773         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
4774         assembly files.
4775
4776         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
4777
4778         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
4779         accessed fields first, for better cache behavior.
4780         
4781 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4782
4783         * mini.c: speedup IList<T> array accesses.
4784
4785 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
4786
4787         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
4788         inline_costs counter. Fixes #77190.
4789
4790 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
4791
4792         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
4793         trace messages. Fixes #77706.
4794
4795 2006-03-04  Martin Baulig  <martin@ximian.com>
4796
4797         * tramp-amd64.c, tramp-x86.c
4798         (mono_debugger_create_notification_function): Use
4799         mono_global_codeman_reserve() to allocate a buffer at runtime and
4800         return it.
4801
4802         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
4803
4804         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
4805         notification function at runtime and then call `initialize' in the
4806         `MONO_DEBUGGER__debugger_info' vtable.
4807
4808 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
4809
4810         * iltests.il: Fix a visibility problem.
4811
4812 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4813
4814         * driver.c, mini.c: add hooks for the counters API.
4815
4816 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
4817
4818         * driver.c: show disabled options.
4819
4820 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4821
4822         * linear-scan.c: always use cost-driven selection.
4823
4824 2006-02-28  Raja R Harinath  <rharinath@novell.com>
4825
4826         * jit-icalls.c (helper_compile_generic_method): Revert change from
4827         2006-02-24.
4828
4829 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
4830
4831         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
4832
4833 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
4834
4835         * inssel.brg: style fixes, mostly to force the updated monoburg
4836         to run for people using svn.
4837
4838 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4839
4840         * mini.c: match monoburg changes.
4841
4842 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4843
4844         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
4845         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
4846         declaration in the header file.
4847
4848 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4849
4850         * helpers.c: reduce relocations and mem usage.
4851
4852 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4853
4854         * mini.h, mini-codegen.c: disable logging features if
4855         requested by configure.
4856
4857 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
4858
4859         * mini.c: tiny verifier changes.
4860
4861 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4862
4863         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
4864         cpu-pentium.md: stack alignment changes for osx/x86,
4865         partially from Geoff Norton <gnorton@customerdna.com>.
4866
4867 2006-02-24  Raja R Harinath  <harinath@gmail.com>
4868
4869         * jit-icalls.c (helper_compile_generic_method): Update to changes
4870         in metadata/class.c.
4871
4872 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
4873         
4874         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
4875         
4876         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
4877         interface calls with large offsets.
4878
4879 2006-02-23  Raja R Harinath  <rharinath@novell.com>
4880
4881         * jit-icalls.c (helper_compile_generic_method): Document the
4882         special-case we depend on so that we can inflate the method twice
4883         with the same context with no bad side-effects.
4884
4885 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4886
4887         * mini-x86.c, mini-amd64.c: fix for case when xen support
4888         is disabled.
4889
4890 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4891
4892         * mini-x86.c, mini-amd64.c: generate code to access tls items
4893         in a faster way for Xen systems.
4894
4895 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4896
4897         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
4898         updates and compilation fixes for the OSX/x86 port, mostly from
4899         Geoff Norton <gnorton@customerdna.com>.
4900
4901 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4902
4903         * inssel.brg: faster interface call implementation
4904         to sync with the interface_offsets MonoVTable changes.
4905
4906 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4907
4908         * mini.c: more verification checks.
4909
4910 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
4911
4912         * mini.c: added a few more verification checks.
4913
4914 2006-02-17      Neale Ferguson <neale@sinenomine.net>
4915
4916         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
4917         facility on the processor and use it if available.
4918
4919 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4920
4921         * driver.c, aot.c, mini.c: throw exception if the IL code is
4922         invalid or unverifiable.
4923
4924 2006-02-17  Raja R Harinath  <rharinath@novell.com>
4925
4926         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
4927         m.StructField.
4928
4929 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
4930
4931         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
4932
4933 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4934
4935         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
4936         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
4937         handling of instantiated generic valuetypes.
4938
4939 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
4940
4941         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
4942         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
4943         instead.
4944
4945         * generics.2.cs: Revert the nullable reftypes tests.
4946
4947 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
4948
4949         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
4950         using __builtin_frame_address (1) as it doesn't work in the presence
4951         of optimizations. Hopefully fixes #77273.
4952
4953         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
4954         -> generics.cs change as it doesn't work with some automake versions.
4955
4956 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4957
4958         * mini.c: handle systems that sue a different way to
4959         retrieve the stack address of the current thread.
4960
4961 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
4962
4963         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
4964         it specially in the makefile.
4965
4966         * generics.2.cs: Add tests for nullable reference types.
4967
4968 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4969
4970         * mini.c: always handle the case when mono_jit_init()
4971         is called in a thread different from the main thread,
4972         confusing libgc (bug #77309).
4973
4974 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
4975
4976         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
4977
4978 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4979
4980         * mini.c: change optimize_branches () to use a single loop
4981         and introduce a new optimization to simplify some range checks.
4982
4983 2006-02-03  Martin Baulig  <martin@ximian.com>
4984
4985         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
4986         and merged with debugger_thread_manager_add_thread().
4987         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
4988         inform the debugger about the main thread.
4989
4990 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
4991
4992         * basic.cs: Add test for div.un/rem.un constant folding.
4993
4994 2006-02-03  Neale Ferguson <neale@sinenomine.net>
4995
4996         * cpu-s390x.md: correct int_xor_imm length
4997
4998 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
4999
5000         * generics.2.cs: New test for #77442.
5001
5002         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
5003         #77442.
5004
5005 2006-02-02  Martin Baulig  <martin@ximian.com>
5006
5007         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
5008         <mono/metadata/mono-debug-debugger.h>   
5009
5010         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
5011
5012 2006-02-02  Martin Baulig  <martin@ximian.com>
5013
5014         * debug-debugger.h: New header file for debug-debugger.c.
5015
5016         * debug-debugger.c: Big API cleanup; don't run the managed Main()
5017         function is a separate thread anymore; add support for attaching.
5018
5019 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
5020
5021         * tramp-x86.c: Fix a warning.
5022
5023 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
5026         on very large methods.
5027
5028         * aot.c (load_patch_info): Fix a warning.
5029
5030 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
5031
5032         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
5033         mini-ops.h: alu membase optimizations.
5034
5035 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
5036
5037         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
5038         to speedup StringBuilder.
5039
5040 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
5041
5042         * dominators.c (mono_compute_natural_loops): Fix detection of
5043         loop body start blocks.
5044
5045         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
5046
5047 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
5048
5049         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
5050         #75145.
5051
5052 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
5053
5054         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5055
5056 2006-01-25  Martin Baulig  <martin@ximian.com>
5057
5058         * debug-debugger.c: Moved the `MonoDebuggerManager' and
5059         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
5060         started to cleanup this file a little bit.
5061
5062 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
5063
5064         * mini.c: optimize a codepath frequently happening in generics code.
5065
5066 2006-01-23  Martin Baulig  <martin@ximian.com>
5067
5068         * Makefile.am: Only compile debug-debugger.c on supported platforms.
5069
5070         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
5071         functions directly.
5072
5073         * driver.c: debug-debugger.c is only available if
5074         `MONO_DEBUGGER_SUPPORTED' is defined.   
5075
5076 2006-01-23  Martin Baulig  <martin@ximian.com>
5077
5078         * debug-debugger.c: Only enable this on platforms where the Mono
5079         Debugger is working (x86 and x86_64).
5080
5081 2006-01-21  Martin Baulig  <martin@ximian.com>
5082
5083         The Mono Debugger is now using the normal `mono' instead of the
5084         `mono-debugger-mini-wrapper' when executing managed code.
5085
5086         * debug-debugger.c: New file; previously known as
5087         debugger/wrapper/wrapper.c.
5088
5089         * debug-mini.c (mono_init_debugger): Removed.
5090
5091         * driver.c (mono_main): Added new `--inside-mdb' command line
5092         argument which is used when running inside the debugger.
5093
5094 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
5095
5096         * liveness.c (mono_analyze_liveness): Remove some unused data
5097         structures.
5098
5099 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
5100
5101         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
5102
5103 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
5104
5105         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
5106         depends on implementation details of monobitset.
5107
5108         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
5109         Fixes #77271.
5110
5111 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
5112
5113         * liveness.c: Update after monobitset changes.
5114
5115 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
5116
5117         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
5118
5119 2006-01-11 Neale Ferguson <neale@sinenomine.net>
5120
5121         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
5122
5123         * mini-s390x.c: Remove warning messages.
5124
5125 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
5126
5127         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
5128
5129 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
5130
5131         * generics.2.cs: Add ldelem/stelem_any test.
5132
5133 2006-01-10 Neale Ferguson <neale@sinenomine.net>
5134
5135         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
5136
5137 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
5138
5139         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
5140         
5141 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
5142
5143         * generics.2.cs: Reenable vtype tests.
5144
5145         * inssel-x86.brg: Remove an icorrect valuetype rule.
5146
5147 2006-01-06 Neale Ferguson <neale@sinenomine.net>
5148
5149         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
5150         initial support for OP_ABS.
5151
5152 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5153
5154         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
5155
5156 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5157
5158         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
5159         conversion and implement LADD/LSUB.
5160
5161         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
5162         architectures.
5163
5164 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5165
5166         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
5167
5168         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
5169         architectures.
5170
5171 2006-01-05 Neale Ferguson <neale@sinenomine.net>
5172
5173         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
5174         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
5175         (stack walk problem).
5176
5177 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
5178
5179         * aot.c (mono_aot_load_method): Fix a warning.
5180
5181 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5182
5183         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
5184
5185 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5186
5187         * iltests.il: Add test for #77148.
5188
5189         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
5190         #77148.
5191
5192 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5193
5194         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
5195
5196 2006-01-03  Neale Ferguson <neale@sinenomine.net>
5197
5198         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
5199         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
5200
5201         * basic-long.cs: Add lconv-to-r4/r8 tests.
5202
5203 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
5204
5205         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
5206
5207         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
5208         here as on other archs.
5209
5210 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5211
5212         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
5213
5214 2005-12-29 Neale Ferguson <neale@sinenomine.net>
5215
5216         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
5217         
5218         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
5219
5220         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
5221         instrument_prolog; Add memory_barrier instruction.
5222
5223 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
5224
5225         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
5226
5227 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
5228
5229         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
5230
5231         * aliasing.c inssel.brg: Fix warnings.
5232
5233         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
5234         could skip initialization of some parts of memory.
5235
5236         * mini.c mini-ia64.c: Fix warnings.
5237
5238         * inssel-sparc.brg: Add an implementation of lneg which actually works.
5239
5240 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
5241
5242         * aliasing.c (mono_build_aliasing_information): Add a workaround for
5243         a crash seen on sparc.
5244
5245         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
5246         
5247         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
5248
5249 2005-12-21 Neale Ferguson <neale@sinenomine.net>
5250
5251         * mini-ops.h: Add s390_backchain instruction
5252
5253         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
5254
5255         * cpu-s390.md: Add s390_backchain instruction
5256
5257         * mini-s390.c: Significant ABI changes
5258
5259         * mini-s390.h: Cater for zero length structures
5260
5261 2005-12-20 Neale Ferguson <neale@sinenomine.net>
5262
5263         * mini-s390.c: ABI fixes
5264
5265         * inssel-s390.brg: Remove debug statements
5266
5267         * cpu-s390.md: Fix length of ATOMIC_xx operations
5268
5269 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
5270
5271         * basic-float.cs: Add float<->long conversion tests.
5272
5273 2005-12-16 Neale Ferguson <neale@sinenomine.net>
5274
5275         * mini-s390.c: Fix LOCALLOC processing.
5276
5277         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
5278
5279 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * iltests.il: Add tests for some opcodes not covered by the other
5282         tests.
5283
5284 2005-12-15 Neale Ferguson <neale@sinenomine.net>
5285
5286         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
5287         register loading for Tail processing; Correct trace output.
5288
5289         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
5290
5291         * cpu-s390.md: Correct size of jmp instruction. 
5292
5293 2005-12-13 Neale Ferguson <neale@sinenomine.net>
5294
5295         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
5296
5297 2005-12-13 Neale Ferguson <neale@sinenomine.net>
5298
5299         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
5300           Bring s390 up to current level.
5301
5302 2005-12-12  Zltan Varga  <vargaz@gmail.com>
5303
5304         * generics.2.cs: Disable the newly added tests as they do not work yet.
5305         
5306         * generics.2.cs: Add valuetype tests.
5307
5308 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
5309
5310         * basic-long.cs: Add i4->u8 test.
5311
5312         * objects.cs: Add tests for JIT intrinsic.
5313
5314         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
5315         optimizations lost by a mistake.
5316
5317 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
5318
5319         * basic-long.cs: Remove a test moved to objects.cs.
5320
5321         * arrays.cs: Add more array tests.
5322
5323 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
5324
5325         * arrays.cs: Add new tests for multi-dimensional arrays.
5326
5327 2005-12-06  Raja R Harinath  <rharinath@novell.com>
5328
5329         * Makefile.am (test_sources2): Add generics.2.cs.
5330         (EXTRA_DIST): Add test_sources2.
5331
5332 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
5333
5334         Support for boxing and unboxing nullable types as well as the
5335         isinst operation on nullables, per the CLI ammendment.
5336
5337         * inssel.brg (CEE_ISINST): Special case for nullable
5338
5339         * mini.c (handle_unbox_nullable): new method
5340         (handle_box): Special case for nullable types
5341         (mono_method_to_ir): Call handle_unbox_nullable in correct
5342         places.
5343
5344         * generics.2.cs: New test suite
5345
5346         * Makefile.am: Support for regression tests with generics.
5347
5348 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
5349
5350         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
5351         allocated to registers. Fixes #76800.
5352
5353 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
5354
5355         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
5356
5357 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
5358
5359         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
5360         of platforms.
5361
5362 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
5363
5364         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
5365         objects.cs.
5366
5367         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
5368         
5369         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
5370 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
5371
5372         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
5373         single precision before storing to a single precision location.
5374
5375 2005-11-28  Raja R Harinath  <rharinath@novell.com>
5376
5377         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
5378
5379 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
5380
5381         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
5382         correct files.
5383
5384         * basic.cs: Remove test_0_byte_compares test which was moved to
5385         objects.cs a long time ago.
5386
5387 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
5388
5389         * aliasing.c: Fixed aliasing issue on 64 bit archs.
5390
5391 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
5392
5393         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
5394         handlers are called.
5395
5396         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
5397         throwing code.
5398
5399          * mini-ia64.c: Add support for the throw->branch exception 
5400         optimization.   
5401
5402         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
5403
5404 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
5405
5406         * mini.c: Enabled "fastpath" deadce :-)
5407         
5408 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
5409
5410         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
5411         alias analysis pass to support it.
5412         * mini.h: Likewise.
5413         * ssa.c: Likewise.
5414         * liveness.c: Likewise (liveness computation can use aliasing
5415         information to be more accurate).
5416         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
5417         moreover made so that "--compile-all" uses the given optimization
5418         flags and not the default ones.
5419         * aliasing.c: Alias analysis (new file).
5420         * aliasing.h: Likewise.
5421         * Makefile.am: added "aliasing.c" and "aliasing.h".
5422         
5423 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
5424
5425         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
5426         OP_L opcodes.
5427
5428 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
5429
5430         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
5431         fp >= end_of_stack exit condition, as it is not needed, and it might
5432         become true for fp eliminated frames.
5433
5434 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
5435
5436         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
5437         coded offsets.
5438
5439 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
5440
5441         * mini-arm.c: fixed alignment of doubles/longs to match
5442         the C ABI (bug #76635).
5443
5444 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
5445
5446         * aot.c: fix compilation with --enable-minimal=aot.
5447
5448 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
5449
5450         * mini-arm.c: fixed compatibility with the new
5451         floating point emulator package for compares.
5452
5453 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
5454
5455         * mini.c : reverted sig->pinvoke changes (r51396-51397).
5456
5457 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
5458
5459         * mini-exceptions.c (print_stack_frame): Output to stderr.
5460         (mono_handle_native_sigsegv): Ditto.
5461
5462 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
5463
5464         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
5465         OP_LCONV_TO_OVF_I implementation.
5466
5467         * mini-amd64.c: Add support for the throw->branch exception 
5468         optimization.
5469
5470         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
5471         when the catch clause catches a more general exception, i.e. Object.
5472
5473 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
5474
5475         * cpu-ia64.md: Remove unused opcodes.
5476
5477         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
5478         specific defines for architectures defining USE_SIGACTION.
5479
5480         * mini-ia64.c: Fix some warnings.
5481
5482         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
5483         version seemed to skip a frame.
5484
5485 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
5486
5487         * mini.c: Clean up the usage of sig->pinvoke flag. Now
5488         only calls which are made to native code use this flag.
5489
5490 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
5491
5492         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
5493         varargs methods as well.
5494         
5495         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
5496         which have save_lmf set. Reorganize methods prologs a bit.
5497
5498         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
5499         debugger to the proper place.
5500
5501 2005-10-29  Martin Baulig  <martin@ximian.com>
5502
5503         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
5504         when running inside the debugger until the debugger has support
5505         for it.
5506
5507 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
5508
5509         * mini.h: Fix a warning.
5510
5511 2005-10-24  Miguel de Icaza  <miguel@novell.com>
5512
5513         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
5514         we expose publicly, this returns the string.
5515
5516 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
5517
5518         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
5519         with fp elimination.
5520
5521 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
5522
5523         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
5524         native stacktrace using the glibc 'backtrace' function if available.
5525
5526 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
5527
5528         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
5529
5530         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
5531         handle SIGSEGVs received while in native code.
5532
5533         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
5534         code, call mono_handle_native_sigsegv which will abort the runtime
5535         after printing some diagnostics, instead of converting it into a
5536         confusing NullReferenceException.
5537
5538 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * cpu-pentium.md: Remove unused opcodes.
5541
5542 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
5543
5544         * mini-amd64.h (MonoLMF): Add rsp field.
5545
5546         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
5547         the lmf too.
5548
5549 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
5550
5551         * mini-codegen.c (get_register_spilling): Fix some warnings.
5552
5553 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
5554
5555         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
5556         elimination during exception handling. Enable fp elimination by
5557         default.
5558
5559         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
5560         elimination.
5561
5562 2005-10-16  Martin Baulig  <martin@ximian.com>
5563
5564         * mini-exceptions.c
5565         (mono_debugger_run_finally): New public method for the debugger.
5566
5567 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
5568
5569         * debug-mini.c (mono_debug_init_method): Fix warning.
5570
5571         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
5572         the 'exname' parameter const to fix some warnings.
5573
5574 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
5575
5576         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
5577         introduced by the previous patch.
5578
5579 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
5580
5581         * basic-float.cs: Add test for precision of float arithmetic.
5582
5583         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
5584         when loading/storing single values from/to memory.
5585
5586         * mini.c (mono_jit_compile_method_with_opt): Create the function
5587         pointers in the correct domain.
5588
5589 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
5590
5591         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
5592         introduced by previous patch.
5593         
5594         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
5595         when out_filter_idx is NULL.
5596
5597         * mini-exceptions.c: Don't run filter clauses twice during exception
5598         handling. Fixes #75755.
5599
5600 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
5601
5602         * aot.c: Add support for ldflda wrappers.
5603
5604         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
5605         #75902.
5606
5607 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
5608
5609         * mini.c, mini.h: do not consider exception handlers blocks when
5610         setting up interface variables.
5611
5612 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
5613
5614         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
5615
5616 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
5617
5618         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
5619         causes a regression.
5620
5621         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
5622
5623 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
5624
5625         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
5626         of the OP_P definitions.
5627
5628         * TODO: Add a proposal for dealing with the CEE/OP mess.
5629
5630         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
5631         optimizations from the x86 port.
5632
5633         * cpu-amd64.md: Ditto.
5634
5635         * basic.cs basic-long.cs: Add tests.
5636
5637 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
5638
5639         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
5640         Patrik Torstensson's implementation of my exception-handling
5641         optimization idea, when the exception object is not used
5642         (bug #62150).
5643
5644 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
5645
5646         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
5647         of the mul_imm optimizations from the old jit.
5648
5649 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
5650
5651         * mini.c, liveness.c: patch by Patrik Torstensson and
5652         Zoltan Varga to improve performance in methods with
5653         exception clauses.
5654
5655 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * driver.c: Remove 'Globalization' entry from --version.
5658
5659 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
5660
5661         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
5662         there is a profiler interested in JIT events.
5663
5664         * aot.c: Load profile files produced by the AOT profiling module, and
5665         reorder methods based on the profiling info. Add a 'method_order' table
5666         to the AOT file to make mono_aot_find_jit_info work with the reordered
5667         methods.
5668
5669         * mini.h: Bump AOT file version info.
5670
5671 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
5672
5673         * mini-arm.h: work around what looks like a gcc bug when optimizations
5674         are enabled.
5675
5676 2005-09-28  Raja R Harinath  <rharinath@novell.com>
5677
5678         * Makefile.am (AM_CFLAGS): Don't use += to append inside
5679         conditionals.  Use ...
5680         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
5681
5682 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
5683
5684         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
5685         to determine the amount of memory to copy when passing valuetypes.
5686
5687         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
5688         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
5689
5690 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
5691
5692         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
5693         information about aot.
5694
5695 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
5696
5697         * *.c: Replace the use of {Enter,Leave}CriticalSection with
5698         macros. This will allow a deadlock debugger to easily be plugged
5699         in.
5700
5701 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
5702
5703         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
5704
5705 2005-09-27  Raja R Harinath  <rharinath@novell.com>
5706
5707         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
5708         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
5709         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
5710         ($(arch_built)) [CROSS_COMPILING]: Error out.
5711
5712 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * aot.c: Add support for the no_special_static flag for classes.
5715
5716 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
5717
5718         * Reapply reverted patches.
5719
5720         * *: Revert r50174 as well.
5721
5722         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
5723
5724 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
5725
5726         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
5727
5728 2005-09-23  Miguel de Icaza  <miguel@novell.com>
5729
5730         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
5731         part of the SIG_HANDLER_SIGNATURE.  
5732
5733 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
5736         statistics.
5737
5738         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
5739         introduced by previous patch.
5740
5741 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
5742
5743         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
5744         saved registers too.
5745
5746         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
5747         upon the information returned by get_call_info ().
5748         
5749         * mini-x86.c (add_float): Fix stack size calculation.
5750         (mono_arch_call_opcode): Rewrite this so it works based up the
5751         information returned by get_call_info ().
5752         (mono_arch_get_this_vret_args): Ditto.
5753
5754 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
5755
5756         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
5757         in cinfo to determine the registers which need to be used.
5758
5759 2005-09-20  Miguel de Icaza  <miguel@novell.com>
5760
5761         * driver.c (mono_main): Add --server and --desktop flags. 
5762
5763 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
5764
5765         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
5766         registers as global registers.
5767
5768         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
5769         longer needed with the new register allocator.
5770
5771         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
5772
5773         * cpu-ia64.md: Remove unused opcodes.
5774         
5775         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
5776         
5777 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
5778
5779         * cpu-amd64.md: Remove unused opcodes.
5780
5781         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
5782         needed with the new register allocator.
5783
5784         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
5785         reg-reg moves.
5786
5787 2005-09-16  Raja R Harinath  <rharinath@novell.com>
5788
5789         * Makefile.am (check-local): Don't invoke semdel-wrapper.
5790
5791 2005-09-16  Martin Baulig  <martin@ximian.com>
5792
5793         * exceptions-amd64.c
5794         (throw_exception): Don't call mono_debugger_throw_exception() if
5795         we're a rethrow - see the FIXME in the code.
5796
5797 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
5798
5799         * mini.c (mono_init_exceptions): This only works on some architectures.
5800         
5801 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
5802
5803         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
5804         on ia64.
5805
5806         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
5807
5808         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
5809         now in mini-exceptions.c.
5810
5811 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
5812
5813         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
5814         now in mini-exceptions.c.
5815
5816 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
5817
5818         * exceptions-x86.c: Applied patch from Patrik Torstensson 
5819         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
5820
5821         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
5822         code into mini-exceptions.c. Add some assertions to it.
5823
5824 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
5825
5826         * aot.c (emit_section_change): Applied patch from "The Software Team" 
5827         (<software@solmersa.com>). Fix as errors on windows.
5828
5829 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
5830
5831         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
5832         method info into the LMF.
5833
5834 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5835         
5836         * mini-ia64.c: Add proper unwind info for method epilogs.
5837
5838         * exceptions-ia64.c: Add some code to help debugging.
5839         
5840         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
5841
5842         * mini-exceptions.c: Fix warning.
5843
5844 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
5845
5846         * mini.c: Really fix build.
5847
5848         * mini-x86.c mini-amd64.c: Fix build.
5849
5850 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
5851
5852         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
5853
5854         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
5855         some Interlocked methods as intrinsics.
5856
5857         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
5858         for Thread methods as well.
5859
5860         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
5861
5862         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
5863
5864         * mini-ia64.c mini-x86.c mini-amd64.c 
5865         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
5866         OP_MEMORY_BARRIER.
5867         
5868         * mini.c (mono_init_exceptions): Fix build breakage.
5869
5870 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
5871
5872         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
5873         of instructions. Use the new ia64_unw_op macros for emitting unwind
5874         info.
5875
5876         * mini.c (mono_init_exceptions): Initialize exception handling
5877         related trampolines at startup.
5878
5879 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
5880
5881         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
5882
5883 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
5884
5885         * mini.c: Handle type loading errors gracefully during compilation and
5886         throw the appropriate exception.
5887
5888 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
5889
5890         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
5891         for the mono binary.
5892
5893 2005-09-09  Martin Baulig  <martin@ximian.com>
5894
5895         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
5896         the release.
5897
5898 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
5899
5900         * mini-arm.h: use emulation for conv.r.un for the release.
5901
5902 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
5903
5904         * mini-arm.c, objects.cs: more fixes and tests for them.
5905
5906 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
5907
5908         * mini-arm.c: align structures to at least 4 bytes to be able
5909         to keep our current optimized memcpy.
5910
5911 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
5912
5913         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
5914
5915 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5916
5917         * mini.c: ignore SIGPIPE.
5918
5919 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
5920
5921         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
5922
5923         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
5924
5925 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
5926
5927         * mini.h: Add prototype for mono_allocate_stack_slots_full.
5928
5929 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
5930
5931         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
5932         exception handling support.
5933         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
5934         patch by Brian Koropoff <briank@marakicorp.com>).
5935
5936 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
5937
5938         * mini.c: revert another 'optimization' which breaks when
5939         items on the eval stack need to be saved at a basic block end
5940         (bug #75940).
5941
5942 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
5943
5944         * jit-icalls.c: for arrays, ensure we always provide
5945         lower bounds.
5946
5947 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
5948
5949         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
5950         
5951         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
5952
5953 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
5954
5955         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
5956         arguments in their original register.
5957
5958 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
5959
5960         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
5961         memset/memcpy.
5962
5963         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
5964         when ssapre is enabled.
5965
5966         * inssel-long.brg: Fix bug in previous patch.
5967
5968         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
5969         multiplication by a constant.
5970
5971 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
5972
5973         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
5974         icc.
5975
5976         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
5977         saving registers.
5978
5979 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
5980
5981         * inssel-arm.brg: apply changes tested by Brian Koropoff
5982         <briank@marakicorp.com>.
5983
5984 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
5985
5986         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
5987         
5988 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
5989
5990         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
5991         to the same register if dreg is just a base register.
5992         (print_ins): Improve printing of membase opcodes.
5993
5994         * inssel-x86.brg: Add optimized ldind(reg) rules.
5995
5996         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
5997
5998 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
5999
6000         * mini.c: when running under valgrind, set the stack bottom for
6001         the GC at the actual approximate stack for the app (fixes running
6002         mono with valgrind).
6003
6004 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
6005
6006         * mini.c: do no break at the first valuetype to init found
6007         (fixes bug #75791).
6008
6009 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
6010
6011         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
6012
6013 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
6014
6015         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
6016
6017 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
6018
6019         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
6020
6021 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6022
6023         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
6024
6025         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
6026         code.
6027
6028         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
6029         code.
6030
6031         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
6032         methods.
6033
6034 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
6035
6036         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
6037
6038 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6039
6040         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
6041         in the tail recursion optimization.
6042
6043         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
6044         debug info into the assembly file.
6045
6046         * iltests.il: Add test for filter regions.
6047
6048         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
6049         initial stack of filter regions. Fixes #75755.
6050
6051 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
6052
6053         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
6054         stack requirements.
6055
6056 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
6057
6058         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
6059         the check for an already compiled method on non-ia64 platforms.
6060         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
6061         proper domain.
6062
6063         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
6064
6065         * inssel-x86.brg: Add some optimized call rules.
6066
6067 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
6068
6069         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
6070         method here.
6071
6072         * mini.h mini-trampolines.c: Pass the trampoline argument to 
6073         mono_arch_patch_delegate_trampoline.
6074
6075         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
6076
6077         * mini-trampolines.c: Fix build.
6078
6079         * mini-amd64.h: Add delegate trampolines.
6080
6081         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
6082
6083         * inssel-amd64.brg: Add optimized call rules.
6084         
6085         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
6086
6087         * inssel-ia64.brg: Add optimized ldind(reg) rules.
6088
6089 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
6090
6091         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
6092         change.
6093
6094         * mini-ia64.c: Remove LMF fixmes.
6095
6096         * mini-ia64.h: Remove most fields from LMF.
6097
6098         * inssel-ia64.brg (stmt): Fix unaligned access errors.
6099
6100         * mini-trampolines.c: Add support for IA64 function descriptors.
6101
6102         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
6103         for IA64 function descriptors.
6104
6105 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
6106
6107         * tramp-arm.c: patch the vtable for virtual calls. Added
6108         support code to register/unregister the LMF.
6109         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
6110         more LMF work.
6111
6112 2005-08-19  Dick Porter  <dick@ximian.com>
6113
6114         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
6115         bit value if needed.
6116
6117 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
6118
6119         * mini.c (mini_get_method): Move handling of wrapper data here.
6120
6121         * mini.c (mono_method_to_ir): Add support for dynamic methods.
6122
6123         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
6124         virtual.
6125
6126         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
6127         bblock->code does not remain empty.
6128
6129 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
6130
6131         * arrays.cs: Add regression test for #75832.
6132
6133         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
6134         rules. Fixes #75832.
6135
6136         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
6137         instruction scheduling.
6138
6139 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
6140
6141         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
6142
6143 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
6144
6145         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
6146
6147         * mini-codegen.c: Fix VC build.
6148
6149         * cpu-pentium.md: Increase length of atomic_exhange_i4.
6150
6151 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6152
6153         * mini.h: fix signature for mono_register_opcode_emulation.
6154
6155 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
6156
6157         * mini.c: Get rid of most of the helper_sig_... constants using
6158         mono_create_icall_signature ().
6159
6160 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
6161
6162         * jit-icalls.c (helper_ldstr): New helper function.
6163
6164         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
6165
6166         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
6167         throw, load the string using a helper call instead of creating a string object.
6168
6169         * aot.c: Update after LDSTR changes.
6170
6171         * mini.h: Bump AOT file version.
6172         
6173         * aot.c: Save class size info into the AOT file. Print more statistics during
6174         compilation.
6175
6176         * mini.h: Bump AOT file version.
6177
6178         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6179         ordering of disasm cases. Fixes #74957.
6180
6181 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
6182
6183         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
6184         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
6185         the generic code needed for the ARM port.
6186
6187 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
6188
6189         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
6190         inssel-arm.brg: more ARM features and fixes.
6191
6192 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
6193
6194         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
6195         ARM port work in progress.
6196
6197 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
6198
6199         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
6200
6201         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
6202
6203         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
6204
6205         * inssel.brg (mini_emit_memset): Add support for unaligned access.
6206
6207         * *-ia64.*: Ongoing IA64 work.
6208         
6209         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
6210
6211 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
6212
6213         * TODO: Remove out-of-data todo stuff.
6214
6215         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
6216         dead code.
6217
6218         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
6219
6220         * mini.h: Bump corlib version.
6221
6222 2005-07-27  Martin Baulig  <martin@ximian.com>
6223
6224         * mini-codegen.c
6225         (create_copy_ins): Added `const unsigned char *ip' argument; set
6226         `copy->cil_code' from it.
6227
6228 2005-07-27  Martin Baulig  <martin@ximian.com>
6229
6230         * mini-exceptions.c (mono_handle_exception): Don't call
6231         mono_debugger_handle_exception() for filters.
6232
6233 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
6234
6235         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
6236         as well.
6237
6238 2005-07-26  Martin Baulig  <martin@ximian.com>
6239
6240         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
6241
6242         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
6243         helper_compile_generic_method() if the method is actually virtual
6244         and non-final.
6245
6246 2005-07-26  Martin Baulig  <martin@ximian.com>
6247
6248         * mini.c
6249         (trampoline_code): Renamed to `mono_trampoline_code' and made it
6250         public; this is now accessed directly by the debugger.
6251         (mono_generic_trampoline_code): Removed.
6252
6253         * debug-mini.c
6254         (mono_debug_init_method): Also add interncalls and wrappers.
6255
6256 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
6257
6258         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
6259
6260 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
6261
6262         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
6263
6264 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
6265
6266         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
6267
6268 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
6269
6270         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
6271         getting TLS offsets on AMD64 too.
6272
6273 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
6274
6275         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
6276
6277 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
6278
6279         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
6280         inssel-arm.brg, mini-arm.h: ARM port work in progress.
6281
6282 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
6283
6284         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
6285
6286         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
6287         to mini.c.
6288
6289         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
6290         mono_sparc_is_virtual_call ().
6291         
6292         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
6293
6294         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
6295         trampoline parameters.
6296
6297         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
6298         
6299         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
6300         to mono_arch_get_vcall_slot_addr.
6301
6302         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
6303         trampoline code.
6304
6305         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
6306
6307 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
6308
6309         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
6310
6311 2005-07-19  Martin Baulig  <martin@ximian.com>
6312
6313         * exceptions-amd64.c (throw_exception): Call
6314         mono_debugger_throw_exception() here like we're doing it on i386.
6315
6316 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
6317
6318         * mini-ia64.c: Add optimized TLS access support.
6319
6320 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
6321
6322         * mini-exceptions.c: Ongoing IA64 work.
6323
6324         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
6325
6326         * mini.c: Use the default optimization set when embedding. Fixes
6327         #75194.
6328
6329 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
6330
6331         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
6332         of trampolines to a separate file.
6333
6334         * mini-trampolines.c: New file.
6335
6336         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
6337         separate file.
6338         
6339         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
6340         amd64/ia64 code.
6341
6342         * mini-codegen.c: Fix cygwin build.
6343
6344 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
6345
6346         * mini.c: Add some minor changes needed by the IA64 port.
6347
6348         * *-ia64.*: Ongoing IA64 work.
6349
6350 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
6351
6352         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
6353         trampolines into arch-independent and arch-dependent parts.
6354
6355         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
6356
6357 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
6358
6359         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
6360
6361         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
6362         the xp-regalloc-branch for amd64.
6363
6364         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
6365         xp-regalloc-branch for x86.
6366
6367 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
6368
6369         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
6370
6371 2005-07-06  Martin Baulig  <martin@ximian.com>
6372
6373         * mini.c
6374         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
6375         (mono_jit_runtime_invoke): Likewise.
6376
6377 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
6380         on x86 too.
6381         
6382         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
6383         without loading their metadata. Reorganize the file format so exception handling+
6384         debug info is kept separate from normal method info. Create MonoJitInfo 
6385         structures for methods lazily.
6386
6387         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
6388         loading metadata.
6389         (x86_class_init_trampoline): Patch AOT class init trampolines too.
6390
6391         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
6392
6393         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
6394         in AOT code.
6395
6396         * mini.h: Bump AOT file version.
6397
6398 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
6399
6400         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
6401
6402 2005-07-01  Raja R Harinath  <rharinath@novell.com>
6403
6404         * Makefile.am (check-local): Call semdel-wrapper.
6405
6406 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
6407
6408         * mini-x86.c: Revert the last change as it seems to break the build..
6409
6410 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
6411
6412         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
6413         
6414         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
6415
6416 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
6417
6418         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
6419         outside of the macro, so strange stuff doesn't happen with gcc4
6420         (NEW_AOTCONST_TOKEN): Likewise.
6421
6422 2005-06-28  Martin Baulig  <martin@ximian.com>
6423
6424         * mini.c (mini_class_is_system_array): New static method; use this
6425         instead of `klass->parent == mono_defaults.array_class' everywhere
6426         since this also works for the new generic array class.
6427
6428 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
6429
6430         * inssel.brg: Remove warnings.
6431
6432 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
6433
6434         * mini-ia64.c: Ongoing IA64 work.
6435
6436         * basic-float.cs: Add float->i1 conversion test.
6437
6438         * iltests.il: Add conv.u4 test.
6439
6440 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
6441
6442         * inssel-long.brg: Fix bug caused by last change.
6443
6444 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
6445
6446         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
6447         BSDs.  Allows the x86 JIT to work on OSX86
6448
6449 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
6450
6451         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
6452         u4->i8 conversion.
6453
6454         * mini-ia64.c: Ongoing IA64 work.
6455
6456 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
6457
6458         * mini-ia64.c: Ongoing IA64 work.
6459
6460         * driver.c: Clean up jit_code_hash as well when using --regression.
6461
6462         * inssel-long.brg: Fix long->i4/u4 conversion rules.
6463
6464         * basic-long.cs: Add tests for long->u4 conversion.
6465
6466 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
6467
6468         * mini.c: Take mono_get_domainvar out of macros. This makes sure
6469         that we do not depend on undefined C behavior: the order stuff
6470         gets evaluated within an expression. Fixes mono when compiled on
6471         GCC 4.
6472
6473 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
6474
6475         * *-ia64.*: Ongoing IA64 work.
6476
6477         * aot.c: Lower memory usage while loading AOT methods.
6478
6479         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
6480
6481         * mini.h: Bump AOT file format version.
6482
6483 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
6484
6485         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
6486
6487 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
6488
6489         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
6490         not on callee assembly). Fixed some comments.
6491
6492 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
6493
6494         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
6495         it gets proper disassembly.
6496         (emit_method_info): Remove some dead code.
6497
6498         * mini.c (mini_method_compile): Allways allocate the GOT var in
6499         mono_method_to_ir for emulating opcodes.
6500
6501 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
6502
6503         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
6504         before freeing the code memory. Fixes #74990.
6505
6506         * objects.cs: Add regression test for #74992.
6507
6508         * liveness.c: Extend live ranges of arguments to the beginning of the
6509         method. Fixes #74992.
6510
6511         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
6512         so it points into the faulting instruction.
6513
6514 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
6515
6516         * jit-icalls.c (mono_imul_ovf): Add exception handling.
6517
6518         * *-ia64.*: Ongoing IA64 work.
6519
6520         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
6521
6522 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
6523
6524         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
6525
6526         * *-ia64.*: Ongoing IA64 work.
6527
6528 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
6529
6530         * basic-long.cs: Add tests for add/sub.ovf.
6531
6532         * basic.cs: Add tests for sub.ovf.
6533
6534         * *-ia64.*: Ongoing IA64 work.
6535
6536 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
6537
6538         * *-ia64.*: Ongoing IA64 work.
6539
6540         * basic.cs: Add conv.ovf.i4.un test.
6541
6542 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
6543
6544         * mini.c: (remove_block_if_useless) Fixed bug 75061.
6545         
6546 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6547
6548         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
6549
6550 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
6551
6552         * *-ia64.*: Ongoing IA64 work.
6553
6554 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6555
6556         * trace.[ch]:
6557         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
6558
6559 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
6560
6561         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
6562
6563 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
6564
6565         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
6566
6567         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
6568         of a call is callable by a near call.
6569
6570 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
6571
6572         * mini-ia64.c: Ongoing IA64 work.
6573
6574 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
6575
6576         * genmdesc.c: Make the generated array non-static.
6577
6578         * inssel-long.brg: Fix LSHR_IMM rule.
6579
6580         * *-ia64.*: Ongoing IA64 work.
6581
6582         * *-ia64.*: Ongoing IA64 work.
6583
6584 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
6585
6586         * *-ia64.*: Ongoing IA64 work.
6587
6588         * *-ia64.*: Ongoing IA64 work.
6589         
6590         * mini-ia64.c: Ongoing IA64 work.
6591
6592         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
6593
6594 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
6595
6596         * objects.cs basic-calls.cs: Move some tests to objects.cs.
6597         
6598         * objects.cs basic-long.cs: Move some tests to objects.cs.
6599
6600 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
6601
6602         * *-ia64.*: Ongoing IA64 work.
6603
6604         * iltests.il: Add a new test.
6605
6606         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
6607         newobj. Fixes #75042.
6608
6609 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
6610
6611         * *-ia64.*: Ongoing IA64 work.
6612         
6613         * *-ia64.*: Ongoing IA64 work.
6614         
6615         * *-ia64.*: Ongoing IA64 work.
6616
6617         * basic.cs objects.cs: Move tests accessing static variables as well.
6618
6619         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
6620
6621 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
6622
6623         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
6624
6625         * driver.c: Always print failed tests.
6626
6627         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
6628         frame pointer.
6629
6630         * *ia64*: Ongoing IA64 work.
6631
6632 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
6633
6634         * basic.cs: Add tests for add.ovf. Fix warnings.
6635
6636 2005-05-18  Miguel de Icaza  <miguel@novell.com>
6637
6638         * driver.c (mono_main): Avoid crash if no argument is passed to
6639         --break;  Do not use g_error, but f_printf.   And fix all other
6640         ocurrences of the same crash.
6641
6642 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
6643
6644         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
6645         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
6646         Fixes #74742.
6647
6648 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
6649
6650         * *-ia64.*: Add beginnings of IA64 backend.
6651
6652         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
6653
6654 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
6655
6656         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
6657         Fixes #74925.
6658
6659         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
6660
6661         * mini-amd64.c: Fix a warning.
6662
6663 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
6664
6665         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
6666         in float_neg. Fixes #74897.
6667
6668         * mini-amd64.c (emit_call): Fix another near call bug.
6669
6670 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
6671
6672         * declsec.c: Keep the appdomain information in the structure. Added a 
6673         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
6674         value gets overwritten).
6675         * declsec.h: Set the default MonoArray for the the stack to 6. Added
6676         an MonoAppDomain member to MonoSecurityFrame.
6677         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
6678         used in the stack walk. Now use a MonoArray which grow (double) when
6679         it gets full.
6680
6681 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
6682
6683         * mini.c: Re-enabled runtime cleanup, since running threads should
6684         now properly stop when exiting.
6685
6686 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
6687
6688         * mini-codegen.c: New file contaning the arch-independent local
6689         register allocator. Not used by any architectures yet.
6690
6691         * mini.h linear-scan.c: Merge some changes from the 
6692         mini-xp-local-regalloc branch.
6693
6694 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
6695
6696         * mini-amd64.c (emit_call): Fix calls to native functions when the
6697         runtime is compiled as a shared library. Fixes #74756.
6698
6699         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
6700         on a literal field. Fixes #74751.
6701
6702 2005-04-25  Raja R Harinath  <rharinath@novell.com>
6703
6704         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
6705
6706 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
6707
6708         * objects.cs: Add missing null casting test.
6709
6710 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
6711
6712         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
6713         in wrapper methods. Also rename 'address' variable to 'offset'.
6714
6715 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
6716
6717         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
6718         warnings.
6719         
6720         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
6721
6722         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
6723         work on windows.
6724
6725 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
6726
6727         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
6728
6729 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
6730
6731         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
6732         just the last bytes.
6733
6734 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
6735
6736         * aot.c (mono_compile_assembly): Fix warning.
6737
6738         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
6739         by the _MSC_VER stuff.
6740
6741 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
6742
6743         * inssel-long.brg: Fix #74588.
6744
6745         * cpu-amd64.md: Fix #74591.
6746
6747         * iltests.il: Add new regression tests.
6748
6749 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
6750
6751         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
6752         valuetype.
6753
6754 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
6755
6756         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
6757
6758         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
6759         from Bill Middleton <flashdict@gmail.com>.
6760
6761 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
6762
6763         * arrays.cs: Add new regression test. Fix warnings.
6764
6765 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
6766
6767         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
6768         and leakage in CKFINITE.
6769
6770         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
6771         this to a null op since it is called on amd64 too.
6772
6773         * exceptions-amd64.c (get_throw_trampoline): Align stack.
6774
6775         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
6776         body since this is not used on amd64.
6777         
6778         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
6779
6780         * mini-amd64.c: Remove obsolete fixmes.
6781
6782         * mini.c (print_method_from_ip): Fix debugging support.
6783
6784 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
6785
6786         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
6787         so that expressions that don't give much gain are not reduced.
6788         * ssapre.h: Likewise.
6789
6790 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
6791
6792         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
6793
6794         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
6795
6796         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
6797
6798 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
6799
6800         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
6801
6802         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
6803
6804 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
6805
6806         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
6807         stack touching.
6808
6809         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
6810
6811         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
6812
6813         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
6814
6815         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
6816         MONO_ARCH_USE_SIGACTION. Fixes #74252.
6817
6818         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
6819
6820         * mini-x86.c: Fix up stack overflow handling.   
6821
6822         * exceptions.cs: Add new regression test.
6823
6824 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
6825
6826         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
6827         mono_jit_thread_attach.
6828
6829         * mini.c (mono_method_to_ir): Verify called method is not abstract.
6830
6831 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6832
6833         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
6834         avoid calling constructors using callvirt.
6835
6836         * inssel.brg: Fix #74073.
6837
6838 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
6839
6840         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
6841         compilation with non-GCC compilers.
6842         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
6843         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
6844
6845 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
6846
6847         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
6848         klass->interface_offsets (will likely fix bug#74073).
6849
6850 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
6851
6852         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
6853
6854 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
6855
6856         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
6857         to amd64_div_reg_size ().
6858         
6859         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
6860
6861 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
6862
6863         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
6864
6865 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6866
6867         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
6868
6869 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
6870
6871         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
6872         
6873         * mini.c (mono_precompile_assembly): Load and precompile referenced
6874         assemblies as well. Fixes #74015.
6875
6876 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
6877
6878         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
6879
6880 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
6881
6882         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
6883         a lot of checks and (anyway) permissions cannot work until corlib is 
6884         loaded.
6885
6886 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
6887
6888         * mini-ppc.c: fixed ABI issue on sysv/ppc.
6889
6890 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
6891
6892         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
6893         calls (fixes bug#72824).
6894
6895 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6896
6897         * mini.c: fix tail recursion elimination (see test in bug#73936).
6898
6899 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
6900
6901         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
6902         some fp functions in sse2 mode.
6903
6904 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
6905
6906         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
6907
6908 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
6909
6910         * mini.h mini.c: Add mono_get_jit_tls_key ().
6911
6912         * mini-x86.c: Enable fast TLS support on windows.
6913
6914 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
6915
6916         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
6917         * mini.c: Check for p/invoke method when generating code. If a
6918         p/invoke method, or it's class, isn't decorated with [Suppress
6919         UnmanagedCodeSecurity] then generate code to call System.Security.
6920         UnmanagedDemand (only if the security manager is active).
6921
6922 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6923
6924         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
6925         last change as it seems to cause strange crashes.
6926         
6927 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
6928
6929         * *.c: handle unsafe function pointers where needed.
6930
6931 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6932
6933         * mini.c (mono_jit_free_method): Remove the fixme too.
6934
6935 2005-03-15  Miguel de Icaza  <miguel@novell.com>
6936
6937         * mini.c: As discussed, make the code actually free the delegate
6938         thunk now, to enable the debugging of delegate problems, use
6939         MONO_DEBUG=1 when running Mono. 
6940
6941         This takes also care of parts of the leaks as seen by Joe.
6942
6943 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
6944
6945         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
6946         thread_tls_offset calculation.
6947
6948 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
6949
6950         * declsec.c: Reworked linkdemand checks for icall. The previous code
6951         was using the declaration code (untrusted) and didn't work as expected
6952         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
6953         specific case.
6954
6955 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
6956
6957         * iltests.il: Add new localloc test.
6958
6959         * mini-amd64.c: Handle large stack allocations the same way as on
6960         windows if stack overflow handling is working.
6961         
6962         * mini-amd64.c: Allocate the signal stack using mmap.
6963
6964         * mini.c (sigsegv_signal_handler): Fix reading of context.
6965
6966         * mini-exceptions.c: Fix up stack overflow handling.
6967
6968         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
6969
6970         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
6971
6972         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
6973
6974         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
6975
6976         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
6977         tramp_init functions as they are no longer needed.
6978
6979 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
6980
6981         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
6982         
6983         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
6984
6985         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
6986         
6987         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
6988         support that now.
6989
6990         * mini-ops.h: Add OP_LMUL_IMM.
6991
6992         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
6993         long mul/div opcodes as intrinsic.
6994
6995         * mini-amd64.c (emit_call): Handle the case when the callee might be
6996         an AOT method.
6997
6998 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
7001         extra safe.
7002         
7003         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
7004
7005         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
7006
7007 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
7008
7009         * mini.c (mono_codegen): Don't leak here, to help people running
7010         monogrind.
7011
7012 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
7013
7014         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
7015         conversions in sse2 mode.
7016
7017         * basic-float.cs: Add regression test.
7018         
7019         * mini-amd64.c: Reenable sse2.
7020
7021 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7022
7023         * mini-amd64.c: Disable sse2 until some regressions are fixed.
7024
7025 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
7026
7027         * driver.c: Copyright text should include 2005.
7028         
7029 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
7030
7031         * cpu-amd64.md (load_membase): Fix more max lengths.
7032
7033 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
7034
7035         * cpu-amd64.md (load_membase): Fix max length.
7036
7037         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
7038
7039         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
7040
7041         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
7042         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
7043
7044         * basic-float.cs: Add rounding regression test.
7045
7046         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
7047
7048 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
7049
7050         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
7051         structures in registers for pinvoke wrappers.
7052
7053 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
7054
7055         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
7056
7057 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
7058
7059         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
7060         wrapper to mono_jit_thread_attach.
7061
7062         * mini.c (mini_jit_thread_attach): New jit icall.
7063
7064         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
7065         native->managed wrappers.
7066
7067         * exceptions.cs: Add new regression test.
7068
7069         * mini.c (optimize_branches): Check regions in the cbranch to throw
7070         block case as well. Fixes #73242.
7071
7072 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7073
7074         * mini.c: thread safety fixes.
7075
7076 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
7077
7078         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
7079         patching stuff, since delegates use jump trampolines so there is
7080         no caller.
7081
7082         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
7083         jump trampolines.
7084         
7085         * tramp-amd64.c: Fix build.
7086
7087         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
7088         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
7089
7090         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
7091         Rename this to mono_arch....
7092         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
7093
7094         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
7095
7096         * mini-amd64.c (emit_call): If both the caller and the callee is
7097         guaranteed to have 32 bit addresses, emit a normal call.
7098
7099         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
7100
7101         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
7102         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
7103         method_ptr inside delegates.
7104
7105 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
7106
7107         * mini.c (mono_jit_free_method): Free the method info even if the native code is
7108         invalidated. Fixes #73001.
7109
7110         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
7111
7112         * mini-x86.c: Only use stdcall for pinvokes on windows.
7113
7114 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7115
7116         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
7117         * mini-x86.c: remove unreliable __thread var offset detection,
7118         use the correct accessors and enable by default.
7119
7120 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
7121
7122         * mini.c (mono_jit_free_method): Fix memory leak.
7123
7124 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
7125
7126         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
7127
7128 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
7129
7130         * cpu-amd64.md: Fix lengths of atomic opcodes.
7131
7132 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7133
7134         * driver.c: try to not imply using ICU is any good.
7135
7136 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
7137
7138         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
7139         functions as inline ops.
7140
7141         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
7142         some Interlocked functions as inline ops.
7143
7144         * mini.c (move_basic_block_to_end): Fix bug in last patch.
7145
7146         * mini.h (MonoBasicBlock): Reorganize fields a bit.
7147
7148         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
7149
7150         * mini.c: Add support for OP_NOT_TAKEN.
7151
7152         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
7153         structures in registers for pinvoke wrappers.
7154
7155         * mini-amd64.c: Fix warnings.
7156
7157 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
7158
7159         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
7160
7161         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
7162
7163         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
7164         address instead of loading the address from it.
7165
7166         * mini-x86.c: Add support for returning small structs in registers
7167         on Win32. Fixes part of #70864.
7168         
7169 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
7170
7171         * trace.c (get_token): Improve error checking.
7172
7173 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
7174
7175         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
7176
7177 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
7178  
7179         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
7180         it can be reused for MonoClass.
7181         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
7182         _LINKDEMAND.
7183
7184 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
7185
7186         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
7187         instead of a MonoReflectionMethod. The method information wasn't used
7188         when displaying SecurityException details (but will be now).
7189
7190 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
7191
7192         * Makefile.am : windows build fix.
7193
7194 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
7195
7196         * iltests.il: Add new regression test.
7197
7198         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
7199         #72522.
7200
7201 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
7202  
7203         * mini.c: Moved linkdemand check into helper function check_linkdemand
7204         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
7205         LDFTN, LDVIRTFTN).
7206
7207 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
7208
7209         * declsec.c: Added statistics counter for different kinds of 
7210         LinkDemands.
7211         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
7212         (and commented) declaration.
7213         * mini.c: Added statistics counter for security Demand code 
7214         generation. Added display of security statistics.
7215
7216 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
7217
7218         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
7219         Fix compilation errors under gcc-2.95.
7220
7221 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
7222
7223         * mini.c, driver.c: Use the new jit trampoline hashtable
7224
7225 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7226
7227         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
7228
7229 2005-02-11  Martin Baulig  <martin@ximian.com>
7230
7231         * debug-mini.c (mono_debug_close_method): Free the line number array.
7232
7233 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
7234
7235         * aot.c: Break up large methods into smaller ones. Share GOT slots for
7236         icalls.
7237
7238         * mini.h: Bump AOT file format version. 
7239
7240 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
7241
7242         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
7243         APTC and P/Invoke.
7244         * declsec.h: Added macros to get/set lazyly initialized security 
7245         informations about assemblies. Added new enum for different type of
7246         possible LinkDemand violation. Added function to check LinkDemands.
7247         * mini.h: Added a field to MonoCompile to hold any security violation
7248         detected when JITting a method (so it can be thrown later).
7249         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
7250         and CEE_CALLVIRT. Added code to throw exception at the end of
7251         mini_method_compile (note: the exception is unhandled right now).
7252
7253 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
7254
7255         * mini.c, jit-icalls.c: use the managed implementation of
7256         memset for initobj and memset, to avoid managed <-> unmanaged
7257         transitions.
7258
7259 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
7260
7261         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
7262         optimization if it would need a GOT var.
7263
7264         * basic.cs: Add tests for constant propagation and switch statements.
7265
7266         * ssa.c: Fix out-of-range constant propagation and switch statements.
7267
7268 2005-02-09    <vargaz@freemail.hu>
7269
7270         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
7271
7272 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
7273
7274         * cpu-amd64.md (load_membase): Fix max length of load_membase.
7275
7276 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
7277
7278         * mini.c: update to new signature of mono_class_get_allocation_ftn().
7279
7280 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
7281
7282         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
7283         arithmetic operations.
7284
7285 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
7286
7287         * mini-ppc.c: add a workaround for broken user code that
7288         DllImports vararg functions with non-vararg signatures.
7289
7290 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
7291
7292         * mini.c (mono_jit_compile_method_inner): Add detection and a 
7293         meaningfull error message for assemblies written in Managed C++.
7294
7295         * tramp-amd64.c mini-amd64.h: Add support for 
7296         create_trampoline_from_token ().
7297
7298         * aot.c mini-x86.c abcremoval.c: Applied patch from
7299         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
7300
7301 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
7302
7303         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
7304         which takes a MonoImage/token as parameter instead of a MonoMethod.
7305
7306         * aot.c: Use the new trampoline for initializing vtables.
7307
7308         * aot.c: Add support for ldfld/stfld_remote wrappers.
7309
7310         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
7311         rules for compare <MEM>, IMM.
7312
7313         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
7314
7315         * aot.c: Handle inherited finalizers correctly.
7316
7317 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
7318
7319         * inssel.brg (stmt): Add a missing _setup_... ().
7320
7321         * aot.c: Save some parts of the class state to the AOT file and use it
7322         to recompute that state when a class is initialized.
7323
7324         * mini.c: Install AOT hooks into the runtime.
7325
7326         * mini.h: Bump AOT file format version.
7327         
7328         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
7329         Fixes #72148.
7330
7331         * iltests.il: Add new test.
7332
7333 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
7334
7335         * mini.c: fix typo.
7336
7337 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
7338
7339         * mini.c: setup the statistical profiler in the thread attach
7340         callback to cope with the new single thread code.
7341
7342 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
7343
7344         * mini-ppc.c: ensure we have enough room for the profiler
7345         calls (fixed bug#72084).
7346
7347 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
7348
7349         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
7350         it.
7351
7352 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7353
7354         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
7355
7356 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7357
7358         * ssapre.c: Fixed an issue with down safety (this allows IronPython
7359         to succesfully execute parrotbench).
7360         * ssapre.h: Likewise.
7361
7362 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
7363
7364         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
7365         variable for stores to method arguments (fixes a SSAPRE issue).
7366
7367 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7368
7369         * mini.c: handle value types in dup, fixes gen-112.cs.
7370
7371 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
7372
7373         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
7374         sequence for calls in dynamic methods to avoid thunks.
7375
7376 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
7377
7378         * mini.c: correctly remove dynamic methods from the hashtable.
7379
7380 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7381
7382         * driver.c: Disabled SSAPRE until fix the bug that appears
7383         in IronPython's parrotbench.
7384
7385 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
7386
7387         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
7388
7389         * mini.c (mono_method_to_ir): Revert the previous change.
7390         
7391         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
7392         when AOT compiling.
7393
7394         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
7395         mono_jit_info_table_find () etc. when running under valgrind.
7396
7397         * inssel.brg: Fix warnings.
7398
7399         * mini-exceptions.c: Fix warnings.
7400
7401 2005-01-31  Martin Baulig  <martin@ximian.com>
7402
7403         * driver.c (compile_all_methods_thread_main): Don't try to compile
7404         generic methods or anything which has type parameters.
7405
7406 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
7407
7408         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
7409
7410         * TestDriver.cs: Add --verbose flags.
7411
7412         * graph.c ssa.c: Fix 64 bit warnings.
7413         
7414         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
7415         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
7416         Fix 64 bit warnings.
7417
7418         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
7419         variable not spotted by gcc.
7420         
7421         * mini-amd64.c inssel-amd64.brg: Applied patch from  
7422         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
7423         X86_COMPARE_MEMBASE opcodes.
7424
7425         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
7426
7427 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
7428
7429         * *: MonoMethod->signature might be NULL now. You *MUST* use
7430         mono_method_signature.
7431
7432 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7433
7434         * driver.c (compile_all_methods_thread_main): Compile the methods
7435         without invoking cctors.
7436
7437 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7438
7439         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
7440         * basic-calls.cs: test for the above.
7441
7442 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
7443
7444         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
7445         MonoJitInfo changes.
7446
7447 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
7448
7449         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
7450         eagerly if it contains dynamic methods.
7451         
7452         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
7453
7454         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
7455         trace, it is now computed by an icall from trace_ips.
7456         
7457         * mini-exceptions.c: Fix a warning.
7458
7459 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
7460
7461         * mini-exceptions.c: don't bother getting stack trace info if
7462         it's not going to be used.
7463
7464 2005-01-27  Raja R Harinath  <rharinath@novell.com>
7465
7466         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
7467         ssapre-mini-ops.h.
7468
7469 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
7470
7471         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
7472
7473         * aot.c: Avoid calling mono_method_get_header () if not needed.
7474
7475         * mini.h: Bump AOT file format version.
7476         
7477         * mini.c (mono_emit_native_call): Allocate a GOT var here.
7478
7479         * mini.c (mono_print_tree): Print more info for calls.
7480
7481 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
7482
7483         * declsec.h: Remove warning by adding missing include for marshal.h
7484
7485 2005-01-26  Martin Baulig  <martin@ximian.com>
7486
7487         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
7488         `ip' twice.
7489
7490 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
7491
7492         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
7493         flags.
7494
7495         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
7496
7497         * aot.c (mono_compile_assembly): Fix a warning.
7498
7499 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
7500
7501         * declsec.c: Look for security attributes on the original MonoMethod 
7502         (and not the wrapped one). This fix permissions on icalls.
7503
7504 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
7505
7506         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
7507
7508         * mini.c (mono_allocate_stack_slots): Add a fixme.
7509
7510         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
7511
7512 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
7513
7514         * inssel.brg: optimize casts of sealed types (more
7515         optimizations waiting for fixes in remoting).
7516
7517 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
7518
7519         * inssel.brg (stmt): Add another dummy rule.
7520
7521         * driver.c: Fix warnings.
7522
7523         * driver.c (mono_main): If running under valgrind, instruct glib to use
7524         the system allocation functions so valgrind can track the memory
7525         allocated by the g_... functions.
7526
7527         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
7528
7529         * mini-ops.h: Add OP_DUMMY_STORE opcode.
7530
7531         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
7532
7533         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
7534         variables in try regions.
7535
7536         * mini.c (mini_method_compile): Don't disable optimizations on large
7537         methods when AOT compiling.
7538
7539         * mini.c (mono_allocate_stack_slots): New arch independent method to 
7540         allocate stack slots. Not yet used.
7541
7542 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
7543
7544         * debug-mini.c (mono_debug_close_method): Plug some leaks.
7545
7546 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
7547
7548         * mini-ppc.c: make the branch info relative as the code
7549         buffer can be reallocated.
7550
7551 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
7552
7553         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
7554         * driver.c: Removed the AOT/security restriction. Now initialize the
7555         security manager (in metadata) if --security is used.
7556         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
7557         rather than the pointer to declarative security, when AOT is used.
7558
7559 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
7560
7561         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
7562         basic blocks, reduced intrinsic exception throwing code size.
7563
7564 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
7565
7566         * driver.c (mini_usage): Reorder the usage screen.
7567
7568 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
7569
7570         * mini.c (mono_resolve_patch_target): Fix warning.
7571
7572 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
7573
7574         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
7575         previous patch.
7576
7577         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
7578
7579         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
7580         breaks the amd64 build.
7581
7582         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
7583         register allocation. Fixes #71454.
7584
7585         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
7586
7587         * arrays.cs: Add new regression test.   
7588
7589 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7590
7591         * ssapre.c: Turned usage of snprintf to GString.
7592         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
7593         (I left it on by mistake in my previous commit).
7594
7595 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
7596
7597         * mini.c, cfold.c, basic-calls.cs: preserve side effects
7598         on cond branch optimization (fixes bug# 71515).
7599
7600 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7601
7602         * abcremoval.c: Fixed bug 71062.
7603         * abcremoval.h: Likewise.
7604
7605 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
7606
7607         * mini.c: Added a new functionality to optimize_branches, the removal
7608         of useless basic blocks, and fixed some problem in the removal of
7609         critical edges; some utility functions added for both purposes.
7610         * ssapre.c: Added complex expression support, and fixed bug 70637.
7611         * ssapre.h: Likewise.
7612         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
7613         enabled in SSAPRE.
7614         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
7615         * driver.c: Re-enabled SSAPRE.
7616
7617 2005-01-19  Martin Baulig  <martin@ximian.com>
7618
7619         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
7620         the result of mono_get_method_constrained().
7621
7622 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
7623
7624         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
7625         manager.
7626
7627 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
7628
7629         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
7630         be detected.  Fixes #59296.
7631
7632 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7633
7634         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
7635         which can happen. Fixes #71361.
7636
7637 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7638
7639         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
7640         manager.
7641
7642 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7643
7644         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
7645         appdomain-unload.exe to fail.
7646         
7647         * mini.c: Fix some memory leaks.
7648
7649 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
7650
7651         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
7652         Fixed bug and sped up some codepaths.
7653
7654 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7655
7656         * mini.c: Fix some memory leaks.
7657
7658         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
7659         conversion.
7660
7661         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
7662
7663         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
7664         #71320.
7665
7666         * iltests.il: Add regression test for #71320.
7667
7668 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
7669
7670         * mini.c (mono_codegen): Fix installation of profiler hooks.
7671
7672         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
7673
7674 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7675
7676         * mini.h, mini.c, cfold.c: optimize access to enum
7677         readonly fields, too. Eval conditional branches if possible
7678         to perform unreachable code removal in more cases.
7679
7680 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
7681
7682         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
7683
7684         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
7685         code manager.
7686
7687         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
7688         WinXP DEP. Fixes #71244.
7689
7690 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
7691
7692         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
7693
7694 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
7695
7696         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
7697
7698 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
7699
7700         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
7701         changes.
7702
7703         * mini.h: Bump AOT version.
7704
7705         * mini.h (MonoCompile): Change exvar to a hash table.
7706
7707         * mini.c: Allocate a separate exvar for each handler block.
7708
7709         * mini.c: Get rid of the computation of filter_lengths, its not needed.
7710
7711         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
7712         ex var with the pending exception and only throw if the two are equal.
7713         Fixes #68552.
7714         
7715         * exceptions.cs: Add tests for rethrow and nested catch clauses.
7716
7717         * mini-x86.c: Fix warnings.
7718
7719         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
7720         used by all the ports now.
7721
7722         * aot.c: Add write-symbols and save-temps options.
7723
7724 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
7725
7726         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
7727
7728 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
7729
7730         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
7731         operations.
7732
7733         * tramp-s390.c: Check vtable slot belongs to the domain.
7734
7735         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
7736         as per other platforms.
7737
7738         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
7739
7740 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
7741
7742         * driver.c: we don't run the Main() code in a subthread anymore.
7743
7744 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
7745
7746         * mini.c: added experimental rtc support in the statistical
7747         profiler: if the user has the permission, more accurate statistics
7748         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
7749         The MONO_RTC value must be restricted to what the linux rtc allows:
7750         power of two from 64 to 8192 Hz.
7751
7752 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
7753
7754         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
7755
7756 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
7757
7758         * mini-ppc.c: better icache flush for smp.
7759
7760 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
7761
7762         * mini-amd64.c (emit_move_return_value): Fix memory leak.
7763
7764         * mini-x86.c (get_call_info): Add the get_call_info () code from the
7765         amd64 port, not yet used.
7766
7767 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
7768
7769         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
7770         a struct type.
7771
7772 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
7773
7774         * driver.c: Added --security option to activate the security manager.
7775         Right now this will allow code generation for declarative demands and
7776         is disabled when AOT is specified.
7777         * mini.c: Add code generation for declarative security demands.
7778         * mini.h: Add mono_use_security_manager as an extern gboolean.
7779
7780 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
7781
7782         * aot.c (mono_compile_assembly): Speed up compilation a bit by
7783         emitting more dense assembly code.
7784
7785         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
7786         exception throwing stuff.
7787
7788 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
7789
7790         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
7791         dead code.
7792
7793         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
7794         left in by mistake.
7795
7796         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
7797         fixed.
7798
7799         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
7800
7801         * tramp-*.c: Only patch vtable slots if the object is in the current
7802         domain. Fixes appdomain-unload.exe.
7803
7804         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
7805         
7806         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
7807         x86 branch.
7808
7809 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * mini.c (reverse_branch_op): New helper function.
7812
7813         * mini.c (optimize_branches): Run the new optimization only on 
7814         platforms which support it. Also reverse all kinds of branches.
7815
7816         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
7817
7818         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
7819         a throw statement.
7820
7821         * mini.c (optimize_branches): Reverse not-equals branches if the false
7822         bblock is a throw. This happens a lot of time with argument checking in
7823         corlib.
7824
7825         * mini.c (mono_codegen): Add support for placing basic blocks after
7826         the function epilogue.
7827
7828         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
7829         function epilogue.
7830         
7831 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
7832
7833         * mini.c (setup_stat_profiler): Only set this up if the platform
7834         supports ITIMER_PROF.
7835
7836 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7837
7838         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
7839         previous patch.
7840
7841         * inssel.brg: Fix a warning.
7842
7843 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
7844
7845         * mini.c: added support for statistical profiler 
7846         (run with: --profile=default:stat).
7847
7848 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
7849
7850         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
7851
7852         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
7853
7854         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
7855         related to global registers from the amd64 port.
7856
7857 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
7858
7859         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
7860
7861         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
7862         with global registers.
7863         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
7864
7865         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
7866
7867 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
7868
7869         * debug-mini.c (encode_value): Fix off-by-one.
7870
7871         * aot.c (encode_value): Likewise.
7872
7873         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
7874
7875 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
7876
7877         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
7878         AOT.
7879
7880         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
7881         
7882         * aot.c (emit_method_info): Increase size of temp buffer.
7883
7884         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
7885         the AOT case.
7886
7887 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
7888
7889         * aot.c (emit_method_info): Fix build.
7890         
7891         * aot.c: Further rework of the AOT file format to reduce the size of
7892         the method info data.
7893
7894         * mini.h: Bump AOT file format version.
7895
7896 2004-12-27  Martin Baulig  <martin@ximian.com>
7897
7898         * mini.c (mini_get_method): New static method; call
7899         mono_get_method_full() and mono_get_inflated_method().
7900         (mono_method_to_ir): Use mini_get_method() instead of
7901         mono_get_method_full(). 
7902
7903 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
7904
7905         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
7906
7907 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
7908
7909         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
7910
7911         * inssel-amd64.brg: Add some optimization rules.
7912
7913 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
7914
7915         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
7916         standard not GC'd stuff is fine.
7917
7918 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
7919
7920         * aot.c: Rework the AOT file format to get rid of most of the global
7921         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
7922
7923         * mini.h: Bump AOT file format version.
7924         
7925 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
7926
7927         * mini.h: Bump AOT file format version.
7928
7929         * aot.c (mono_aot_is_got_entry): New function to determine if an 
7930         address is inside a GOT.
7931
7932         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
7933
7934         * cpu-pentium.md: Increase the maximum size of some instructions which
7935         might involve a got access.
7936         
7937         * mini.c (get_method_from_ip): Another debug helper function.
7938
7939         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
7940         when got var accesses are created during the decompose phase.
7941
7942         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
7943
7944         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
7945         argument mini_compile_method and to MonoCompile, and use this to
7946         determine whenever a given method is compiled for AOT. This allows the
7947         other methods compiled during AOT compilation to be free of AOT stuff,
7948         so the backends does not need to add special support for them by
7949         creating a fake GOT etc.
7950
7951         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
7952         longer needed.
7953
7954 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
7955
7956         * mini.c (mono_method_to_ir): It turns out that some of the
7957         x-appdomain wrappers are lax with types, so just ignore this for
7958         all wrappers.
7959
7960         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
7961         at the vtable->klass. If it is non-shared code we can just use the
7962         vtable.
7963
7964 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
7965
7966         * mini-ppc.c: access MonoDomain from tls, too.
7967
7968 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
7969
7970         * declsec.c: Removed unused variable (and related warning ;-)
7971
7972 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
7973
7974         * iltests.il: New test for LDELEMA on an array of ref types.
7975
7976         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
7977         all ldelema's on reftypes.
7978         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
7979         it was the wrong place to put it.
7980
7981         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
7982         register to pop to make this cleaner, at the request of Paolo.
7983
7984 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
7985
7986         * mini-ops.h (OP_GETHASHCODE): New op.
7987
7988         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
7989
7990         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
7991         operation.
7992
7993         For a microbenchmark, this reduces the cost of Hashtable.get_Item
7994         by 25%.
7995         
7996         * mini-x86.c (mono_arch_output_basic_block): Rather than
7997
7998         add ebp, 4
7999
8000         Emit
8001
8002         pop edx
8003
8004         The first is 3 bytes while the second is 1. This saves 36 kb on
8005         mscorlib, quite a big saving. When bootstraping mcs, I was able to
8006         see a small boost because of icache locality.
8007
8008         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
8009
8010 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
8011
8012         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
8013         started code sharing with the generic code.
8014
8015 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
8016
8017         * mini-ppc.c, cpu-g4.md: added code for direct access to
8018         tls data slots.
8019
8020 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
8021
8022         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
8023          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
8024         to OP_TLS_GET.
8025
8026 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
8027
8028         * declsec.c|h: Added functions to cache the declarative stack modifiers
8029         in MonoJitInfo and to create a security frame from a MonoJitInfo 
8030         structure.
8031         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
8032         created. Register internal calls for System.Security.SecurityFrame::
8033         _GetSecurityFrame and _GetSecurityStack.
8034         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
8035         the definitions for the new stack walk/callback mechanism.
8036         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
8037         first security frame for LinkDemands and InheritanceDemands) and
8038         GetSecurityStack for Demands. Both use the new mono_walk_stack code
8039         from lupus.
8040         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
8041         walk initialization (lupus).
8042
8043 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
8044
8045         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
8046         idiom.
8047         (handle_loaded_temps): Do not create a temporary variable for
8048         things that we know are temps. They will never be modified.
8049         (mono_spill_call): Set MONO_INST_IS_TEMP
8050         (mono_emulate_opcode): ditto
8051         (emit_tree): ditto
8052         (mono_method_to_ir.CEE_DUP): ditto
8053
8054 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
8055
8056         * mini.c (type_to_eval_stack_type): Make this handle the void type
8057         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
8058         (emit_tree): use ip_in_bb to special case some common idioms
8059         Update all callers to pass in the IP.
8060         (mono_method_to_ir): Make CEE_CALL* do the above as well.
8061
8062         This gives us a nice 2% speedup in mcs bootstrap.
8063
8064         * mini-x86.c (peephole_pass): Peephole pass to make
8065         mov  [foo], eax
8066         push [foo]
8067
8068         into
8069
8070         mov [foo], eax
8071         push eax
8072
8073         * mini.c (ip_in_bb): new method.
8074         (mono_method_to_ir): use this method rather than doing the hash
8075         lookup ourselves.
8076
8077         * linear-scan.c (mono_linear_scan): When expiring actives, you
8078         don't need to keep around variables that expire on this
8079         instruction. This makes it so that:
8080              a = b + 1
8081         will turn into:
8082              store (ebx add (ebx, 1))
8083         which will become
8084              add ebx, 1
8085
8086 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
8087
8088         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
8089         combination to avoid doing two copies. Fix up problems with previous
8090         patch.
8091
8092         * mini.c: Fix 64 bit warnings.
8093
8094         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
8095
8096 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
8097
8098         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
8099         changes from the x86 code.
8100
8101         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
8102
8103 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
8104
8105         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
8106         throwing code to reduce its size, unify the AOT and non-aot code and 
8107         get rid of relocations in the AOT case.
8108
8109         * mini-x86.h mini.c exceptions-x86.c 
8110         (mono_arch_get_throw_corlib_exception): New arch specific function to 
8111         raise corlib exceptions which doesn't require relocations in the 
8112         caller.
8113
8114         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
8115
8116 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
8117
8118         * mini.c (mono_emit_method_call): Only allocate the got var when it is
8119         needed.
8120
8121         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
8122         in the AOT case.
8123
8124 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8125
8126         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
8127         with add function when used from Inc/dec atomic 
8128         functions. Re-enabled optimization on x86.
8129         * mini-ops.h: renamed atomic_add functions to
8130         allow _add to match the Interlocked::Add and
8131         _add_next to match Interlocked::Inc/Dec.
8132
8133 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
8134
8135         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
8136         linking of BBs to the end BB, and enabled SSAPRE also with
8137         consprop and copyprop (which was prevented by that bug).
8138
8139 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8140
8141         * mini-x86.c: disabling the Interlocked optimizing code. 
8142
8143 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8144
8145         * aot.c (load_aot_module): Move reading of got_addr after the AOT
8146         file version check.
8147         
8148 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
8149
8150         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
8151         interlocked optimization due lack of support on x86, rewrote 
8152         exchange to take into account that base may be in eax.
8153         
8154         xsp works again; activated Interlocked optimizing code.
8155         
8156 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
8157
8158         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8159
8160 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
8161
8162         * mini-ops.h: Add new opcodes.
8163
8164         * mini.h: Add new patch types. Add got_var to MonoCompile.
8165
8166         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
8167         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
8168         make it work with all kinds of patchable code.
8169
8170         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
8171         address of the GOT, and referencing entries in the GOT.
8172
8173         * mini.c: Add code to load the GOT address if needed by an opcode.
8174
8175         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
8176         independent AOT code on the x86 using an elf-style Global Offset Table.
8177
8178 2004-12-14  Raja R Harinath  <rharinath@novell.com>
8179
8180         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
8181
8182 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8183
8184         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
8185         when running xsp.
8186
8187 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
8188
8189         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
8190         of Interlocked:Increment/Decrement/Add as inline ops.
8191         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
8192
8193 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
8194
8195         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
8196         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
8197
8198 2004-12-12  Duncan Mak  <duncan@ximian.com>
8199
8200         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
8201         again. `patch_info->table_size' is no longer valid after Zoltan's
8202         commit #37636.
8203
8204 2004-12-12  Martin Baulig  <martin@ximian.com>
8205
8206         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
8207         if we are the "real" method, ie. not an inlined method inside it.
8208
8209 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
8210
8211         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
8212         before we look in the special fields table. This fixes
8213         ../tests/thread-static-init.cs.
8214
8215 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8216
8217         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
8218         for Array get_Rank and get_Length. Fixes bug #70465.
8219
8220 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
8221
8222         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
8223         separate structure to reduce the size of MonoJumpInfo.
8224
8225 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
8226
8227         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
8228
8229 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
8230
8231         * mini.c (mini_get_inst_for_method): Changed to allow ports
8232         to return a MonoInst instead of opcode 
8233         (renamed mini_get_opcode_for_method to better reflect the new functionality)
8234         
8235         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
8236         Allow ports to return a created MonoInst instead of op-code, will enable
8237         new optimizations.
8238         (renamed mini_get_opcode_for_method to better reflected the functionality)
8239
8240 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
8241
8242         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
8243
8244 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8245
8246         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
8247         Fixes #69985.
8248
8249 2004-12-08  Martin Baulig  <martin@ximian.com>
8250
8251         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
8252         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
8253
8254 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
8255
8256         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
8257         correctly.
8258
8259         * exceptions.cs: Disable some tests which depend on properties of x86 fp
8260         arithmetic.
8261
8262 2004-12-08  Raja R Harinath  <rharinath@novell.com>
8263
8264         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
8265
8266 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
8267
8268         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
8269         bug introduced by the previous patch.
8270
8271 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
8272
8273         * mini-ppc.c, objectc.cs: handle large structs passed by value
8274         (fixes bug #69972).
8275
8276 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
8277
8278         * mini-ppc.c: OP_ARGLIST implementation from
8279         Geoff Norton  <gnorton@customerdna.com>.
8280
8281 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
8282
8283         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
8284         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
8285
8286 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
8287
8288         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
8289
8290 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8291
8292         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
8293         support.
8294
8295 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
8296
8297         * mini-sparc.c: Zero out localled-ed memory.
8298
8299         * iltests.il: Add tests for zeroing out localloc-ed memory.
8300
8301 2004-12-04  Martin Baulig  <martin@ximian.com>
8302
8303         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
8304         mono_method_get_signature_full().       
8305
8306 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
8307
8308         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
8309         and some utility functions (always for SSAPRE), integrated SSAPRE.
8310         * mini.h: Likewise.
8311         * driver.c: Added ssapre option.
8312         * ssa.c: Small fix on OP_ARG handling.
8313         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
8314         * Makefile.am: Likewise.
8315
8316 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
8317
8318         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
8319         now in the xp code.
8320
8321         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
8322         icall.
8323
8324 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8325
8326         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
8327         
8328         * cpu-s390.md : Increase instruction length of oparglist.
8329
8330         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
8331
8332 2004-11-30  Martin Baulig  <martin@ximian.com>
8333
8334         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
8335         virtual generic methods.  We call a special helper_compile_generic_method()
8336         icall to retrieve the method from the vtable, inflate and compile
8337         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
8338
8339         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
8340
8341 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
8342
8343         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
8344
8345 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
8346
8347         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
8348         Fixes #69929.
8349
8350 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
8351
8352         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
8353         platforms with PIC aot.
8354
8355 2004-11-28  Martin Baulig  <martin@ximian.com>
8356
8357         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
8358         Fixes gen-112.cs.
8359
8360 2004-11-28  Martin Baulig  <martin@ximian.com>
8361
8362         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
8363         the result of mono_type_get_underlying_type() to check whether
8364         we're byref.
8365
8366 2004-11-26  Martin Baulig  <martin@ximian.com>
8367
8368         * mini.c
8369         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
8370         in the g_assert().
8371
8372 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
8373
8374         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
8375         the same way as the other arguments so they won't get clobbered.
8376
8377         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
8378         calls through R11 since it is clobbered by the trampoline code.
8379
8380 2004-11-26  Raja R Harinath  <rharinath@novell.com>
8381
8382         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
8383         pick up in-tree mscorlib.dll.
8384
8385 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
8386
8387         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
8388
8389         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
8390         runtime data/code are now stored in a table similar to the GOT in ELF. 
8391         This allows the code itself to be position independent.
8392
8393         * aot.c: Fix loading of referenced assemblies after the lazy assembly
8394         loading changes.
8395
8396         * aot.c: Attach ELF type (object/function) directives to all global
8397         symbols.
8398
8399         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
8400
8401         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
8402
8403         * mini-amd64.h: Turn on PIC AOT code.
8404
8405         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
8406         returning the offset within an OP_AOTCONST instruction where the GOT
8407         offset needs to be added.
8408
8409         * mini.h: Bump AOT file format version.
8410
8411 2004-11-25  Martin Baulig  <martin@ximian.com>
8412
8413         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
8414         uninflated generic methods.
8415
8416 2004-11-25  Martin Baulig  <martin@ximian.com>
8417
8418         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
8419
8420 2004-11-24  Martin Baulig  <martin@ximian.com>
8421
8422         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
8423         original klass (this only applies for generic instances).
8424
8425 2004-11-24  Martin Baulig  <martin@ximian.com>
8426
8427         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
8428         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
8429         that array).
8430
8431 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
8432
8433         * mini.c (mono_method_to_ir): Disable inlining for methods containing
8434         localloc. Fixes #69678.
8435
8436         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
8437         
8438 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
8439
8440         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
8441         used SSE registers on pinvoke calls. Fixes #69774.
8442
8443 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
8444
8445         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
8446         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
8447
8448 2004-11-23  Raja R Harinath  <rharinath@novell.com>
8449
8450         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
8451         Refer directly to the mcs/ tree.
8452
8453 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8454
8455         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
8456         Check if a trampoline for a synchronized method is required. 
8457
8458 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
8459
8460         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
8461         with localloc if needed. Throe arithmetric exception in
8462         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
8463         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
8464
8465 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
8466
8467         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
8468         types before switching on type.  Fixes #69622.
8469
8470 2004-11-19  Raja R Harinath  <rharinath@novell.com>
8471
8472         * Makefile.am (check-local): New.  Integrate into 'make check'.
8473         (MCS,RUNTIME): Define using in-tree mono and mcs.
8474         (ILASM): New.
8475         (%.exe): Use $(ILASM).
8476
8477 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
8478
8479         * mini-ppc.c: adjust initial prolog size (bug #69691).
8480
8481 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
8482
8483         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
8484         #69664.
8485
8486 2004-11-17  Raja R Harinath  <rharinath@novell.com>
8487
8488         * Makefile.am (clean-local): Rename from 'clean'.
8489
8490 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8491
8492         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
8493         to mono_arch_is_int_overflow. 
8494         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
8495         SIGFPE events.
8496
8497 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
8498
8499         * declsec.c|h: New files to support declarative security attributes.
8500         Added function to check if a method has (applicable) security.
8501         * mini.c|h: Add check for declarative security attributes in
8502         mono_method_check_inlining.
8503         * Makefile.am: Added declsec.c and declsec.h to the build.
8504
8505 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
8506
8507         * mini.c, mini.h: update to keep dynamic code info per-domain.
8508
8509 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
8510
8511         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
8512         (mini_init): Get rid of it from here too.
8513
8514 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8515
8516         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
8517         implemented OP_RETHROW (patch by Geoff Norton
8518         <gnorton@customerdna.com>).
8519
8520 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
8521
8522         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
8523         between appdomains.  Fixes appdomain-unload on PPC.
8524
8525 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
8526
8527         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8528         mini-exceptions.c: handle the new wrapper types.
8529         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
8530         token value as a MonoClass* when compiling a wrapper.
8531         mono_jit_create_remoting_trampoline now takes an additional
8532         MonoRemotingTarget parameter.
8533         
8534 2004-11-10  Martin Baulig  <martin@localhost>
8535
8536         * mini.c (mono_method_to_ir): Use `generic_container->context'
8537         rather than creating a new one.
8538
8539 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8540
8541         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
8542
8543         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
8544
8545 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
8546
8547         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
8548         the experimental aot cache stuff.
8549
8550 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
8551
8552         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8553         mini-exceptions.c: update to exception clause structure changes.
8554
8555 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8556
8557         * exceptions-x86.c (throw_exception): Fix warnings.
8558
8559         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
8560         for OP_RETHROW.
8561
8562 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * exceptions-sparc.c (get_throw_exception): Really fix this.
8565
8566 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
8567
8568         * tramp-*.c: we no longer support icalls without wrappers, so
8569         a bit of code can be removed here
8570
8571 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
8572
8573         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
8574         patch.
8575
8576         * cpu-sparc.md: Add op_rethrow.
8577
8578         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
8579
8580         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
8581
8582         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
8583         * mini-ops.h: Add OP_RETHROW.
8584
8585         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
8586
8587         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
8588
8589 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
8590         
8591         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
8592         Makes the output much easier to read
8593
8594 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
8595
8596         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
8597         prevents another huge leak when compiling with ssa. Secondly, the
8598         performance of doing this rather than freeing the lists is much
8599         better. GList does a lock every time you allocate a list link,
8600         so that it can use a memory pool. So, it is better to just use
8601         a memory pool of our own.
8602         
8603         * ssa.c, linear-scan.c: replace g_list_remove_link with
8604         g_list_delete.  The remove one does not free the GList, so we were
8605         leaking memory. On -O=all --compile-all with corlib, this cut down
8606         3 MB of allocations.
8607
8608 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
8611
8612         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
8613
8614         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
8615         into a new function mono_create_jit_trampoline ().
8616
8617 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
8618
8619         * trace.c (get_spec): Allow tracing of classes without a namespace.
8620
8621 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
8622
8623         * mini.c: Fix pointer overwrite in mini_method_compile.
8624
8625 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
8626
8627         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
8628         The darwin ABI needs some special handling for 1 and 2 byte structs
8629         Lets use lbz/lhz instead of lwz everywhere.
8630         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
8631         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
8632         Use stb/sth for the former, and put the latter always on stack instead of in
8633         argument registers.
8634
8635 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
8636
8637         * trace.c (is_filenamechar): Add '_'.
8638
8639 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
8640
8641         * mini-s390.c: Fix prolog length to allow for large trace requirements.
8642
8643         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
8644
8645 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
8646
8647         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
8648         depends on libmonogc. Fixes #68805.
8649
8650 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
8651
8652         * mini.c (mono_jit_free_method): Provide extra information for
8653         this error.  Currently this leaks, but will be turned into a
8654         developer option in the future.
8655
8656 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
8657
8658         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
8659
8660 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
8661
8662         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
8663         boundary. Fixes reading of PATCH_INFO_R4 and R8.
8664         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
8665
8666 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
8667
8668         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
8669         trampolines for AOT code.
8670
8671 2004-10-22    <vargaz@freemail.hu>
8672
8673         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
8674         constructed types. Fixes #68136.
8675
8676 2004-10-21  Martin Baulig  <martin@ximian.com>
8677
8678         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
8679         if it returns true, unwind the stack to the call instruction.
8680
8681 2004-10-21    <vargaz@freemail.hu>
8682
8683         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
8684
8685         * mini.h: Bump AOT version number.
8686
8687         * objects.cs: Add another test for unbox trampolines.
8688
8689         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
8690         valuetype methods.
8691
8692 2004-10-20    <vargaz@freemail.hu>
8693
8694         * driver.c: Add SHARED to the set of optimizations tested.
8695
8696         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
8697
8698         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
8699         used by CEE_NEWARR.
8700
8701         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
8702
8703 2004-10-20  Martin Baulig  <martin@ximian.com>
8704
8705         * mini-exceptions.c (mono_handle_exception): Call
8706         mono_debugger_handle_exception() to tell the debugger about
8707         catch/finally clauses.
8708
8709 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
8710
8711         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
8712
8713         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
8714         #68447.
8715
8716 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
8717
8718         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
8719         methods as their native size, fixed bug #57543, #57545.
8720         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
8721         This saves a temporary register and mullw call down into 1 (minor perf
8722         increase for cases like sum = sum * 5;  This use to translate into:
8723             li r11,5
8724             mullw r28,r28,r11
8725         It now translates to
8726             mulli r28,r28,5
8727
8728 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
8729
8730         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
8731         #68388.
8732
8733 2004-10-11  Martin Baulig  <martin@ximian.com>
8734
8735         * mini.c (mono_method_to_ir): If we're a generic method, get the
8736         MonoGenericContainer from our MonoMethodNormal and create a
8737         MonoGenericContext from it.
8738
8739 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
8740
8741         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
8742
8743         * basic-long.cs: Add test for checked i8->i2 cast.
8744
8745 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8746
8747         * inssel-ppc.brg: added a couple of speedup rules.
8748
8749 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
8750
8751         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
8752         to speed up rebuilds.
8753
8754 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8755
8756         * mini-s390.c: Minor fix to OP_OR_IMM.
8757
8758 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
8759
8760         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
8761         better. Fixes appdomain-unload.exe on sparc.
8762
8763 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
8764
8765         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
8766         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
8767         see bug 67324.
8768
8769 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
8770
8771         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
8772
8773 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
8774
8775         * mini.c: Always generate a field read/write wrapper for members
8776         of the class MarshalByRefObject since the actual instance could
8777         be a CBO.
8778
8779 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8780
8781         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
8782
8783 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8784
8785         * driver.c mini.h trace.c: Move the setting of the main assembly into
8786         a separate function called mono_trace_set_assembly () and call it after
8787         actually loading the main assembly. Fixes #66872.
8788
8789 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
8790
8791         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
8792         using the code manager.
8793
8794 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
8795
8796         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
8797
8798 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8799
8800         * cpu-amd64.md: Fix bug in previous patch.
8801         
8802         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
8803         #66650.
8804
8805 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
8806
8807         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8808         mini-exceptions.c: updates for changed stack walk interface.
8809
8810 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8811
8812         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
8813
8814 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
8817
8818 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
8819
8820         * driver.c (mini_regression_list): Do not call mono_assembly_close 
8821         since assemblies can't be unloaded.
8822         
8823 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8824
8825         * cpu-amd64.md: Fix more instruction lengths.
8826
8827         * cpu-amd64.md: Fix lengths of some instructions.
8828
8829 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
8830
8831         * inssel.brg: Make the array ldelema check aot friendly.
8832
8833 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8834
8835         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
8836
8837         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
8838
8839 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
8840
8841         * mini-x86.c: Fix build.
8842
8843         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
8844         mono_type_get_underlying_type () helper function to simplify code.
8845         
8846 2004-09-09  Martin Baulig  <martin@ximian.com>
8847
8848         * mini-amd64.c: Don't access `type->data.klass' directly, call
8849         mono_class_from_mono_type() instead since the type may be a
8850         generic instance.
8851
8852 2004-09-09  Martin Baulig  <martin@ximian.com>
8853
8854         * mini-amd64.c (get_call_info): Fix support for generic instances.
8855         (add_valuetype): Use mono_class_from_mono_type() to get the class
8856         since we can be a generic instance.
8857
8858 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
8859
8860         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
8861
8862 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
8863
8864         * liveness.c: reset spill costs on each scan: bug 62107
8865
8866 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
8867
8868         * exceptions-sparc.c (mono_arch_find_jit_info): remove
8869         unnecessary line that doesn't compile
8870
8871 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8872
8873         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
8874         trampolines, make them call an error function so people can fix their
8875         code.
8876
8877 2004-09-06  Martin Baulig  <martin@ximian.com>
8878
8879         * mini.c (mono_method_to_ir): When initializing locals, handle a
8880         generic instances like a valuetype if it's a valuetype and like a
8881         class if it's a class.
8882
8883 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8884
8885         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
8886         stack. Fixes #64674.
8887
8888         * exceptions.cs: Add test for unwinding of call arguments.
8889
8890 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
8891
8892         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
8893         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
8894         set the carry/borrow flag). The sparc and s390 implementations
8895         can now use optimized versions (and simplify the code). ppc bugfixes.
8896
8897 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8898
8899         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
8900
8901 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
8902
8903         * inssel-amd64.brg: Remove leftover 32 bit rule.
8904
8905         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
8906
8907 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
8908
8909         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
8910         mono_arch_find_jit_info functions into a new function. Fix a memory
8911         leak.
8912
8913         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
8914         refactored code.
8915         
8916 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8917
8918         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
8919         as well.
8920         
8921         * exceptions.cs: Add array size tests.
8922
8923         * mini.c: Allocate a separate icall wrapper for each arity of 
8924         mono_array_new_va. Fixes #59509.
8925
8926         * exceptions.cs: Add testcase for 64578.
8927
8928         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
8929
8930         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
8931         
8932 2004-09-02  Martin Baulig  <martin@ximian.com>
8933
8934         * mini.c (mono_method_to_ir): When initializing the locals, call
8935         handle_initobj() on the generic instance itself, not its
8936         underlying type.
8937
8938 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8939
8940         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
8941         MonoJitInfo for dynamic methods.
8942
8943         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
8944
8945         * mini.c: Add support for freeing JIT data for dynamic methods.
8946         
8947 2004-09-01  Martin Baulig  <martin@ximian.com>
8948
8949         * mini-x86.c (is_regsize_var): Added support for generic
8950         instances.
8951         (mono_arch_emit_prolog): Make this compile again, use
8952         `x86_push_imm_template (code)'.
8953
8954 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
8955
8956         * mini-x86.c: make all push_imm instructions that get
8957         patched always emit the long form
8958
8959 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8960
8961         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
8962         in a per-domain hash.
8963
8964         * mini-amd64.c (merge_argument_class_from_type): Handle generic
8965         types.
8966
8967 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8968
8969         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
8970         work.
8971         
8972         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
8973         work.
8974
8975         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
8976         Beginnings of SSE2 support.
8977
8978         * exceptions.cs: Add more tests for checked int<->uint casts.
8979
8980 2004-08-28  Martin Baulig  <martin@ximian.com>
8981
8982         * mini-x86.c (mono_arch_instrument_epilog): Added support for
8983         generic instances.
8984
8985         * mini.c
8986         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
8987         Handle generic instances recursively.
8988
8989 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8990
8991         * iltests.il: test for conv.u8 on a constant
8992
8993 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8994
8995         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
8996         LCONV_x4 (shrun_32 (membase)).
8997
8998 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
8999
9000         * inssel-x86.brg: c&p rules for push/setret of long
9001
9002 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9003
9004         * inssel-x86.brg: c&p rules for compare (base, regvar) and
9005         compare (regvar, base)
9006
9007         * inssel-x86.brg: more burg love
9008
9009         * inssel.brg: more cleanup
9010
9011         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
9012
9013 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
9014
9015         * basic-long.cs, basic-calls.cs: new tests for optimization.
9016
9017 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9018
9019         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
9020         patch.
9021
9022 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9023
9024         * mini-amd64.c (read_tls_offset_from_method): Add another case.
9025         
9026 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
9027
9028         * inssel.brg (mini_emit_memcpy): use 
9029         NO_UNALIGNED_ACCESS to disable memcpy optimization
9030
9031 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9032
9033         * mini-amd64.c: Handle generic types in various places.
9034
9035         * mini.c (mono_method_to_ir): Handle generic types in init locals.
9036
9037 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
9038
9039         * mini.c (handle_box): Fix warning.
9040
9041         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
9042
9043         * mini-amd64.h: Enable the emit_state optimization.
9044
9045         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
9046
9047         * mini-amd64.c: Add some new 64 bit peephole opts.
9048
9049         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
9050
9051         * cpu-amd64.md: sreg1 of div instructions must be %rax.
9052
9053         * mini-amd64.c: Register allocator fixes.
9054
9055         * mini.c: Add an optimization to emit_state to avoid allocation of new
9056         registers on some platforms.
9057
9058 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9059
9060         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
9061
9062         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
9063         allocation. Fixes #63085.
9064
9065         * basic-long.cs: Add new regression test.
9066
9067         * mini-amd64.c: Register allocator improvements.
9068
9069 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
9070
9071         * mini-amd64.c (read_tls_offset_from_method): Add another code
9072         sequence.
9073
9074         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
9075         instruction sequence for nullifying class init trampolines.
9076
9077         * objects.cs: Add new regalloc test.
9078
9079         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
9080
9081 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9082
9083         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
9084         
9085         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
9086         arguments.
9087
9088         * driver.c: Fix profiling after TLS changes.
9089         
9090         * driver.c (mono_main): Set mono_stats.enabled if needed.
9091
9092         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
9093         CEE_BOX.
9094
9095 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
9096
9097         * mini-x86.c: use a 1 op rather than a 2 op tls access
9098         instruction -> faster.
9099
9100 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9101
9102         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
9103         x86 backend.
9104
9105 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
9106
9107         * exceptions-sparc.c (throw_exception): fix typo
9108
9109 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9110
9111         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
9112         set tree->dreg correctly with tls. Allow any
9113         register to be used.
9114
9115         * mini-x86.c (read_tls_offset_from_method): add new code
9116         generation pattern seen with GCC.
9117
9118
9119 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9120
9121         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
9122         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
9123         exceptions-sparc.c: fix some performance issues in exception
9124         handling and setting of the stack trace for exceptions that were
9125         already thrown.
9126
9127 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
9130         x86 backend.
9131         
9132         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
9133         registers.
9134
9135 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9136
9137         This patch inlines tls access, when possible.
9138         
9139         * mini.h: new arch functions for TLS intrinsics.
9140         All platforms updated with a stub.
9141
9142         * mini.c: use the new intrinsics
9143
9144         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
9145         arch specific intrinsic for tls variables
9146
9147 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9148
9149         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
9150         under windows.
9151
9152 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9153
9154         * mini.c: thread local allocation
9155
9156 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9157
9158         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
9159
9160         * Makefile.am: Link against the static version of libmonogc.
9161         
9162         * Makefile.am: Link the static versions of the convenience libraries
9163         into the mono executable.
9164
9165         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
9166
9167 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
9168
9169         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
9170         on integer overflow.
9171
9172         * mini-amd64.c: Reorganize function call code.
9173
9174         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
9175
9176 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9177
9178         * inssel-x86.brg: use xor eax,eax.
9179         
9180         * basic.cs: new tests
9181
9182 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9183
9184         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
9185         in exception throwing code.
9186         
9187 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9188
9189         * inssel-x86.brg: use xor esi,esi.
9190
9191 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9192
9193         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
9194         can trace methods compiled during mini_init () too.
9195
9196         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
9197         CEE_CONV_U4.
9198
9199 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
9200
9201         * Makefile.am: static link on x86 (r=zoltan)
9202
9203 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9204
9205         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
9206         code since it causes some programs to fail.
9207
9208 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
9209
9210         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
9211
9212 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
9213
9214         * mini.c: ovfops_op_map - add STACK_OBJ case for
9215         CONV_I 
9216         * basic.cs: add test_0_pin_string as test
9217         case for above.
9218
9219 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
9220
9221         * Makefile.am: build C# if srcdir != builddir
9222
9223 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9224
9225         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
9226         fall-through blocks.
9227
9228 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9229
9230         * driver.c: enable loop by default again and include abcrem in -O=all.
9231
9232 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
9233
9234         * iltests.il: Add some localloc tests.
9235
9236         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
9237
9238         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
9239         Fixes #62574.
9240
9241         * inssel-amd64.brg: Add some optimizations.
9242
9243         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
9244         for gcc-3.4.
9245
9246         * Makefile.am: Statically link mono against libmono on AMD64.
9247         
9248         * mini-amd64.c inssel-amd64.brg: Optimizations.
9249
9250 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
9251
9252         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
9253
9254         * tramp-amd64.c: Patch calling code in trampolines.
9255
9256 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
9257
9258         * mini-amd64.c: pinvoke struct passing fixes.
9259
9260 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
9261
9262         * mini-sparc.c: redo change, make mono_arch_cpu_init call
9263         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
9264
9265 2004-08-05  Duncan Mak  <duncan@ximian.com>
9266
9267         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
9268         CEE_LDELEM_ANY.
9269
9270 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9271
9272         * mini-amd64.c (emit_move_return_value): Move return value for normal
9273         calls too.
9274
9275 2004-08-05  Martin Baulig  <martin@ximian.com>
9276
9277         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
9278         `type->type'; just modify `type' itself when dealing with enums
9279         and generic instances.
9280         (check_call_signature): Make `simple_type' a `MonoType *'.
9281
9282 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9283
9284         * mini.c: Use OP_PADD to add offsets to addresses.
9285
9286         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
9287
9288 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
9289
9290         * mini-sparc.c (mono_arch_emit_epilog): fix check
9291         for folding last op into restore instruction
9292
9293 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9294
9295         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
9296         helper methods using the code manager.
9297         
9298         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
9299
9300         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
9301
9302 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9303         
9304         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
9305           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
9306
9307         * mini-s390.c: fix tail processing
9308
9309 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
9310
9311         * mini-ppc.c: mul.ovf.un exception name fix.
9312
9313 2004-08-03  Martin Baulig  <martin@ximian.com>
9314
9315         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
9316         instances; before jumping to `handle_enum', also modify `ptype'.
9317
9318 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
9319
9320         * cpu-sparc.md: fcall maximal length too small.
9321
9322 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
9323
9324         * mini-amd64.c mini.h: Add initial support for passing/returning 
9325         structures to/from pinvoked methods.
9326
9327 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
9328
9329         * mini-ppc.c: reg allocator fix.
9330
9331 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
9332
9333         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
9334
9335         * inssel.brg: Optimize memset on 64 bit machines.
9336
9337         * mini-amd64.c: Fix some vararg cases.
9338
9339 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9340
9341         * mini-s390.c: Corrected macro in emit_float_to_int
9342
9343         * s390-abi.cs: Tests to exercise the s390 ABI
9344
9345 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9346
9347         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
9348         caller saved regs.
9349
9350         * basic.cs: Add a test for add.ovf.un.
9351
9352 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
9353
9354         * mini-sparc.c: add case for OP_IDIV_UN
9355
9356 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
9359         
9360         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
9361
9362 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
9363
9364         * basic.cs: regression tests.
9365
9366         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
9367         regressions.
9368
9369 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9370
9371         * basic.cs: Add a new test.
9372
9373         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
9374         and AOT. Various fixes and optimizations.
9375
9376         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
9377
9378 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9379
9380         * mini-ppc.c: make sure temp regs are not used for global reg
9381         allocation.
9382
9383 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
9384
9385         * cpu-sparc.md: conv_i8 fix for 64bits
9386
9387         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
9388
9389 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
9390         
9391         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
9392         add opcode for cmp BYTE PTR [eax], imm.
9393
9394         * inssel.brg: Make memcpy and memset takes bases.
9395
9396 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
9397
9398         * *-amd64.*: More AMD64 work.
9399         
9400 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
9401
9402         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
9403         add a compare-not-equal opcode.
9404         
9405 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
9406
9407         * mini.c: Use mono_init_from_assembly instead of mono_init.
9408         
9409 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
9410
9411         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
9412
9413         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
9414
9415         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
9416
9417         * inssel.brg: 64 bit fixes.
9418
9419         * mini.h (MonoCallInst): Add some AMD64 specific data.
9420
9421         * mini.h: Add some OP_P opcodes.
9422
9423 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
9424
9425         * basic.cs: tests for 61797 and 61740
9426
9427 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9428
9429         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
9430         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
9431
9432 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
9433
9434         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
9435
9436         * *-amd64*.*: Ongoing AMD64 work.
9437
9438 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
9439
9440         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
9441
9442         * *-amd64*: Ongoing AMD64 work.
9443
9444         * mini-arch.h: Add AMD64 support.
9445
9446         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
9447
9448         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
9449
9450         * mini-ops.h: Add new opcodes.
9451
9452         * Makefile.am: Add AMD64 support.
9453
9454         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
9455         rules into the inssel-long*.brg files.
9456
9457         * *-amd64.*: Add beginnings of AMD64 backend.
9458
9459 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
9460
9461         * mini.c (print_dfn): commenting out the code that prints
9462         the cil. With -O=deadce, this makes -v -v crash.
9463         
9464         * cpu-pentium.md: make checkthis have a length of 2
9465
9466 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
9467
9468         * mini-sparc.h: fix implementations of __builtin
9469         functions for Sun compiler for V9.
9470
9471 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
9472
9473         * mini.c: use the new stelem.ref wrapper
9474         * exceptions.cs, arrays.cs: new stelem.ref tests
9475
9476 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9477
9478         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
9479         new XSP should work with these changes).
9480
9481 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
9482         
9483         * inssel-{long32,x86,}.brg: trivial optimizations.
9484         
9485 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9486
9487         * mini.c: load value when emitting box operation in
9488         constrained calls.
9489
9490 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
9491
9492         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
9493         is one byte shorter than cmp DWORD PTR [eax], 0.
9494
9495 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
9496
9497         * inssel-ppc.brg: arguments on the stack are always
9498         relative to the stack pointer (spotted by Neale Ferguson).
9499
9500 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9501
9502         * exceptions-x86.c: delay appending the method name to the trace until
9503         after mono_jit_info_table_find is called, as this gets the real
9504         MonoMethod.
9505
9506 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
9507
9508         * aot.c: register roots
9509
9510 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9511
9512         * aot.c : I could just use PLATFORM_WIN32 flag.
9513
9514 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9515
9516         * aot.c : Reverting the previous fix. This time it broke linux build.
9517
9518 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
9519
9520         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
9521
9522 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
9523
9524         * mini.c (handle_stack_args): Remove some more debugging code.
9525         
9526         * mini.c (handle_stack_args): Remove debug output left in by mistake.
9527
9528         * driver.c mini.h aot.c: Allow additional options to be specified with
9529         --aot and pass them to mono_compile_assembly.
9530
9531         * aot.c: Add experimental code to AOT compile all loaded assemblies
9532         on demand and save the code into a cache in the filesystem.
9533
9534         * aot.c: Add support for more wrapper methods.
9535         
9536         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
9537         58863.
9538
9539         * cpu-*.md: Remove removed opcodes.
9540
9541         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
9542         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
9543         related icalls to marshal.c.
9544
9545 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
9548
9549         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
9550
9551         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
9552
9553 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
9554         * liveness.c: If liveness is recomputated we need to reset the information
9555         for each variable. This way, if the liveness range has been narrowed
9556         by optimizations that happened after the last computation, we can return
9557         a smaller range.
9558         
9559         For example, if you have
9560         
9561         {
9562                 int i = 0;
9563                 
9564                 // Tons of code that does not affect i
9565                 
9566                 i = foo ();
9567                 ...
9568         }
9569         
9570         i = 0 is dead code and will be removed by SSA. However, when
9571         linear scan gets to the code, i will still appear to be live
9572         throughout the entire block. This prevents good register allocation.
9573
9574 2004-07-06  Martin Baulig  <martin@ximian.com>
9575
9576         * debug-mini.c (mono_debug_init_method): Allow
9577         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
9578         (mono_debug_add_icall_wrapper): New method.
9579
9580         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
9581
9582 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
9583
9584         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
9585         optimization.
9586
9587 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
9588
9589         * aot.c (mono_aot_load_method): Fix loading of debug info.
9590
9591 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9592
9593         * aot.c: Add logging support.
9594
9595 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
9596
9597         * mini.h: Add prototype for mono_print_method_from_ip.
9598
9599         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
9600
9601         * inssel.brg: 64 bit fixes.
9602
9603         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
9604         inssel-long32.brg.
9605
9606         * Makefile.am: Add SPARC64 support.
9607
9608 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9609
9610         * aot.c: Fix alignment problems on 32 bit platforms.
9611
9612 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
9613
9614         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
9615         SPARC64.
9616
9617         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
9618         problems.
9619
9620         * mini.h: Bump AOT file version. Some 64 bit fixes.
9621
9622 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9623
9624         * inssel-sparc.brg: Add new rule to avoid register moves.
9625
9626         * inssel.brg: Add ldind_to_load_membase helper function.
9627
9628 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
9629
9630         * mini.c: OffsetToStringData intrinsic.
9631         
9632 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9633
9634         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
9635
9636         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
9637         regression tests.
9638
9639         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
9640 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
9641
9642         * mini.c: reinstated mono_compile_get_interface_var()
9643         on x86, too, since the change breaks the Gtk# build there as well.
9644
9645 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9646
9647         * driver.c: remove loop from the default optimizations: it seems to
9648         interact badly with some of the other options (see bug #60613).
9649
9650 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
9651
9652         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
9653         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
9654
9655 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
9656
9657         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
9658         vararg-using methods.
9659
9660 2004-06-21  Martin Baulig  <martin@ximian.com>
9661
9662         * mini/mini-exceptions.c
9663         (mono_handle_exception): Added `gpointer original_ip' argument.
9664         After calling mono_unhandled_exception(), call
9665         mono_debugger_unhandled_exception() and if that returns true,
9666         restore the context and return.
9667
9668 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9669
9670         * mini-ppc.c: prefer the use of relative branches so
9671         they won't need to be patched in aot code (patch from Patrick Beard).
9672
9673 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
9674
9675         * aot.c: patch from Patrick Beard to make the output assembly
9676         more correct for the MacOSX assembler. Small tweak to
9677         generate sane images on Linux/PPC, too.
9678
9679 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9680
9681         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
9682         case until bug #59509 is fixed (shows up in #60332).
9683
9684 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9685
9686         * mini.c: make sure the needed wrappers are compiled, too, with
9687         precomp.
9688
9689 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
9690
9691         * driver.c: remove NPTL reference in --version output.
9692
9693 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9694
9695         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
9696         generate valid assembly for the Mach-O assembler.
9697
9698 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
9699
9700         * driver.c: don't include abcrem in the all optimization specifier
9701         since it slows down jit compilation too much for now.
9702
9703 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
9704
9705         * mini.c: use BIGMUL only if both operands have the same signage.
9706         * iltests.il: Test for bug 60056. (errors related to signage in
9707         BIGMUL).
9708
9709         r=lupus.
9710
9711 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
9712
9713         * mini.c, aot.c: memory leak fixes.
9714
9715 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9716
9717         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
9718
9719 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
9720
9721         * Makefile.am: remove the -static hack completely, it links in
9722         statically glib as well.
9723
9724 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
9725
9726         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
9727         * exceptions.cs: make it compile with new mcs/csc.
9728
9729 2004-06-03 Massimiliano Mantione <massi@ximian.com>
9730         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
9731         and added relevant test case.
9732
9733 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
9734
9735         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
9736         regressions in gtk-sharp.
9737
9738 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9739
9740         * exceptions.cs: New regression tests.
9741
9742         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
9743
9744 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9745
9746         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
9747
9748 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9749
9750         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
9751
9752         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
9753
9754 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
9755
9756         * mini.c (mono_jit_runtime_invoke): Init class in this
9757         method instead of trusting mono_jit_compile_method to
9758         do the work (because wrappers can be in object class)
9759
9760 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
9761
9762         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
9763
9764         * basic-long.cs: New regression test.
9765
9766 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
9767
9768         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
9769         and div/rem checks.
9770
9771 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
9772
9773         * Makefile.am: fix miguel's change to build mono statically against
9774         libmono (track build dependencies).
9775
9776 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9777
9778         * cfold.c: Some glib versions do not have G_MININT32.
9779
9780 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
9781
9782         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
9783         with precision of tan, atan, sin and cos, and implemented related
9784         regressions tests (fixes bug 54467, but one new problem appeared and
9785         is not fixed yet).
9786
9787 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9788
9789         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
9790
9791         * exceptions.cs: Add test for constant folding && division by zero.
9792
9793         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
9794         since driver.c is in libmono too, so the optimization was useless.
9795
9796         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
9797         variable to driver.c so the compiler can emit more efficient code to
9798         access them.
9799
9800 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9801
9802         * Makefile.am: don't distribute generated inssel.[ch] files.
9803
9804 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9805
9806         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
9807         into the default appdomain. Fixes #58707.
9808
9809         * jit-icalls.c: Remove the broken approximation for truncl, doing
9810         no conversion is better.
9811
9812         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
9813         Fixes #58863.
9814
9815 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
9816
9817         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
9818         of the mcrxr instruction which is not available on some processors
9819         even if it's documented to be. Implement add and sub overflow correctly
9820         (still not complete for long unsigned). Speed up icalls a bit.
9821
9822 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
9823
9824         * mini.c (mono_jit_compile_method_with_opt): Make sure that
9825         we run .cctor in the current domain instead of target_domain.
9826         
9827         Fixes bug #58558, .cctor not being called in -O=shared.
9828
9829 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9830
9831         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
9832
9833 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
9834
9835         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
9836         which can be done with an imm8, do it that way.
9837         (mono_arch_output_basic_block): ditto for a jmp
9838         (mono_arch_emit_prolog): Computate maximum offset of a label.
9839
9840 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
9841
9842         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
9843         now tries to allocate prefered physical reg's for virtual
9844         regs. This reduces the number of emited spills/loads with
9845         20-30% on our core assemblies.
9846
9847 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9848
9849         * jit-icalls.c: truncl() is not needed and trunc() is
9850         the correct thing to do anyway (bug #58287).
9851
9852 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
9853
9854         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
9855         if available.
9856
9857 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9858
9859         * driver.c: enable loop optimizations by default.
9860
9861 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
9862
9863         * mini-x86.c: fix calc of max loop size when aligning loops start.
9864
9865 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
9866
9867         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
9868         the stack.
9869
9870 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9871
9872         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
9873         should set carry.
9874
9875         * basic-long.cs: Add tests for add/subtract of immediates with carry.
9876
9877         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
9878         
9879         * mini.c (inline_method): Allways inline some wrappers even if the cost
9880         is too large. Fixes #58785.
9881
9882         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
9883         
9884 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9885
9886         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
9887         (crichton@gimp.org). Beginning of support for sparc/linux.
9888
9889         * mini-sparc.c: Optimize retrieval of LMF address.
9890
9891 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
9892
9893         * exceptions-ppc.c:  handle alloca in methods with clauses.
9894
9895 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
9896
9897         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
9898
9899 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9900
9901         * mini.c: Delegate most of the abort signal work to 
9902           mono_thread_request_interruption, which also handles Stop and Suspend
9903           states.
9904
9905 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9906
9907         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
9908         supports the save/restore lmf opcodes.
9909
9910 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
9911
9912         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
9913         by gcc-3.4 as well.
9914
9915         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
9916
9917 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9918
9919         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
9920         methods which contain array accesses.
9921
9922         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
9923         boundaries. Fixes #58537.
9924
9925         * iltests.il: Add regression test for #58537.
9926
9927 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
9928
9929         * mini-x86.c (mono_arch_local_regalloc): Last part of
9930         fix for bug #58633 (releasing register to early).
9931
9932 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
9933
9934         * basic-long.cs: Add new regression test.
9935
9936 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
9937
9938         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
9939         register too early on the chain.
9940
9941 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9942
9943         * mini.c (create_helper_signature): Use a helper function to reduce
9944         the code which needs to be written. Also set the calling convention of
9945         icalls on windows. Fixes #57840.
9946
9947 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
9948
9949         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
9950         exceptions-ppc.c: added helper function to get the instruction address
9951         from a signal handler context.
9952
9953 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9954
9955         * helpers.c: use g_get_tmp_dir. Invokes happyness 
9956         from gonzalo.
9957
9958 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9959
9960         * helpers.c: Add new env variable to pass args to objdump.
9961         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
9962
9963 2004-05-17  Radek Doulik  <rodo@ximian.com>
9964
9965         * Makefile.am (common_sources): added abcremoval.h so it get
9966         disted and daily mono packages on go-mono.com will build again
9967
9968 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
9969
9970         * abcremoval.c: Fixed coding style, added copyright header.
9971
9972         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
9973
9974         * mini.h: Added prototype for abc removal main function.
9975
9976         * build_relations_propagation_table.pl: Added copyright header.
9977
9978 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
9979
9980         * basic-long.cs: reg test for complex ceq_long bug.
9981
9982 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
9983
9984         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
9985         reg in long and clob case (bug #58343). Fixed/added comments.
9986
9987 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9988
9989         * mini.c (mono_jit_runtime_invoke): Follow new convention
9990         of calling the invoke method with an function pointer.
9991
9992 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9993
9994         * ChangeLog: Fix author of memory leak patch.
9995
9996 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
9997
9998         * Makefile.am: fix make dist as well...
9999
10000
10001 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
10002
10003         * cfold.c: Made so that conversions from pointer to int4 are no-ops
10004         on archs where pointers are 4 bytes long.
10005
10006         * Makefile.am: Added abcremoval.c source file.
10007
10008         * abcremoval.c: Added abcremoval.c.
10009
10010         * abcremoval.h: Added abcremoval.h.
10011
10012         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
10013
10014         * inssel.brg: Enabled bounds check removal.
10015
10016         * mini.c: Added support for abcrem optimization.
10017
10018         * mini.h: Added abcrem optimization label.
10019
10020         * driver.c: Added support for abcrem optimization.
10021
10022         * propagated_relations_table.def: Added propagated_relations_table.def.
10023
10024 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
10025
10026         * mini.c, cfold.c: fix style.
10027
10028 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10029
10030         * mini.c: handle issue with the low-level implementation of
10031         some long opcodes (bug #54209).
10032
10033 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
10034
10035         * basic.cs: test for my new cmov stuff.
10036
10037 2004-05-13      Patrik Torstensson
10038
10039         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
10040         opt and added peephole documentation.
10041
10042 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10043
10044         * tramp-ppc.c: rewrote the generic trampoline code.
10045
10046 2004-05-11      Patrik Torstensson
10047
10048         * mini-x86.c: optimize long shl/shr asm code (one less branch)
10049
10050 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10051
10052         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
10053
10054         * mini.h mini.c dominators.c: Applied patch from Derek Woo
10055         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
10056
10057         * mini.c: Add new icalls for AsAny marshalling.
10058
10059 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
10060
10061         * tramp-ppc.c, mini-ppc.c: more cleanups.
10062
10063 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10064
10065         * mini.c: no warnings.
10066
10067 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10068
10069         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
10070
10071 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10072
10073         * mini.c: In the thread abort signal handler, if the thread is in the
10074         process of being stoped, don't throw the Abort exception, just stop the
10075         thread.
10076
10077 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
10078
10079         * tramp-ppc.c: removed old code.
10080
10081 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10082
10083         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
10084         do some simple speed optimizations on ppc.
10085
10086 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
10087
10088         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
10089         and large offsets in load/store.
10090
10091 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
10094         it causes regressions.
10095
10096 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
10097
10098         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
10099         support.
10100
10101 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
10102
10103         * jit-icalls.c: remove warnings.
10104         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
10105         speedups for unsafe code.
10106
10107 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10108
10109         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
10110
10111 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
10112
10113         * basic-calls.cs: Add new regression test.
10114
10115         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
10116         more portable.
10117
10118         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
10119
10120         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
10121         is no longer used.
10122
10123 2004-05-06      Patrik Torstensson
10124
10125         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
10126         long reg allocation in any reg (not only eax:edx) and implemented 
10127         long shl/shr ops in asm instead of helpers.
10128
10129 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10130
10131         * mini-sparc.h: Fix warnings.
10132
10133         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
10134         stack.
10135
10136         * mini-exceptions.c (mono_handle_exception): Call the filter in a
10137         separate statement for clarity.
10138
10139         * mini-sparc.c: Update status.
10140
10141 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
10142
10143         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
10144         here.
10145
10146 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10147
10148         * inssel-ppc.brg: another small pre-release workaround:
10149         we don't do overflow detection for long_sub_un.
10150
10151 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10152
10153         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
10154         (also works around a weird ppc bug: 57957).
10155
10156 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
10157
10158         * tramp-ppc.c: trampoline fixes.
10159
10160 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
10161
10162         * mini-ppc.c: fixed typos.
10163
10164 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
10165
10166         * mini-ppc.c, exceptions-ppc.c: more code saves registers
10167         at the top of the stack. Fixed typos. Use a frame registers
10168         for all the methods with exception clauses.
10169
10170 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10171
10172         * exceptions-ppc.c: restore fp registers.
10173
10174 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
10175
10176         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
10177         order from the stack top (moved the stack room to save the
10178         return value for trace after the param area). Fixed corruption
10179         in restoring registers on unwind.
10180
10181 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
10182
10183         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
10184
10185 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10186
10187         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
10188         and prolog/epilog for methods that use it. Allow
10189         enough param area room for varargs methods. Fix miguel's
10190         breakage in exception handling.
10191
10192 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
10193
10194         * Makefile.am: run genmdesc only on current arch.
10195
10196 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10197
10198         * exceptions-x86.c:
10199         * mini-x86.h: fix the build on windows.
10200
10201 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
10202
10203         * 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.
10204
10205         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
10206
10207         * mini-exceptions.c: New file.
10208         
10209         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
10210         Move some parts of the x86 exception handling code to an 
10211         arch-independent file so it can be shared with other ports.
10212
10213 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
10214
10215         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
10216
10217 2004-04-26  David Waite  <mass@akuma.org>
10218
10219         * driver.c: remove comma from end of enumeration declaration
10220
10221 2004-04-26  Jackson Harper  <jackson@ximian.com>
10222
10223         * driver.c: parse config file before loading first assembly. This
10224         allows the user gac to be enabled/disabled. 
10225         
10226 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
10227
10228         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
10229         simpler mechanism: we do not care what is encoded initially
10230         (branch absolute or relative), we care about the code and its
10231         target.  I kept the old code for reference for now.
10232
10233         The new code tries first to determine if the jump is anywhere in
10234         the -/+32 absolute meg range, if it succeeds, it encodes using the
10235         absolute branch;  If not, it tried to find something in the
10236         relative range, if not, it uses the handle_thunk code. 
10237
10238 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
10239
10240         * exceptions-ppc.c: use the correct ip register on macosx.
10241
10242 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
10243
10244         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
10245
10246 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
10247
10248         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
10249         Raise exception on integer divide by zero by hand since the hw
10250         doesn't support it. Handle NaNs in FP compares.
10251
10252 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
10253
10254         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
10255         code reducing duplication between the platforms and enabled
10256         signal exception handling (on linux for now).
10257
10258 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
10259
10260         * exceptions-ppc.c: more macosx support.
10261
10262 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10263
10264         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
10265
10266 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
10267
10268         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
10269
10270 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10271
10272         * iltests.il: more tests.
10273
10274 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
10277         vars as well.
10278
10279 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10280
10281         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
10282
10283 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * liveness.c: Mark variables as volatile in all basic blocks reachable
10286         from exception clauses.
10287
10288 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
10289
10290         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
10291         inlining.
10292
10293 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10294
10295         * iltests.il, basic.cs: more tests for regalloc.
10296
10297 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10298
10299         * iltests.il: Some tests for register allocation modifications
10300         I have locally.
10301
10302 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
10303
10304         * exceptions.cs: Add regression test for bug #56782.
10305
10306         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
10307         original stack trace if an exception is rethrown. Fixes #56782. Oh,
10308         the beauty of fixing the same thing in 5 different files...
10309
10310 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
10311
10312         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
10313         methods.
10314
10315 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
10316
10317         * mini.c: Add support for STRWLPARRAY marshalling convention.
10318
10319 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10320
10321         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
10322         to init the context to setup the regs pointer).
10323
10324 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
10325
10326         * exceptions-ppc.c: more exceptions work.
10327
10328 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10329
10330         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
10331         not allowed.
10332
10333 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10334
10335         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
10336         can use the memory directly.
10337
10338         * cpu-pentium.md: Update documentation from a post from Zoltan. 
10339
10340         add x86_add_membase, x86_sub_membase, x86_mul_membase
10341
10342 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10343
10344         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
10345         GENERAL_REGS they were also hardcoded for all PPC ports.
10346
10347         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
10348
10349         Remove hard-coded limit for floating point registers, use
10350         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
10351
10352         Notice that in MacOS X calling conventions you can fit a lot more
10353         floating point values in registers, so I should update the PInvoke
10354         test to excercise the passing of floating point values on the
10355         stack (currently broken).
10356         
10357 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
10358
10359         * tramp-ppc.c (create_trampoline_code): Added
10360         JUMP_TRAMPOLINE_SIZE. 
10361         (ppc_magic_trampoline): Follow the pattern from
10362         x86_magic_trampoline: if code is set to zero, return. 
10363         (create_trampoline_code): Always pass MonoMethod to the jump
10364         trampoline, before it was passing a null.
10365         (mono_arch_create_jump_trampoline): Implement the jump stub, could
10366         share the code with mono_arch_create_jit_trampoline. 
10367
10368         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
10369         implemented.
10370         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
10371         implemented.  
10372
10373         * cpu-g4.md: Added length for jmp instruction, the worst case
10374         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
10375         for save_lmf).
10376
10377 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
10378
10379         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
10380
10381 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
10382
10383         * mini.c: Only set bblock->real_offset when adding a new bblock, and
10384         before each IL instruction.
10385
10386         * mini.c (CEE_BOX): Fix warnings.
10387
10388 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10389
10390         * mini.c: removed a few unused vars and extra whitespace.
10391
10392 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
10393
10394         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
10395         checks.
10396         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
10397         index.
10398         (OP_GETCHR): use the above
10399         (CEE_LDELEMA): use the above.
10400
10401         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
10402         version of the generic impl.
10403         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
10404         (CEE_LDELEMA): use the above.
10405
10406 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10407
10408         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
10409         Fixes #56317.
10410
10411         * iltests.il: Added new regression test for #56317.
10412
10413 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10414
10415         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
10416         under NetBSD. Fixes #56450.
10417
10418         * liveness.c (update_gen_kill_set): Fix previous patch.
10419
10420 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10421
10422         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
10423
10424 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10425
10426         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
10427         ldsfld and ldsflda.
10428
10429         * inssel-sparc.brg: Add more optimizations.
10430
10431         * mini-sparc.c: Replace multiply/divide with shifts if possible.
10432
10433 2004-04-01  Martin Baulig  <martin@ximian.com>
10434
10435         * mini.c (handle_box): New static function; moved the
10436         implementation of CEE_BOX here.
10437         (mono_method_to_ir): Added `constrained_call' variable.
10438         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
10439         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
10440         mono_method_get_constrained() to get the method.
10441
10442 2004-04-01  Martin Baulig  <martin@ximian.com>
10443
10444         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
10445         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
10446         (mono_method_to_ir): We don't need these macros anymore since
10447         mono_class_get_full() already takes care of it. 
10448
10449 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450
10451         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
10452         use @function (as doesn't accept #function here) and check the return
10453         value of system and stop if fails.
10454
10455 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10456
10457         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
10458
10459 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
10460
10461         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
10462
10463         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
10464
10465         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
10466         #56223.
10467
10468         * basic-long.cs: Add test for negation of Int64.MinValue.
10469
10470 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
10471
10472         * mini-sparc.c: Update status.
10473
10474         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
10475
10476         * exceptions-sparc.c: Fix return value in filters.
10477
10478         * inssel-sparc.brg: Fix register allocation in some rules.
10479
10480 2004-03-28  Martin Baulig  <martin@ximian.com>
10481
10482         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
10483         if neccessary.  
10484
10485 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10486
10487         * mini-x86.c (mono_arch_patch_code): Fix warnings.
10488         
10489         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
10490         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
10491         remove unused conv_u4 opcode.
10492
10493         * mini-x86.c: Remove valgrind workaround since it slows down things
10494         even when mono is not run under valgrind.
10495
10496 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
10497
10498         * mini-sparc.c: Update status.
10499
10500         * inssel-sparc.brg: Add some optimizations.
10501
10502         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
10503         future delay slot filling. Add support for varargs, tail calls and JMP.
10504
10505         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
10506         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
10507
10508         * inssel.brg: Fix register allocation in OP_ARGLIST.
10509
10510         * inssel.brg: Fix warnings.
10511
10512 2004-03-25  Martin Baulig  <martin@ximian.com>
10513
10514         * mini.c (inflate_generic_field): Removed.
10515         (mini_get_method): Removed, use mono_get_method_full(),
10516         (mini_get_class): Removed, use mono_class_get_full().
10517         (mono_method_to_ir): Pass our generic context to
10518         mono_field_from_token().        
10519
10520 2004-03-25  Martin Baulig  <martin@ximian.com>
10521
10522         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
10523         of a `MonoMethod *'.
10524         (mini_get_method): Take a `MonoGenericContext *' instead
10525         of a `MonoMethod *'.
10526         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
10527         a new local variable called `generic_context' which holds the
10528         current `MonoGenericContext *'; use it to lookup things.
10529
10530 2004-03-24  Martin Baulig  <martin@ximian.com>
10531
10532         * mini.c (mini_get_class): New static method; if we're inside a
10533         generic instance, inflate the class if neccessary.
10534         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
10535
10536 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10537
10538         * iltests.il: New regression test for #55976.
10539
10540         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
10541         #55976.
10542
10543 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
10544
10545         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
10546         output.
10547
10548 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
10549
10550         * liveness.c: Consider SSA stores as well as loads when making vars
10551         volatile.
10552
10553         * exceptions.cs: New regression tests for register allocation.
10554         
10555 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10556
10557         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
10558         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
10559           domain lock only to protect puntual access to data structures.
10560           Added access lock for sighash, jit_icall_hash_name, 
10561           jit_icall_hash_addr and domain->code_mp.
10562
10563 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
10564
10565         * driver.c: Print SIGSEGV handling method.
10566
10567         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
10568
10569         * mini.c (setup_jit_tls_data): Handle case when this is called
10570         multiple times for a thread.
10571
10572         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
10573         is different from fbxx_un. Fixes #54303. Also use constants instead of
10574         magic numbers in a lot of places.
10575
10576 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * exceptions.cs: Fix cctor test when --regression is used.
10579
10580 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
10581
10582         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
10583         for Linux/ppc.
10584
10585 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
10586
10587         * inssel-ppc.brg: fixed register assignments for some rules.
10588
10589 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10590
10591         * exceptions.cs: Add test for exceptions in static constructors.
10592
10593         * mini.c (mono_jit_compile_method_with_out): Move the calling of
10594         static constructors outside the domain lock. Fixes #55720.
10595
10596 2004-03-17  Martin Baulig  <martin@ximian.com>
10597
10598         * mini.c (get_generic_field_inst): Removed, this'll never happen.
10599         (inflate_generic_field): Take the `MonoMethod *' instead of the
10600         `MonoClass *' and added support for generic method.
10601         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
10602         have a `field->parent->gen_params', only inflate the field if it's
10603         an open constructed type.
10604
10605 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10606
10607         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
10608         exception object instead of the preconstructed ones.
10609
10610 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10611
10612         * mini.c: reverted changed to sigsegv_signal_handler commited
10613         accidentally in the previous patch.
10614
10615 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10616
10617         * mini.c:
10618         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
10619         running --aot with an old assembly.
10620
10621 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10622
10623         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
10624         point values.
10625
10626         * mini-sparc.c: Add support for v9 branches with prediction.
10627
10628 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
10629
10630         * mini.c (mini_init): #warning is GNUC only
10631
10632         * mini-sparc.h: implement __builtin_frame_address
10633         and __builtin_return_address for Sun C compiler
10634
10635 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
10638
10639 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10640
10641         * basic-calls.cs: Add test for unaligned byref long argument passing.
10642
10643         * mini-ops.h: Add sparcv9 compare and branch instructions.
10644
10645         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
10646         v9 instructions if we have a v9 cpu.
10647
10648         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
10649         registers for global allocation.
10650
10651         * exceptions-sparc.c: Fixes.
10652         
10653 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
10654
10655         * liveness.c (mono_analyze_liveness): Optimized version.
10656
10657         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
10658
10659         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
10660         sparc work.
10661
10662         * basic-float.cs basic-calls.cs: New regression tests.
10663
10664 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
10665
10666         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
10667         sigaltstack implementation.
10668
10669         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
10670         
10671         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
10672         stuff if SIGSEGV_ON_ALTSTACK is not defined.
10673
10674 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10675
10676         * mini.c: Fix warnings.
10677         
10678         * mini.c (mono_resolve_patch_target): New function which contains the
10679         arch independent part of the patching process.
10680
10681         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
10682         patching code to a separate function.
10683
10684 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
10685
10686         * mini.c (add_signal_handler): ifdef out on Windows
10687
10688 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
10689
10690         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
10691         cpu-sparc.md: Add exception handling support + other fixes.
10692
10693         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
10694         typed GC detection in --version.
10695
10696         * basic.cs exceptions.cs: New regression tests.
10697
10698         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
10699         the arch specific code can store data during a compilation.
10700
10701         * mini-ops.h: Add OP_SETFRET.
10702
10703         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
10704         function, register a separate icall for each arity, so the icalls can
10705         get a wrapper.
10706         
10707         * mini.c (mono_print_tree): Print negative offsets in a more readable
10708         form.
10709         
10710         * mini.c: Make signal handling work on sparc.
10711         
10712         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
10713
10714         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
10715
10716         * jit-icalls.c: Emulate truncl by aintl on solaris.
10717
10718         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
10719
10720 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
10721
10722         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
10723
10724 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10725
10726         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
10727         a MarshalByRef type, inline a method that performs the check, taking into
10728         account that the object can be a proxy. Also implemented tow new opcodes:
10729         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
10730         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
10731         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
10732
10733 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10734
10735         * mini-ppc.c: if a relative branch displacement is too big
10736         but it points to and area reachable with an absolute branch, 
10737         avoid the thunks.
10738
10739 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10740
10741         * mini.c: optimize small copies in cpblk.
10742
10743 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
10744
10745         * basic-calls.cs basic-float.cs: New regression tests.
10746
10747         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
10748         negative offsets from %fp. Implement localloc. Fix local register 
10749         allocation. Fix the case when the this argument needs to be saved to
10750         the stack. Implement some missing opcodes.
10751
10752 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10753
10754         * mini.c (mini_method_compile): Reenable global regalloc in methods
10755         with exception handlers.
10756
10757         * linear-scan.c (mono_varlist_sort): Fix warning.
10758
10759         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
10760
10761         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
10762         regalloc costs.
10763
10764         * liveness.c: Make all variables uses in exception clauses volatile, to
10765         prevent them from being allocated to registers. Fixes #42136.
10766
10767 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
10768
10769         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
10770         causes regressions.
10771
10772         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
10773         argument to mono_arch_regalloc_cost.
10774
10775         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
10776         precisely.
10777
10778 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
10779
10780         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
10781         Make the cost of allocating a variable to a register arch dependent.
10782
10783         * basic-calls.cs: Fix compilation of tests.
10784         
10785         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
10786         helper function to cut back on the number of #ifdefs needed.
10787
10788         * mini-ppc.c: Fix compilation.
10789
10790         * basic-calls.cs: New regression tests.
10791
10792         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
10793
10794         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
10795         of l0 since that is callee saved.
10796
10797         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
10798         to virtual calls.
10799
10800         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
10801         of delay instruction.
10802
10803         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
10804
10805         * mini.h (MonoCallInst): Add 'virtual' flag.
10806
10807         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
10808
10809 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10810
10811         * *.cs: New regression tests.
10812
10813         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
10814         work.
10815
10816         * mini.c (mono_runtime_install_handlers): Fix build.
10817
10818         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
10819         'signal_stack_size' members.
10820
10821         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
10822         alternate signal stack.
10823
10824         * exceptions-x86.c: Add stack overflow handling.
10825
10826         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
10827         functions to arch independent code.
10828
10829         * mini.c (mono_print_tree): Print more detailed info for load_membase
10830         opcodes.
10831         
10832 2004-02-23  Martin Baulig  <martin@ximian.com>
10833
10834         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
10835
10836 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
10837
10838         * mini-x86.c: fixed reg allocation for div/rem.
10839
10840 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
10841
10842         * driver.c (mono_main): Report some configuratio options on --version.
10843
10844 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
10845
10846         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
10847         low in the address space. Correctly flush memory in thunks where we
10848         output native code.
10849
10850 2004-02-20  Martin Baulig  <martin@ximian.com>
10851
10852         * mini.c (mini_get_method): New static method; inflate all generic
10853         methods and methods in open generic instances.
10854         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
10855         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
10856
10857 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
10858
10859         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
10860
10861         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
10862
10863 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
10864
10865         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
10866
10867         * mini-sparc.c (flushi mono_arch_output_basic_block): make
10868         it compile using Sun's compiler.
10869
10870 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
10871
10872         * 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.
10873
10874         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
10875
10876 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10877
10878         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
10879         code.
10880         * mini-ppc.c: handle calls outside of the allowed range with thunks
10881         allocated using the code manager.
10882         * tramp-ppc.c: use the code manager to hold generated native code.
10883         Fixed the magic trampoline to just patch vtable entries.
10884
10885 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
10886
10887         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
10888         independent file.
10889
10890 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
10891
10892         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
10893         PPC.
10894
10895         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
10896         if we have a working __thread implementation.
10897
10898         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
10899         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
10900
10901 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini-x86.c: Fix compilation under gcc 2.
10904         
10905 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10906
10907         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
10908         contains a call to the wrapped function.
10909
10910         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
10911         OP_<CALL>_IMM opcodes, and use them under X86.
10912         
10913         * mini.c (mono_jit_find_compiled_method): Fix warning.
10914
10915         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
10916
10917         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
10918
10919         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
10920         functionality to mini.c.
10921
10922         * mini.c (mono_create_jump_trampoline): New function to create a jump
10923         trampoline. Return a compiled method instead of a trampoline if it
10924         exists. Add a cache for jump trampolines.
10925
10926         * mini.c (mono_jit_find_compiled_method): New function to return a
10927         compiled method if it exists.
10928
10929         * mini-x86.c: Call mono_create_jump_trampoline instead of 
10930         mono_arch_create_jit_trampoline.
10931
10932         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
10933         a jump trampoline. Fixes #52092.
10934         
10935 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10936
10937         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
10938         which is not up-to-date. Add check_corlib_version () instead.
10939
10940         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
10941         have to call it.
10942         
10943         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
10944         since newer valgrind versions do not need it.
10945
10946         * mini.c (mono_jit_compile_method_with_opt): New helper function to
10947         compile a method with a given set of optimizations.
10948
10949         * mini.c: Compile icall wrappers on-demand instead of at startup.
10950
10951         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
10952         wrapper for an icall.
10953
10954 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10955
10956         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
10957         #54063.
10958
10959         * iltests.il: Add test for non-empty stack before switch instruction.
10960
10961 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
10962
10963         * mini.c: Add support for new stringbuilder marshalling conventions.
10964
10965         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
10966
10967 2004-02-01  Martin Baulig  <martin@ximian.com>
10968
10969         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
10970         in `ginst->mtype_argv'.
10971
10972 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
10973
10974         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
10975         facilitate grepping.
10976
10977 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
10978
10979         * mini.c: fixed buglet in initobj generic implementation for references.
10980
10981 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
10982
10983         * Makefile.am: make the version script conditional.
10984         * jit-icalls.c: handle missing truncl().
10985
10986 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10987
10988         * exceptions.cs: Add more tests for double->int conversion.
10989
10990         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
10991         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
10992
10993 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
10994
10995         * driver.c: make --verbose --version emit an error
10996         if the loaded corlib doesn't match the runtime version.
10997
10998 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
10999
11000         * mini-ppc.h: export ppc_patch().
11001         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
11002         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
11003         on par or better than on MacOSX.
11004
11005 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
11008         mono_lookup_pinvoke_call.
11009
11010         * mini-x86.c: Under windows, the default pinvoke calling convention is
11011         stdcall. Fixes #52834.
11012
11013         * mini.c (optimize_branches): Add an upper bound to the number of
11014         iterations to prevent infinite loops on strange loops. Fixes #53003.
11015
11016 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11017
11018         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
11019         and ISINST. Fixes #52093.
11020
11021         * objects.cs (test_0_vector_array_cast): New tests.
11022         
11023 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
11024
11025         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
11026         checking in Array.Set ().
11027
11028         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
11029         #52590.
11030
11031         * object.cs (test_0_multi_array_cast): New regression test.
11032
11033 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
11034
11035         * exceptions-ppc.c: fix build on Linux/PPC.
11036
11037 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
11038
11039         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
11040         running under valgrind.
11041         (x86_magic_trampoline): Fix build bustage.
11042
11043         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
11044         negative values as well. This is needed for the encoding of the line number
11045         info, since sometimes the line numbers are not in increasing order.
11046
11047 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11048
11049         * cpu-pentium.md (localloc): Increase the size of the localloc 
11050         instruction since it is a loop under Win32.
11051
11052         * debug-mini.c (record_line_number): Get rid of unneccesary memory
11053         allocation.
11054
11055 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11056
11057         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
11058         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
11059         Max Horn (max@quendi.de). Fix file names in comments.
11060
11061 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
11062
11063         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
11064         avoid stack overflow.
11065         (replace_usage): Avoid uninitialized variable warnings.
11066
11067         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
11068         and taking the address of valuetype variables.
11069
11070 2004-01-03  Patrik Torstensson
11071
11072         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
11073         for other purposes than FP later on.
11074
11075 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
11076
11077         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
11078         of tail calls.
11079
11080 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11081
11082         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
11083
11084 2003-12-30  Patrik Torstensson <p@rxc.se>
11085
11086         * mini-x86.h: Decreased number of availiable fp regs.
11087         Solves corner cases with FP spilling.
11088
11089 2003-12-23  Patrik Torstensson <p@rxc.se>
11090
11091         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
11092         for floating point stack tracking / spilling on x86. 
11093         Fixes bug #49012.
11094         
11095         * basic-float.cs: added float mul overflow test.
11096
11097 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
11098
11099         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
11100
11101 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11102
11103         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
11104         supports for cond branches that overflow the immediate
11105         overflow offset. mcs can compile simple programs.
11106
11107 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11108
11109         * exceptions-ppc.c: exception handling support wip:
11110         finally handlers get run on exception.
11111
11112 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11113
11114         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
11115         profiling.
11116
11117 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11118
11119         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
11120         initial support for stack walking and unwinding.
11121
11122 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
11123
11124         * driver.c (mono_main): Make corlib-out-of-sync message more 
11125         descriptive. Also remove verify_corlib call.
11126
11127 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11128
11129         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
11130         not overlap with other call's arguments, too.
11131
11132 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
11133
11134         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
11135         move to arch-specific code the choice of arch-specific
11136         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
11137         * mini.c: ensure emulation calls will not interleave
11138         with other calls.
11139
11140 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
11141
11142         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
11143         the magic trampoline stack frame is dropped before executing
11144         the new method.
11145
11146 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11147
11148         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
11149         and integer to fp conversions. Added support for overflowing
11150         arguments on the stack. Reserve a couple more registers as temps.
11151         Added support for aot compilation (as output still needs to be
11152         tweaked, though).
11153
11154 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11155
11156         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
11157         Don't overwrite return register in some corner cases.
11158
11159 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11160
11161         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
11162         static constructors when AOT compiling.
11163
11164         * driver.c (mono_main): Call mono_check_corlib_version.
11165
11166 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11167
11168         * cpu-g4.md, basic.cs: fixed div target register.
11169
11170 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11171
11172         * mini-ppc.c, basic.cs: shl_imm fix with test.
11173
11174 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11175
11176         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
11177         structures by value. Misc fixes.
11178         * objects.cs: more tests.
11179
11180 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
11181
11182         * mini-ppc.c: lconv.ovf.i implemented.
11183
11184 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11185
11186         * mini.c:
11187         (mini_init): don't error out if someone already called g_thread_init.
11188
11189 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
11190
11191         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
11192         to be any type per the spec. Fix abnormal memory usage when
11193         the same object is repeatedly thrown.
11194
11195 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
11196
11197         * mini.c: check for overruns in IL code.
11198
11199 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11200
11201         * TODO: Add/remove some todo entries.
11202
11203 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11204
11205         * driver.c (mono_main): Call mono_verify_corlib.
11206
11207 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11208
11209         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
11210         This has been moved to mini.c
11211         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
11212         type being casted is marshalbyref it could be a proxy, so instead of
11213         emitting the type check code, emit a call to a runtime method that will
11214         perform the check by calling CanCastTo if needed.
11215
11216 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
11217
11218         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
11219         methods with large stack frames under Win32.
11220
11221 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11222
11223         * Makefile.am: Distribute regression tests.
11224
11225         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
11226         at the end instead of inserting each variable into the sorted list.
11227
11228         * linear-scan.c (mono_varlist_sort): New helper function.
11229         
11230 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
11231
11232         * mini.c: ensure arguments and locals are within bounds.
11233
11234 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11235
11236         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
11237         related fixes.
11238
11239 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11240
11241         * mini.c (mono_cprop_copy_values): Fix crash.
11242
11243         * aot.c: Set verbosity back to 0.
11244         
11245 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11246
11247         * regalloc.c: complete memory leak fix by Laurent Morichetti
11248         (l_m@pacbell.net).
11249
11250 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11251
11252         * driver.c (main_thread_handler): Revert the previous patch.
11253
11254         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
11255         under valgrind.
11256
11257         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
11258         memory from the memory pool.
11259
11260         * driver.c (main_thread_handler): Turn on all optimizations when
11261         --aot is used.
11262
11263         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
11264         an array for better performance.
11265
11266         * regalloc.c (mono_regstate_assign): Fix memory leak.
11267
11268         * debug-mini.c (mono_debug_serialize_debug_info): New function to
11269         serialize the debug info.
11270
11271         * debug-mini.c (mono_debug_add_aot_method): New function to load the
11272         debug info from the serialized representation.
11273
11274         * aot.c: Save debug info into the generated file and load it when 
11275         loading a method.
11276
11277         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
11278
11279 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
11280
11281         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
11282         More FP-related fixes.
11283
11284 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
11285
11286         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
11287         and register allocation buglet. Hello world now runs.
11288
11289 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
11290
11291         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
11292         * tramp-ppc.c: fixed class init trampoline.
11293         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
11294
11295 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
11296
11297         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
11298         mini.c: more ppc changes/fixes.
11299
11300 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
11301
11302         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
11303         Also optimize the case when the arguments are the same in the caller 
11304         and in the callee.
11305
11306         * iltests.il: Add tests for tail calls with valuetype arguments.
11307
11308 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
11309
11310         * mini-ppc.c: fixes for struct return type.
11311
11312 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
11313
11314         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
11315         mono_spillvar_offset() to arch-specific code.
11316
11317 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
11318
11319         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
11320
11321 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
11322
11323         * exceptions-x86.c: Fix stack space leaks.
11324         
11325         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
11326         registers from the lmf if the method has save_lmf set.
11327
11328 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11329
11330         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
11331         of icall wrappers into InvokeInDomain, since these are now per-domain.
11332
11333 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
11334
11335         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
11336         make some opcode emulation and intrinsic ops enabled/disabled 
11337         according to the architecture. More fixes.
11338
11339 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
11340
11341         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
11342
11343 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
11344
11345         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
11346         arch-specific handling for 'this' and struct return type to
11347         arch-specific code.
11348
11349 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11350
11351         * aot.c: prevent divide by zero error when reporting (it happened with
11352         Accessibility.dll).
11353
11354 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
11355
11356         * mini.h (inst_switch): Remove unused macro.
11357
11358 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11359
11360         * aot.c:
11361         (load_aot_module): free 'info->methods' and 'info' properly. No more
11362         "free(): invalid pointer blah" messages when you have an old aot
11363         compiled assembly.
11364
11365 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
11366
11367         * jit-icalls.c, mini.c: Added support for context static fields.
11368
11369 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11370
11371         * mini.c (mono_method_blittable): Methods which set LastError are not 
11372         blittable either. Fixes #51108.
11373         
11374 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
11375
11376         * mini.c: flush icache.
11377         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
11378
11379 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11380
11381         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
11382
11383 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
11386         safe on IA32.
11387
11388         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
11389         vararg calls.
11390
11391         * inssel.brg (CEE_MKREFANY): Fix AOT case.
11392
11393 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
11396         instruction when the result is discarded.
11397
11398         * iltests.il (test_0_div_regalloc): New regression test.
11399
11400         * arrays.cs: Fix compilation error.
11401
11402 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11403
11404         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
11405         float rules to inssel-x86.brg: sane architectures with FP registers
11406         don't need to implement these rules.
11407
11408 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
11409
11410         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
11411
11412 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11413
11414         * mini.h, inssel-long32.brg: fixed endianess issues in int64
11415         implementation of 32 bit systems.
11416
11417 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
11418
11419         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
11420         (Jeroen Zwartepoorte).
11421
11422 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
11425         the caller and the callee matches.
11426         
11427         * mini.c (mono_method_to_ir): Add comment.
11428
11429         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
11430         signbit is missing on some platforms.
11431
11432 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
11433
11434         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
11435
11436         * mini.c (setup_jit_tls_data): Call the new function.
11437         
11438         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
11439
11440         * mini-x86.c: Add experimental support for fast access to the lmf
11441         structure under NPTL/Linux 2.6.x.
11442
11443 2003-11-06  Martin Baulig  <martin@ximian.com>
11444
11445         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
11446         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
11447         the debugger.
11448
11449 2003-11-02  Martin Baulig  <martin@ximian.com>
11450
11451         * mini.c (inflate_generic_field): New static method.
11452         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
11453         generic instance and the field is declared in a generic type, call
11454         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
11455
11456 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11457
11458         * mini.h mini.c (mono_method_same_domain): New function to return
11459         whenever the caller and the callee are in the same domain.
11460
11461         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
11462
11463 2003-10-30  Martin Baulig  <martin@ximian.com>
11464
11465         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
11466         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
11467         method parameters.
11468         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
11469         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
11470
11471 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
11472
11473         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
11474         propagation.
11475
11476         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
11477         object here, so it is in the correct appdomain etc.
11478
11479 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11480
11481         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
11482         already done.
11483         (mono_method_to_ir): Avoid freeing the type created returned from
11484         mono_type_create_from_typespec, since it is put into an internal cache
11485         by the function. Fixes pointer.exe.
11486
11487         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
11488         trampolines for icalls and pinvokes as well. Fixes #33569.
11489
11490 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11491
11492         * mini.c: Update after appdomain changes.
11493
11494         * mini.c (mono_jit_compile_method_inner): Allways compile native
11495         method wrappers in the root domain, since there can only be one
11496         instance of them, whose address is stored in method->info.
11497
11498 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
11499
11500         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
11501         environment variable. Instead detect automatically whenever running
11502         under valgrind using the magic macro RUNNING_ON_VALGRIND from
11503         valgrind.h.
11504
11505 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
11506
11507         * trace.c, trace.h: New files that implement the new trace option
11508         parsing. 
11509
11510         * driver.c: Document new --trace options.
11511
11512         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
11513         mini-x86.c: Apply:
11514
11515         -       if (mono_jit_trace_calls)
11516         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
11517
11518         * mini.h: prototypes.
11519         
11520 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
11521
11522         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
11523
11524         * mini.c inssel.brg: Implement typedefbyref opcodes.
11525
11526         * mini.c (mono_jit_compile_method): Remove unused local variable.
11527
11528         * mini.c (mono_jit_compile_method_inner): Ditto.
11529         
11530 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
11531
11532         * tramp-x86.c (x86_class_init_trampoline): Fix build.
11533         
11534         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
11535
11536 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
11537
11538         * mini.c (mono_no_aot): Remove unused global variable.
11539
11540         * mini.c: Thread safety fixes.
11541
11542 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * mini.c (mono_create_class_init_trampoline): Add a lock around
11545         class_init_hash_addr.
11546
11547         * arrays.cs (test_0_newarr_emulation): Add new regression test for
11548         #30073.
11549
11550         * mini.c: Decompose the NEWARR instruction before decomposing its
11551         arguments. Fixes #30073.
11552
11553 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
11554
11555         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
11556         convention.
11557
11558 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
11559
11560         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
11561
11562         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
11563
11564         * driver.c: Add support for compiling icall wrappers to --compile.
11565
11566 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
11567
11568         * inssel.brg: The empty value in class->interface_offsets is -1, not
11569         0. Fixes #49287.
11570
11571 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * objects.cs: New test for 'is' operator on an array of interfaces.
11574
11575 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11576
11577         * tramp-ppc.c: update trampoline code to support jumps
11578         and class initialization.
11579
11580 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
11581
11582         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
11583
11584         * inssel.brg (OP_UNBOXCAST): Fix #46027.
11585
11586         * inssel.brg (OP_UNBOX): Remove unused rule.
11587
11588         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
11589         region instead of one for each method. Fixes #47813.
11590
11591 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
11592
11593         * exceptions.cs (test_0_nested_finally): New regression test for
11594         nested exception handlers.
11595
11596         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
11597
11598         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
11599
11600         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
11601         inlining.
11602
11603         * mini.c (mono_method_check_inlining): Make the inlining limit 
11604         configurable by an environment variable.
11605         
11606         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
11607
11608         * mini.h: Bump AOT file version.
11609
11610         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
11611         token, store the image along with the token, since the token might not 
11612         refer to the same image as the method containing the relocation, 
11613         because of inlining.
11614
11615 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
11616
11617         * mini.c (mono_precompile_assemblies): New function to compile
11618         all methods in all loaded assemblies.
11619
11620         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
11621
11622         * regalloc.h regalloc.c (MonoRegState): Change the type of 
11623         iassign and fassign to int*, since they can contain large negative
11624         values if the register is spilled. Also added some comments. Fixes
11625         #45817.
11626
11627         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
11628         under Win32. Fixes #42964.
11629
11630 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
11631
11632         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
11633
11634         * aot.c: Added support for AOT compiling methods which contain calls
11635         to wrappers. Currently, only remoting-invoke-with-check wrappers are
11636         handled.
11637         
11638         * driver.c (compile_all_methods): Run the compilation in a thread
11639         managed by mono. Fixes #44023.
11640
11641         * mini.c (mono_codegen): Print full method name in verbose output.
11642
11643         * mini-x86.c (mono_arch_patch_code): Fix warning.
11644         
11645         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
11646         jumps, since the method we are jumping to might be domain-specific.
11647
11648         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
11649
11650 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11651
11652         * inssel.brg: string chars are unsigned.
11653
11654 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
11655
11656         * TODO: New todo item.
11657
11658         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
11659         which calls mono_runtime_class_init and patches the call site to
11660         avoid further calls.
11661         (mono_arch_create_class_init_trampoline): New arch specific function 
11662         to create a class init trampoline.
11663         (create_trampoline_code): Generalized so it can create
11664         class init trampolines as well.
11665
11666         * mini.c (helper_sig_class_init_trampoline): New helper variable.
11667         (mono_create_class_init_trampoline): New function to create and cache
11668         class init trampolines.
11669         (mono_find_class_init_trampoline_by_addr): New function to lookup the
11670         vtable given the address of a class init trampoline. Used by the
11671         patching process.
11672         (mono_codegen): Generate a call to a trampoline instead of
11673         mono_runtime_class_init in LDSFLD[A].
11674         (mono_codegen): Add relocations for the new trampoline.
11675         
11676         * mini.h mini-x86.c aot.c: Added a new relocation type: 
11677         MONO_PATCH_INFO_CLASS_INIT.
11678
11679         * mini.h: Bump AOT version number.
11680
11681         * aot.c: Create a copy of the loaded code instead of using the original
11682         so methods which call each other will be close in memory, improving
11683         cache behaviour.
11684         
11685         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
11686         patch since it breaks the regression tests.
11687         
11688         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
11689         for the register saving instruction sequence since the 
11690         frame_state_for function in glibc 2.3.2 don't seem to detect it.
11691
11692 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
11693
11694         * TODO: Fix todo item && remove another.
11695
11696 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
11697
11698         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
11699         previous checkin.
11700
11701         * aot.c: Moved the check for MONO_LASTAOT into the initialization
11702         function of the module.
11703
11704         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
11705         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
11706         --no-aot command line option.
11707
11708 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
11709
11710         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
11711         by Bernie Solomon (bernard@ugsolutions.com).
11712
11713         * inssel.brg: Refactor the interface offset table related code into
11714         its separate functions and add support for the AOT case.
11715
11716 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
11717
11718         * aot.c (mono_aot_get_method_inner): Fix memory leak.
11719         
11720         * aot.c: Added mono_aot_verbose variable and made all debugging
11721         output depend on the value of this variable.
11722
11723         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
11724         method_label and info_label.
11725
11726         * mini.h mini-x86.c aot.c: Added a new relocation type 
11727         MONO_PATCH_INFO_IID for klass->interface_id.
11728
11729         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
11730         the MonoJitInfo structure.
11731
11732         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
11733         a non-root appdomain in shared mode.
11734
11735 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
11736
11737         * aot.c: make aot loader less verbose. Remove free of unused variable.
11738
11739 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
11740
11741         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
11742
11743         * .cvsignore: Added *.dll.
11744
11745         * mini.c (mono_print_tree_nl): New function callable while debugging.
11746
11747         * mini.c (mono_print_code): Export this.
11748
11749         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
11750         patched code.
11751
11752 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
11753
11754         * mini.h (MonoCompile): Added 'jit_info' field.
11755
11756         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
11757         the cfg structure, since it is needed by the AOT compiler.
11758
11759         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
11760
11761         * aot.c: A major rewrite. Changes include:
11762         - save exception tables for methods which have them.
11763         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
11764         to g_module_symbol.
11765         - reworked the file format so it is now much smaller and needs
11766         fewer relocation entries.
11767         
11768 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11769
11770         * aot.c (load_aot_module): Fix build bustage on platforms without
11771         Boehm GC.
11772
11773 2003-09-04  Martin Baulig  <martin@ximian.com>
11774
11775         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
11776
11777 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
11778
11779         * TODO: Some new optimization ideas.
11780
11781         * aot.c: Move AOT module loading logic here from mono_assembly_open.
11782
11783         * aot.c: Save the optimization flags used to compile the code into
11784         the AOT module.
11785
11786         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
11787         support emitting domain specific code.
11788         
11789         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
11790         no longer domain neutral. It can be made domain neutral by compiling 
11791         with --optimize=shared.
11792
11793         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
11794         between appdomains.
11795
11796         * driver.c mini.h mini.c: New --no-aot debugging option which disables
11797         loading of AOT code.
11798
11799         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
11800         
11801         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
11802         if there is no domain neutrality information.
11803
11804 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
11805
11806         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
11807         format version into the generated library.
11808
11809         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
11810         callee method into the caller since one of them could be shared.
11811
11812         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
11813         system exceptions from AOT code now works.
11814
11815         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
11816         method if it is domain neutral and the callee is not.
11817
11818         * graph.c (cfg_emit_one_loop_level): Fix warning.
11819
11820 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
11821
11822         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
11823         last checkin.
11824
11825 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
11826
11827         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
11828         is needed  by code which is executed before mono_runtime_init ().
11829         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
11830         
11831         * mini.c (mono_thread_abort): Fix warning.
11832         (mono_jit_compile_method): Call static constructor in the AOT case too.
11833
11834         * aot.c (mono_compile_assembly): Fix warning.
11835
11836 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11837
11838         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
11839
11840 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
11841
11842         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
11843
11844         * cpu-pentium.md: Fix the length of call opcodes so they include the
11845         ESP restoring instruction. Fixes #47968.
11846
11847 2003-08-28  Martin Baulig  <martin@ximian.com>
11848
11849         * mini-x86.c (mono_arch_call_opcode): Added support for
11850         MONO_TYPE_GENERICINST.
11851
11852         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
11853
11854 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
11857         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
11858
11859         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
11860         metadata_section.
11861
11862 2003-08-26  Martin Baulig  <martin@ximian.com>
11863
11864         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
11865         when reporting an error, set this to the actual error location.
11866         (mono_method_to_ir): Report the correct error location if
11867         get_basic_blocks() returned an error.
11868
11869 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
11870
11871         * mini.c (mono_type_blittable): OBJECT is not blittable.
11872         (mono_method_blittable): Methods which have marshalling descriptors
11873         are not blittable either. Fixes #47842.
11874
11875 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
11876
11877         * driver.c mini.c: Use an environment variable instead of a global 
11878         variable. Also fix the build.
11879
11880         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
11881         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
11882         reporting this. 
11883
11884         * driver.c mini.c: Added --with-valgrind option to turn off some
11885         code which prevents mono from running under valgrind.
11886
11887         * mini.c (mono_emit_call_args): Fixed warning.
11888
11889         * mini.c (mono_emulate_opcode): Fixed warning.
11890
11891 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11892
11893         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
11894         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
11895         regalloc.c, regalloc.h: specify available registers in arch-specific
11896         code and support floats in the regallocator (patch by Laurent Morichetti 
11897         <l_m@pacbell.net>)
11898
11899 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
11900
11901         * mini.c: mono_thread_current() can be called only after
11902         mono_runtime_init(): rearrange code to not call it early on.
11903
11904 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11905
11906         * mini.c: allocate jump tables in the code mempools.
11907
11908 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11909
11910         * mini.c, mini.h: make sure per-thread data allocated by the jit is
11911         freed.
11912
11913 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
11914
11915         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
11916         12 to 16.  This fixes bug #47453.
11917
11918
11919 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11920
11921         * mini-ppc.c: fixed indexed load and unsigned compares.
11922
11923 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
11924
11925         * mini.c: reenabled installation of handler for
11926           thread abort signal.
11927
11928 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11929
11930         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
11931         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
11932         until it's fixed and actually useful.
11933
11934 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11935
11936         * inssel-long32.brg: couple more opcodes implemented.
11937
11938 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
11939         
11940         * mini-sparc.c: Even more opcodes implemeted.
11941
11942 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
11943
11944         * mini-sparc.c: More opcodes implemented.
11945
11946 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
11947
11948         * mini-sparc.c: More opcodes implemented.
11949
11950 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
11951
11952         * inssel-sparc.brg: Add some needed rules.  Direct
11953         copy from PPC.
11954         * Makefile.am: Use inssel-sparc.brg
11955         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
11956         an assert happy for now.
11957
11958 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
11959
11960         * mini-sparc.c: Fixed compile errors.
11961         * exceptions-sparc.c: Same.  We now produce a mono binary 
11962         on sparc-linux.  Yea.
11963
11964 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
11965
11966         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
11967         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
11968         They compile, but do not work.
11969
11970 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11971
11972         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
11973         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
11974         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
11975         (ct@gentoo.org).
11976
11977 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11978
11979         * mini.c: more opcodes implemented and better support for generics.
11980
11981 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
11982
11983         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
11984         * mini.c, mini.h: first cut at generics support: some new instructions 
11985         added and changed the behaviour of some of the existing ones.
11986
11987 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
11988
11989         * mini.c: Removed definition of metadata_shared mutex here.
11990
11991 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
11992
11993         * mini-x86.c: make vararg calls work for instance methods.
11994
11995 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11996
11997         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
11998         returns the arguments in a separte list, now.
11999
12000 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12001
12002         * aot.c, mini.c: updates for array type representation changes.
12003
12004 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
12005
12006         * mini.c: register function to perform jit shutdown.
12007
12008 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12009
12010         * mini.c: use a faster allocator if possible.
12011
12012 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12013
12014         * aot.c: some cleanups and portability changes.
12015
12016 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12017
12018         * mini.c: use faster allocation for CEE_BOX if possible.
12019
12020 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12021
12022         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
12023         Moved inlined mempcy code to its own function so that is can be
12024         reused. Added an inline memset function as well (optimized initobj).
12025         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
12026
12027 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12028
12029         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
12030
12031 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12032
12033         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
12034         arch code can setup the cpu for CLR execution, if needed.
12035         We use it on x86 to set the precision of FP operations.
12036
12037 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12038
12039         * mini.c: disable some optimizations if we can guess they'll cost too
12040         much for a given method.
12041
12042 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12043
12044         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
12045         
12046 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
12047         * mini.h mini.c mini-x86.c: Added instruction level coverage 
12048         info collection support.
12049
12050 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12051
12052         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
12053         is now implemented in the profiling API. Get rid of a couple of
12054         unnecessary global variables.
12055
12056 2003-06-15  Nick Drochak <ndrochak@gol.com>
12057
12058         * basic-long.cs: tests for negative values for bigmul, and unsigned.
12059         * cpu-g4.md: add op_bigmul and op_bigmul_un
12060         * cpu_pentium.md: add op_bigmul_un
12061         * inssel-long32.brg: add rule for unsigned bigmul
12062         * mini-ops.h: define OP_BIGMUL_UN
12063         * mini-x86.c: THE BUG: handle (un)signed properly
12064         * mini.c: choose unsigned opcode if needed.
12065         This set of patches fixes bug #44291
12066
12067 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
12068
12069         * mini.c (optimize_branches): improved to handle all kinds of
12070         conditional branches.
12071
12072 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12073
12074         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
12075         don't raise exceptions.
12076
12077 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12078
12079         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
12080         to arch-specific files.
12081
12082 2003-06-09  Martin Baulig  <martin@ximian.com>
12083
12084         * Makefile.am (libs): Added $(LIBGC_LIBS).
12085
12086 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
12087
12088         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
12089         and OP_ATAN (fixes bug#44293).
12090
12091 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
12092
12093         * Makefile.am, mini-x86.c: rename cpu description array to
12094         pentium_desc, since some compilers define the 'pentium' preprocessor
12095         symbol.
12096
12097 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
12098
12099         * mini.c (mini_select_instructions): add explicit branch if the
12100         following block is not the false target of a conditional branch -
12101         we need this with any optimization that reorder or remove bblocks
12102
12103         * mini.c (optimize_branches): bug fixes
12104
12105 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
12106
12107         * mini.c (mono_method_to_ir): inline static readonly fields
12108
12109         * ssa.c (fold_tree): start cfold support for long (very simple
12110         cases only)
12111
12112         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
12113
12114 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12115
12116         * inssel.brg: fixed memcpy (bug #44219).
12117
12118 2003-06-05  Dick Porter  <dick@ximian.com>
12119
12120         * driver.c: Set the glib log levels to not abort if g_message
12121         recurses.
12122
12123         g_set_prgname() has to happen before mini_init() so that the
12124         process handle gets the info.
12125         
12126 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12127
12128         * driver.c: add intrins to the default optimizations to get wider
12129         exposure.
12130
12131 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12132
12133         * mini.h: some large basic blocks will overflow a 16-bit
12134         integers for symbolic registers.
12135
12136 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12137
12138         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
12139         (mono_arch_output_basic_block): fix bug 43499 
12140
12141 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12142
12143         * mini.c: kill duplicated definition of mono_debug_format.
12144
12145 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
12146
12147         * mini-x86.c, arrays.cs: fixed register allocation bug.
12148
12149 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
12150
12151         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
12152
12153         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
12154
12155 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12156
12157         * mini.c:
12158         (print_method_from_ip): also print source location information if
12159         available.
12160
12161 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
12162
12163         * mini.c (mono_find_block_region): bug fix in region code
12164         (mini_method_compile): enable removing unreachable code again, but
12165         only in methods without exception clauses.
12166
12167 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
12168
12169         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
12170         Implemented arglist opcode and handling of TypedReference type.
12171         Fixed x86 call convention when a structure is returned.
12172         Minimal support for calling static vararg methods.
12173
12174 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
12175
12176         * mini.c (mini_method_compile):  always remove unreachable code,
12177         because the code in them may be inconsistent  (access to dead
12178         variables for example).
12179
12180 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12181
12182         * driver.c, debug-mini.c: warning fixes.
12183
12184 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12185
12186         * Makefile.am, jit.h, mini.h: install header for embedding mono.
12187
12188 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
12189
12190         * mini.c: thread-static fields are registered in mono_class_vtable(),
12191         so ensure the function is called before checking for them.
12192
12193 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
12194
12195         * mini.c (optimize_branches): fix for bug 43586
12196
12197         * jit-icalls.c (mono_llmult_ovf): added an additional check for
12198         overflow (fixes Bug #43639)
12199
12200 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12201
12202         * mini.c, objects.cs: allow the use of stobj for primitive types.
12203
12204 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12205
12206         * mini.c: be less strict about argument checking until we support
12207         running the verifier.
12208
12209 2003-05-27  Nick Drochak <ndrochak@gol.com>
12210
12211         * basic-long.cs: tests for (ulong)int * (ulong)int also
12212         * mini.c: use the same trick for (ulong)int * (ulong)int
12213
12214 2003-05-27  Nick Drochak <ndrochak@gol.com>
12215
12216         * basic-long.cs: add regression test for (long)int * (long)int
12217         * cpu-pentium.md: add op_bigmul specification
12218         * inssel-long32.brg: add OP_BIGMUL rule
12219         * mini-ops.h: add OP_BIGMUL
12220         * mini-x86.c: register allocator: handle case where src1 needs to be
12221         in EAX.
12222         * mini.c: substitute special BIGMUL opcode in the tree for 
12223         (long)int * (long)int
12224
12225 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12226
12227         * jit-icalls.c: call the type ctor on field access if needed.
12228
12229 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12230
12231         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
12232         to a method (including results of ldelema, bug#43207).
12233
12234 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
12235
12236         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
12237         colors to show exception handler blocks.
12238
12239         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
12240         (fix for pinvoke7.cs).
12241
12242 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12243
12244         * mini.h, mini.c: ensure correct initialization order for types that
12245         require it. Prepare for lazy compilation of jit icall wrappers.
12246         Provide a name for opcode emulation to reduce unneeded mallocing.
12247
12248 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
12249
12250         * mini-x86.c: better register restoring code and profiling
12251         support for tail calls.
12252
12253 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12254
12255         * mini.h, driver.c: prepare for leaf methods optimization.
12256
12257 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12258
12259         * mini.c: get targets of branches before converting a method.
12260
12261 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
12262
12263         * mini.c (optimize_branches): added some experimental code (disbaled) 
12264
12265 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
12266
12267         * mini.c (optimize_branches): fix branch to branch optimization 
12268
12269         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
12270
12271         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
12272
12273         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
12274
12275         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
12276         if needed.
12277
12278 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
12279
12280         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
12281         enable use of interface variables again.
12282
12283         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
12284         I1 to registers because there is no simply way to sign extend 8bit
12285         quantities in caller saved registers on x86.
12286
12287         * inssel-float.brg: set costs of some rules to 2 so
12288         that monobure always select the arch. specific ones if supplied,
12289         regardless of the order we pass the files to monoburg.
12290
12291 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12292
12293         * mini.c, mini-x86.c: since the magic trampoline for jumps
12294         can't patch the code directly, we do it as soon as the
12295         method gets compiled.
12296
12297 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
12298
12299         * mini-x86.c, mini.h: introduce a new patching method
12300         to support CEE_JMP and tail calls.
12301         * mini.c: obey tail.call. Don't precompile methods target
12302         of CEE_JMP.
12303         * tramp-x86.c: new trampoline code to handle methods
12304         reached through a jump.
12305
12306 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
12307
12308         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
12309         bit values to registers
12310
12311 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
12312
12313         * mini.c (mono_compile_get_interface_var): share interface
12314         variables if possible.
12315
12316 2003-05-16  Martin Baulig  <martin@ximian.com>
12317
12318         * debug-mini.c (mono_init_debugger): New function to initialize
12319         the debugger.  This is not in the debugger since it needs to
12320         access some of mini's internals.
12321
12322 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
12323
12324         * mini.c (mono_method_to_ir): inlining fixes/cleanups
12325
12326 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
12327
12328         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
12329         for value type handling.
12330
12331 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
12332
12333         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
12334         (mono_method_check_inlining): enable inlining of all kinds of wrappers
12335
12336 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
12337
12338         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
12339           the constructor through a proxy.
12340
12341 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12342
12343         * jit-icalls.c, inssel.brg: fixes to array element address
12344         calculations.
12345
12346 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
12347
12348         * mini-x86.c (is_regsize_var): allocate pointer to registers
12349
12350 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12351
12352         * driver.c: fixed typo, added intrins to the set of optimizations
12353         tested with regressions.
12354
12355 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12356
12357         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
12358         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
12359         test case.
12360
12361 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
12362
12363         * inssel.brg: remove some common pop instructions without side effects
12364
12365 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
12366
12367         * inssel-x86.brg: fixed thinko in int to double conversions.
12368
12369 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12370
12371         * mini.c, jit-icalls.c: added runtime thread-static variable support.
12372
12373 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
12374
12375         * inssel-long32.brg: two more missing instructions.
12376
12377 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
12378
12379         * mini.c (mono_emit_call_args): set the cil_code for all arguments
12380         if not already set.
12381
12382 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
12383
12384         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
12385         correctly.
12386
12387         * basic-float.cs: Added tests for negative zero.
12388
12389 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
12390
12391         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
12392         a couple of missing operations for long casts, with test cases.
12393
12394 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12395
12396         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
12397
12398 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
12399
12400         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
12401         code size estimation.
12402
12403 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
12404
12405         * mini.c (mono_jit_create_remoting_trampoline): make it work with
12406         abstract methods (fix bug 42542)
12407
12408         * aot.c: add ability to handle array types
12409         
12410 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * mini.c: Call the _specific versions of the object allocation
12413         functions if possible.
12414
12415 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
12416
12417         * driver.c: call setlocale ().
12418
12419 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
12420
12421         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
12422         windows build.
12423
12424 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
12425
12426         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
12427
12428         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
12429         wrappers (fix bug 42122)
12430
12431 2003-05-04  Martin Baulig  <martin@ximian.com>
12432
12433         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
12434
12435         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
12436         s/mini_set_defaults/mono_set_defaults/g.
12437
12438 2003-05-04  Martin Baulig  <martin@ximian.com>
12439
12440         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
12441
12442 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12443
12444         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
12445         (reported by Don Roberts).
12446
12447 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
12448
12449         * mini.c: temporarily work around two bugs for this release.
12450
12451 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
12452
12453         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
12454         that contains -export-dynamic and it makes using the ld script
12455         useless.
12456         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
12457
12458 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12459
12460         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
12461         specific cpu.
12462
12463 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12464
12465         * mini.c: make sure leave calls all the needed finally blocks,
12466         even when the target jumps out of multiple exception clauses.
12467
12468 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12469
12470         * ldscript, Makefile.am: add linker script to reduce the number of
12471         exported symbols (should also fix the issues with libwine defining
12472         some of the same symbols in io-layer).
12473
12474 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
12475
12476         * driver.c (mini_main): Avoid assertion when no file name is given on 
12477         the command line.
12478
12479 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
12480
12481         * driver.c: added --version/-V command line option.
12482         Added the inline optimization in the regression tests.
12483
12484 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
12485
12486         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
12487         to the type in the method signature (fixes bug#42134).
12488
12489 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
12490
12491         * mini.c: when inlining, check this is not null only when needed (bug #42135).
12492
12493 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
12494
12495         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
12496
12497 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12498
12499         * driver.c: fixed bug #42100.
12500
12501 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
12502
12503         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
12504
12505 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
12506
12507         * mini.c: moved most of the code required to do inlining to its own
12508         function so it can be reused. Inline also ctors if appropriate.
12509
12510 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
12511
12512         * Makefile.am: Link with -export-dynamic so shared libs loaded by
12513         the runtime can call mono API functions.
12514
12515 2003-04-27  Martin Baulig  <martin@ximian.com>
12516
12517         * debug-mini.c (mono_debug_init_method): Added
12518         `guint32 breakpoint_id' argument; if the method has a breakpoint,
12519         send a notification to the debugger.
12520
12521         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
12522         running in the Mono Debugger, just pass the breakpoint number to
12523         mono_debug_init_method().
12524
12525         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
12526
12527 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
12528
12529         * mini.c: allow some more unsafe compares.
12530
12531 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12532
12533         * mini-x86.c, Makefile.am: make distcheck works (partially from
12534         a patch by Richard Lee <r.h.lee@attbi.com>).
12535         * regset.c, regset.h: removed, they are unused.
12536
12537 2003-04-25  Dick Porter  <dick@ximian.com>
12538
12539         * driver.c: Usage reports the name as 'mono' not 'mini'
12540         * exceptions-x86.c: Build and run on freebsd
12541
12542 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
12543
12544         * Makefile.am: install the program with the 'mono' name and
12545         the library as libmono instead of mini and libmini.
12546
12547 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
12548
12549         * driver.c: provide the APIs for the embedding interface of the old jit.
12550
12551 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
12552
12553         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
12554
12555 2003-04-23  Martin Baulig  <martin@ximian.com>
12556
12557         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
12558
12559         * driver.c: Added `--debug' command line argument to enable
12560         debugging support.
12561
12562 2003-04-23  Martin Baulig  <martin@ximian.com>
12563
12564         * debug.[ch]: Removed.  The code is now in
12565         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
12566
12567         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
12568         last six months.
12569
12570 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
12571
12572         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
12573
12574 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12575
12576         * mini.c:
12577         (mini_cleanup): moved mono_runtime_cleanup call after the call to
12578         mono_domain_finalize.
12579         (mini_method_compile): use mono_method_profile* if the the option is
12580         enabled.
12581
12582 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
12585         methods with their wrapper.
12586
12587         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
12588         methods with their wrapper.
12589
12590         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
12591         their wrapper.
12592
12593         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
12594         wrapper.
12595
12596         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
12597         methods.
12598
12599 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
12600
12601         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
12602
12603 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
12604
12605         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
12606         of the mempool. This is slightly faster and uses less memory
12607
12608 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
12609
12610         * mini.c: avoid O(n) allocation for variables.
12611
12612 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12613
12614         * mini.c: handle items on the stack after inlining methods.
12615
12616 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12617
12618         * mini.c: make the method->opcode optimization dependent
12619         on MONO_OPT_INSTRINS and do it lazily.
12620
12621 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
12622
12623         * driver.c: print overall results at the end of regression run.
12624
12625 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12626
12627         * inssel.brg: don't overwrite symbolic registers.
12628
12629 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
12630
12631         * inssel-x86.brg: fix conversion from long to float.
12632
12633 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
12634
12635         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
12636
12637 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
12640
12641         * driver.c: Added --print-vtable option as in the old JIT.
12642
12643 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
12644
12645         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
12646
12647 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
12648
12649         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
12650
12651 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
12652
12653         * mini.c regalloc.c regalloc.h: Fix memory leak.
12654
12655 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
12656
12657         * aot.c (mono_aot_get_method): register all used strings
12658
12659 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
12660
12661         * mini.c: always intern strings references with ldstr at compile time.
12662
12663 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
12664
12665         * Makefile.am: add BUILT_SOURCES.
12666
12667 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
12668
12669         * driver.c: give a better error message when the assembly to execute
12670         doesn't have an entry point.
12671
12672 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
12673
12674         * Makefile.am: added hack for automake
12675
12676         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
12677         correct sematics.
12678
12679         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
12680
12681 22003-04-07  Martin Baulig  <martin@ximian.com>
12682
12683         * Makefile.am: Added Makefile.am.
12684
12685         * debugger-main.c: Removed, this is now in the debugger where it
12686         belongs.
12687
12688         * mini.pc.in: Call this package `mini' for the moment.
12689
12690
12691
12692
12693
12694
12695
12696