2008-10-06 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
4
5         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6         so inlining actually works.
7         (check_inline_caller_method_name_limit): Ditto.
8
9 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
10
11         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
12         64 bit safety (from Olaf Hering and Andreas Färber).
13
14 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
15         
16         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
17         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
18         unused virtual call support code.
19
20         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
21         
22         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
23         which can't use aot trampolines.
24         (decode_patch): Don't create aot trampolines for methods which can't use
25         them.
26
27         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
28         use aot trampolines.
29
30         * mini.h: Bump AOT image format version.
31         
32 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
33
34         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
35         to save_token_info () since cmethod is inflated for constrained calls.
36
37         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
38
39 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
40
41         * Makefile.am: Add build rules for ppc64.
42         This avoids the build failing at pedump with unresolved symbols
43         due to lack of arch_sources. Instead it will now fail earlier
44         due to lack of cpu-ppc64.md.
45
46         Contributed under MIT/X11 license.
47
48 2008-10-04  Mark Probst  <mark.probst@gmail.com>
49
50         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
51         tail calls.
52
53         * iltests.il.in: Add test case for tail call with many arguments.
54
55 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
56
57         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
58         to the fast virtual generic method code until the aot case is fixed.
59
60 2008-10-03  Mark Probst  <mark.probst@gmail.com>
61
62         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
63
64 2008-10-03  Mark Probst  <mark.probst@gmail.com>
65
66         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
67         thunks.
68
69 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
70         
71         * simd-intrinsics.c: Forgot to add this one.
72
73         * mini-codegen.c: Fix macro in case SIMD is not supported.
74
75 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
76         
77         This patch land initial JIT support for simd intrinsics.
78
79         * mini-x86.h: Added new define to make --enable_minimal work on x86.
80
81         * Makefile.am: Added simd-intrinsics.c
82
83         * simd-intrinsics.c: New file with simd instrinsic related
84         code.
85
86         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
87
88         * cpu-x86.md: Add simd related instructions.
89
90         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
91
92         * driver.c: Added two new --regression variants.
93
94         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
95
96         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
97
98         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
99         extract some complicated logic to helper functions.
100
101         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
102
103         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
104
105         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
106         the specialized simplification pass.
107
108         * method-to-ir.c (mono_spill_global_vars): Use new macro.
109
110         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
111
112         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
113         table.
114
115         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
116         if MONO_ARCH_NEED_SIMD_BANK is defined.
117
118         * mini-ops.h: Added the new simd ops.
119
120         * mini-x86.c: Added mono_arch_xregname.
121
122         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
123
124         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
125
126         * mini-x86.h: Define simd related MONO_ARCH macros.
127
128         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
129
130         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
131
132         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
133         MONO_CLASS_IS_SIMD to deal with simd related IR.
134
135         * mini.h (MonoInst): Added spill_var to the backend union.
136
137         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
138
139         * mini.h: Added forward declarations of the new simd fuctions.
140
141         * optflags-def.h: Added new optimization names SIMD.
142
143         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
144
145         * regalloc.h: Added support for working with 3 register banks.
146
147         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
148
149         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
150
151 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
152
153         * mini-exceptions.c: remove 64 bit related ifdef clutter.
154
155 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
156
157         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
158         instead of one on 64 bit systems.
159
160         * method-to-ir.c: Remove unused includes.
161
162 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
163
164         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
165         cfg->used_int_regs, since the two are different on arm.
166
167 2008-10-02  Mark Probst  <mark.probst@gmail.com>
168
169         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
170         mono_method_get_vtable_index() to get the vtable index.
171
172 2008-10-02  Mark Probst  <mark.probst@gmail.com>
173
174         * method-to-ir.c (mono_method_to_ir2): Don't create native
175         wrappers for array methods, because they're never called (and if
176         they were called they wouldn't work).
177
178 2008-10-02  Mark Probst  <mark.probst@gmail.com>
179
180         * method-to-ir.c (mono_method_to_ir2): Array methods are
181         special-cased and must not be invoked indirectly via the (M)RGCTX
182         when generic sharing is turned on.  Fixes #431413.
183
184 2008-10-01  Mark Probst  <mark.probst@gmail.com>
185
186         * method-to-ir.c: When generic sharing is active, call
187         non-interface virtual generic methods via the standard trampoline.
188
189         * mini-trampolines.c: Handle virtual generic shared methods.
190
191         * mini.h, mini-x86.c, mini-x86.h: New argument for
192         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
193         method thunks and which is the trampoline to call if the lookup
194         fails.  Enable the virtual generic method thunk for x86.
195
196         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
197         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
198         argument but assert that it's NULL, because these archs don't yet
199         implement the virtual generic method thunk.  Changes in the IMT
200         thunk data structures.
201
202 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
203
204         * aot-compiler.c (emit_globals): Avoid invalid characters in
205         the static linking symbol.
206
207         * objects.cs: Add a test for the range check optimization. Fix warnings.
208
209         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
210         optimization from the current JIT.
211
212         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
213         later in decompose_array_access_opts () to allow more optimizations.
214
215         * method-to-ir.c (mono_handle_soft_float): Rename this to 
216         mono_decompose_soft_float () for consistency.
217
218         * mini-ops.h: Fix arguments of OP_STRLEN.
219
220         * method-to-ir.c (save_cast_details): Extract the cast details saving code
221         into a separate function.
222         (reset_cast_details): Ditto.
223         (handle_unbox): Save cast details. Fixes #431254.
224
225         * method-to-ir.c: Remove some obsolete FIXMEs.
226
227 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
228
229         * ir-emit.h (alloc_dreg): Write a warning before crashing.
230
231 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
232
233         * mini-codegen.c: More work on macros to make them
234         ready for multiple regbanks.
235
236 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
237
238         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
239
240         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
241
242 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
243
244         * mini-codegen.c (mono_spillvar_offset): Proper support for
245         multiple regbanks.
246
247 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
248
249         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
250         the stack overflow changes.
251
252 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
253
254         * mini-codegen.c: Make all bank macros depend on reg_bank.
255
256         * mini-codegen.c (mono_local_regalloc): Make free mask
257         initialization regbank aware.
258
259 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
260
261         * mini-codegen.c (mono_local_regalloc): Extract callee
262         mask selection to a function and make it regbank aware.
263
264 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
265
266         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
267         code to deal with many regbanks.
268
269 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
270
271         * mini-codegen.c: More fp->regbank changes.
272
273 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
274
275         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
276         of a hardcoded constant.
277
278 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
279
280         * method-to-ir.c (type_from_stack_type): Fix typo.
281
282 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
283
284         * mini-ia64.c (emit_move_return_value): Convert float return values to
285         double.
286
287         * objects.cs: Add a new test.
288         
289         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
290         VARARG methods to fix an assert later.
291
292         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
293         end so it at least compiles.
294
295 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
296
297         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
298
299 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
300
301         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
302         optimization to a new function (emit_optimized_ldloca_ir) and enable
303         it for both ldloca and ldloca_s.
304
305 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
306
307         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
308         gshared CASTCLASS code.
309
310         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
311         amd64, where the libc stack unwinder encounters stack frames referring to
312         native code in unmapped memory.
313
314         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
315         sharing.
316
317         * generics.cs: Add new test.
318
319 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
320
321         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
322         add a check that one of the ARM_FPU_ constants is defined.
323
324         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
325         
326         * mini-exceptions.c: Fix build on non-altstack platforms.
327
328         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
329         sharing of vtypes.
330
331         * ir-emit.h: Add a comment to NEW_PCONST.
332
333         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
334
335         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
336
337         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
338         after the changes to MonoJitDomainInfo.
339
340 2008-09-27  Mark Probst  <mark.probst@gmail.com>
341
342         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
343
344 2008-09-27  Mark Probst  <mark.probst@gmail.com>
345
346         * mini-ppc.c: Compiler warning fixes.
347
348 2008-09-27  Mark Probst  <mark.probst@gmail.com>
349
350         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
351         for pinvokes.
352
353 2008-09-27  Mark Probst  <mark.probst@gmail.com>
354
355         * exceptions-ppc.c, mini-ppc.h: Compile
356         mono_arch_handle_altstack_exception() on Darwin, too.
357
358 2008-09-27  Mark Probst  <mark.probst@gmail.com>
359
360         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
361         work on archs which don't have generic sharing implemented, only
362         without the vtable_arg.
363
364 2008-09-26  Mark Probst  <mark.probst@gmail.com>
365
366         * mini.c: Added comment explaining why delegate ctor icall
367         wrappers are compiled.
368
369 2008-09-26  Mark Probst  <mark.probst@gmail.com>
370
371         * mini.c: Don't produce trampolines to delegate ctor icall
372         wrappers but compile them upfront.
373
374 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
375
376         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
377         runtime-set function when going back to managed code. Currently this
378         is used to set back the protection on the soft ovf pages and/or to
379         throw the stack overflow exception that happened in unmanaged code.
380
381 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
382
383         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
384         runtime-set function when going back to managed code. Currently this
385         is used to set back the protection on the soft ovf pages and/or to
386         throw the stack overflow exception that happened in unmanaged code.
387
388 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
389
390         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
391         the support code for restoring stack protection after stack overflows
392         that happen in unmanaged code. Don't set the exec permission on the
393         soft overflow area.
394
395 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
396
397         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
398         delegate->method_ptr is set. Fixes #428054.
399
400 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
401
402         * tests.cs: Rename to ratests.cs.
403
404         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
405         emit_get_rgctx_... functions.
406
407 2008-09-25  Mark Probst  <mark.probst@gmail.com>
408
409         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
410
411 2008-09-25  Mark Probst  <mark.probst@gmail.com>
412
413         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
414         before asserting that method is sharable.
415
416 2008-09-25  Mark Probst  <mark.probst@gmail.com>
417
418         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
419         whether method needs a static RGCTX wrapper used instead of
420         complex conditions.
421
422         * generic-sharing.c, mini.h: A few functions moved to
423         metadata/generic-sharing.c.
424
425 2008-09-25  Mark Probst  <mark.probst@gmail.com>
426
427         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
428         Generic code sharing for value types, which essentially means
429         treating value type methods like static methods.  The RGCTX is
430         passed in the same way.
431
432 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
433
434         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
435         opcode when creating multi-dimensional arrays of open types.
436
437         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
438         open generic types.
439
440         * generics.cs: Add a test.
441
442         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
443
444 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
445
446         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
447
448         * mini.c (mini_method_compile): Set it when running under the debugger. 
449
450         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
451         vreg optimization if the flag is set.
452
453         * driver.c (mono_main): Add --attach= option to pass options to
454         the attach agent.
455
456         * mini.c (sigquit_signal_handler): Start the attach agent.
457
458         * ssapre.c: Disable this to save space since it is not yet ported to
459         linear IR.
460
461         * regalloc2.c: Disable this to save space.
462
463         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
464
465 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
466
467         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
468         the -v option useful again.
469
470 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
471
472         * mini-amd64.c (mono_arch_output_basic_block): Add support for
473         --break-at-bb.
474
475         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
476         arrays of arrays. Fixes #428406.
477
478         * method-to-ir.c (mini_emit_castclass): Ditto.
479
480         * objects.cs: Add new test.
481         
482 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
483
484         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
485         was wrong at it choked against target_type_is_incompatible for byref types.
486
487 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
488
489         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
490         places.
491
492 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
493
494         * mini-exceptions.c: update a few more exceptions-related counters.
495
496 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
497
498         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
499         new functions to allocate from persistent mempools.
500
501 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
502
503         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
504         multiple register banks in the future.
505
506         * mini-codegen.c (mono_local_regalloc): Fix a warning.
507
508 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
509
510         * mini.c (type_to_eval_stack_type): Remove duplicated function.
511
512         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
513
514         * mini.h: Export type_to_eval_stack_type.
515
516         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
517         is only ins->klass of byref types.
518
519 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
520
521         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
522         (mini_emit_memcpy2): Ditto.
523
524         * mini-amd64.c: Fix a warning.
525
526 2008-09-21  Mark Probst  <mark.probst@gmail.com>
527
528         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
529         linking.
530
531 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
532
533         * method-to-ir.c: Extract stloc micro-optimization to a
534         function and apply it to all cases.
535
536 2008-09-19  Mark Probst  <mark.probst@gmail.com>
537
538         * method-to-ir.c: Don't fail generic code sharing in cases we
539         already support.
540
541 2008-09-18  Mark Probst  <mark.probst@gmail.com>
542
543         * mini-ppc.c: Handle structs in tailcalls on Darwin.
544
545 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
546
547         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
548         implementation.
549
550 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
551
552         * trace.c: make tracing more useful and correct, with per-thread
553         id and indent info.
554
555 2008-09-15  Mark Probst  <mark.probst@gmail.com>
556
557         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
558         doing a method call and the argument is an R4.
559
560 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
561
562         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
563         generic methods.
564
565 2008-09-13  Mark Probst  <mark.probst@gmail.com>
566
567         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
568
569 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
570
571         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
572         (MONO_JUMP_TABLE_FROM_INS): Ditto.
573
574 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
575
576         * driver.c: Add a --agent argument (not supported yet) to load managed
577         agent assemblies before loading the main assembly, similarly to how the
578         Java VM handles agents.
579
580 2008-09-11  Mark Probst  <mark.probst@gmail.com>
581
582         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
583         function to do stack layout of local variables.
584
585 2008-09-11  Mark Probst  <mark.probst@gmail.com>
586
587         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
588         calculation.
589
590 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
591
592         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
593         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
594         JIT if DISABLE_JIT is defined.
595
596         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
597         defined.
598
599 2008-09-10  Mark Probst  <mark.probst@gmail.com>
600
601         * iltests.il.in: Disable the fconv test on PPC (the result is
602         undefined according to ECMA).
603
604 2008-09-10  Mark Probst  <mark.probst@gmail.com>
605
606         * iltests.il.in: Enable tail call tests for PPC.
607
608         * mini.h: Add variable for storing incoming valuetype argument
609         addresses for tail calls.
610
611         * mini-ppc.c: Implement valuetype arguments and return values for
612         tailcalls on Linux.
613
614 2008-09-09  Mark Probst  <mark.probst@gmail.com>
615
616         * mini-ppc.c: Partially implement tail calls (struct arguments and
617         return values not supported).
618
619         * method-to-ir.c: Enable tail calls on PPC.
620
621 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
622
623         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
624         runtime-invoke wrappers to work around the problem of them getting
625         assigned to a random class.
626
627         * aot-runtime.c (mono_aot_get_method): Ditto.
628         
629 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
630
631         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
632         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
633
634 2008-09-07  Mark Probst  <mark.probst@gmail.com>
635
636         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
637         until they're implemented properly.
638
639         * exceptions-ppc.c: Use arch-independent exception-handling code
640         instead of custom one.
641
642         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
643         for Linear IR.
644
645         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
646
647         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
648         applies when __powerpc__ is defined.
649
650 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
651
652         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
653         methods to their code to avoid computing the full name of wrappers and
654         doing a lookup in a string hash table.
655
656 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
657
658         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
659         we identify bblocks before method_to_ir () is ran.
660
661         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
662         Also avoid optimizing branches pointing to themselves.
663
664         * mini.c (mini_method_compile): Ditto. Fixes #422947.
665
666 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
667
668         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
669
670 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
671
672         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
673         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
674         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
675         'buf'.
676
677         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
678         jumped to the same entry in plt_jump_table.
679
680 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
681
682         * method-to-ir.c (initialize_array_data): Handle field with RVA from
683         dynamic images.
684
685 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
686
687         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
688         other assignment can be if converted. Saves 1.5% on corlib size and fixes
689         #421807.
690
691 2008-08-29  Geoff Norton  <gnorton@novell.com>
692
693         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
694         segment, and doesn't properly handle .space as .text.  Fixes
695         AOT Mach/ARM
696
697 2008-08-29  Geoff Norton  <gnorton@novell.com>
698
699         * mini.c: Disable the mach exception handler when running on 
700         ARM
701
702 2008-08-29  Geoff Norton  <gnorton@novell.com>
703
704         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
705         globals on Darwin/ARM
706
707 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
708
709         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
710         since too many things depend on it. Instead, call 
711         mono_runtime_set_no_exec ().
712         
713         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
714         the new JIT.
715
716         * aot-compiler.c: Add an 'asm-only' AOT option.
717
718         * mini.c: Avoid initializing the runtime when doing AOT compilation.
719                 
720         * aot-compiler.c (compile_method): Disable gshared support for now as it
721         doesn't yet work.
722
723 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
724
725         * mini-amd64.h : Fix a compiler warning.
726
727         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
728           Changed to use a callback function to retrieve the unwind info.
729           This avoids problems observed when code blocks were removed by
730           unloading an app domain.
731
732         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
733           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
734           to work properly.
735
736         Contributed under MIT/X11 license.
737
738 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
739
740         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
741           case to keep the stack aligned to 8.
742
743         Contributed under MIT/X11 license.
744
745 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
746
747         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
748         avoid repeated linear searches.
749
750 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
751
752         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
753         methods it can't handle.
754         
755         * aot-compiler.c (add_method): Avoid adding a method twice.
756         (add_wrappers): Add runtime invoke wrappers for all methods.
757
758         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
759         function to create an aot-compatible version of this trampoline.
760
761         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
762
763 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
764
765         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
766
767         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
768         with a generic sharing failure.
769
770         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
771
772         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
773         CEE_RETHROW. Fixes #419634.
774
775         * mini.c (mono_method_to_ir): Ditto.
776
777         * exceptions.cs: Add a new test.
778         
779         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
780         to mono_type_stack_size_internal () since some callers might not pass in
781         an rgctx.
782
783         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
784         instrument_prolog. Fixes #419878.
785
786         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
787         doubles in soft float mode volatile.
788
789 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
790
791         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
792
793         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
794         to handle soft float correctly.
795
796         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
797         the fast path.
798
799         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
800
801         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
802         to sp, since the generics catch code requires it.
803
804         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
805         copying.
806
807         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
808         mono_arch_emit_imt_argument ().
809
810         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
811
812         * mini-arm.c tramp-arm.c: Generic sharing updates.
813
814 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
815
816         * mini-arm.c: Fix the arm build.
817
818         * generic-sharing.c (mini_type_get_underlying_type): New helper function
819         handling enums, generic instances and generic sharing.
820         (mini_type_stack_size_full): Ditto.
821
822         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
823         
824         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
825
826         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
827
828         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
829         trampolines.
830
831         * mini-arm.c: Various small generic sharing changes.
832
833         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
834         this for x86.
835         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
836         custom code.
837
838         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
839         helper function to return a generic class init trampoline.
840
841         * method-to-ir.c mini.c: Use it.
842         
843         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
844         arch-specfic function to return a generic class init trampoline.
845
846         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
847         the GENERIC_CLASS_INIT custom code.
848
849         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
850         a fatal error, not a sharing failure.
851
852         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
853         needed.
854
855         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
856         trampoline argument from MONO_ARCH_VTABLE_REG.
857
858         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
859         order of the arguments to the C trampoline: pass 'slot' as the trampoline
860         argument, and pass the vtable in VTABLE_REG.
861
862         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
863         order of the arguments to the C trampoline: pass 'slot' as the trampoline
864         argument, and pass the vtable in VTABLE_REG.
865         (mono_arch_create_trampoline_code_full): Remove some special casing for
866         the rgctx fetch trampoline.
867
868         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
869         Fixes #419273.
870
871         * iltests.il: Add a test for it.
872
873 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
874
875         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
876
877         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
878         no longer needed.
879
880         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
881         use mono_jit_info_table_find () to avoid recursion.
882         (mono_delegate_trampoline): Add a sync wrapper here.
883
884         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
885         here.
886
887         * mini.c (mono_method_to_ir): Ditto.
888         
889         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
890         add_sync_wrapper argument. Don't add a sync wrapper here.
891         (mono_create_jump_trampoline): Don't add a sync wrapper here.
892
893         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
894         
895 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
896
897         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
898           of nonvolatile registers back from MonoContext to CONTEXT.
899
900         Contributed under MIT/X11 license.
901
902 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
903
904         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
905           arguments on Winx64 there are only 4 argument registers.  For this
906           logic to work the last argument must be pulled from the stack.  
907
908         Contributed under MIT/X11 license.
909
910 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
911
912         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
913
914         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
915         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
916         encode/decode_method_ref ().
917
918         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
919
920         * aot-runtime.c (decode_patch): Ditto.  
921
922         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
923         MONO_PATCH_INFO_METHOD.
924
925         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
926         MonoGenericJitInfo.
927
928         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
929         MonoGenericJitInfo.
930
931         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
932
933         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
934         one from the caller.
935
936         * aot-runtime.c (decode_generic_inst): New function to decode and
937         return a interned generic inst.
938         (decode_klass_ref): Use it.
939         (decode_method_ref): Ditto.
940
941         * aot-compiler.c (emit_exception_debug_info): Save 
942         jinfo->has_generic_jit_info too.
943
944 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
945
946         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
947
948         * iltests.il.in: Add a test for fconv_to_i.
949
950         * liveness.c: Disable the liveness2 pass for now to save space.
951
952         * regalloc2.c: Include mempool-internals.h to fix warnings.
953
954         * aot-compiler.c (encode_method_ref): Encode the context of generic
955         instance methods.
956
957         * aot-runtime.c (decode_method_ref): Inflate generic methods using
958         the context saved in the aot file.
959
960         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
961
962         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
963
964         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
965         volatile so they won't be optimized away.
966
967 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
968
969         * ssa.c:
970         * ssa2.c:
971         * mini.c:
972         * regalloc2.c:
973         * dominators.c: Remove duplicated functions that now are in
974         mempool-internals.h.
975
976 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
977
978         * aot-compiler.c: Fix warnings.
979
980         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
981
982         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
983
984         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
985         as the patch type.
986
987         * mini.c (mono_resolve_patch_target): Ditto.
988         
989         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
990         (encode_klass_ref): Add support for encoding VARs/MVARs.
991
992         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
993
994         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
995         the handling of the got entries into a separate 'decode_got_entry' function.
996         Add support for RGCTX_FETCH.
997
998         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
999         clobbered by the trampoline code.
1000
1001         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1002         not clobbered by the indirect calling code.
1003
1004 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1005
1006         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1007         to fix the build.
1008
1009 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1010
1011         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1012         signature using the compilation mempool otherwise we would leak it.
1013
1014 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1015
1016         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1017         mono_emit_abs_call ().
1018
1019         * patch-info.h: Add GENERIC_CLASS_INIT.
1020
1021         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1022
1023         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1024         as their target as a near call.
1025
1026         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1027         ABS handling code.
1028         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1029
1030         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1031         call to a runtime function described by a patch.
1032
1033         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1034         mono_emit_abs_call, this has the advantage that the ABS handling code in
1035         mono_codegen () can handle them both, and can handle other stuff in the
1036         future without additional code.
1037
1038         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1039         entry.
1040         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1041         abs addresses.
1042
1043         * mini.h: Add missing bblock related prototypes.
1044
1045         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1046         reverse_inst_list_len fields.
1047
1048         * mini.c: Refactor this file a bit by moving branch optimizations to 
1049         branch-opts.c.
1050
1051         * method-to-ir.c: Merge generic sharing changes missed earlier.
1052
1053         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1054
1055         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1056         shared patches. Process METHODCONST as a shared patch.
1057
1058         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1059         as it crashes on the 2.0 mscorlib.
1060
1061         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1062         to cause crashes.
1063         
1064         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1065         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1066         by IMT.
1067
1068         * aot-compiler.c: Reorganize the got handling code to be a bit more
1069         understandable.
1070
1071 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1074         mono_patch_info_equals/hash, and use it to massively simplify
1075         get_plt_index ().
1076
1077         * mini.c (mono_patch_info_hash): Simplify this and add support for
1078         more patch types.
1079
1080         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1081
1082         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1083         handling code, since an offset is not enough to identify a trampoline.
1084
1085         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1086
1087 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1088
1089         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1090
1091         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1092
1093         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1094
1095         * decompose.c: PPC decompositions for various ops.
1096
1097         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1098
1099 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1100
1101         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1102         call the generic trampoline code using a call, instead of a jump, to
1103         remove some special casing from the generic trampoline code.
1104
1105         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1106         (mono_codegen): Ditto.
1107
1108         * aot-compiler.c aot-runtime.c: Ditto.
1109
1110         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1111
1112         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1113         helper function to find the offset corresponding to a lazy fetch trampoline.
1114
1115         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1116         when doing generic sharing.
1117
1118         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1119         places.
1120         
1121         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1122         mini-trampolines.c to be with the other trampoline creation functions.
1123
1124         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1125         as it is equal to method->signature in most cases, add a 
1126         mono_emit_method_call_full variant which takes a signature and an imt
1127         argument as well.
1128
1129 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1130
1131         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1132         to this function, since it could be computed easily from the method 
1133         argument.
1134         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1135         more.
1136
1137         * method-to-ir.c mini.c: Remove references to 
1138         compile_generic_method_wo_context.
1139
1140         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1141         generic method calls.
1142         
1143         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1144         dimensional non-szarrays.
1145
1146         * mini.c (mini_init): Register mono_array_new_1.
1147
1148         * jit-icalls.c (mono_array_new_1): New jit icall.
1149
1150         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1151         pointing to the method.
1152
1153         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1154         method addresses belonging to METHOD_JUMP patches in the 
1155         jump_target_got_slot_hash.
1156         (mono_aot_load_method): Ditto.
1157
1158         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1159         METHOD_JUMP patches.
1160
1161         * mini.c (mini_create_jit_domain_info): New helper function which 
1162         initializes/frees domain->runtime_info.
1163         (mini_free_jit_domain_info): Ditto.
1164         (mini_init): Install the domain hook functions with the runtime.
1165
1166         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1167         information maintained by the JIT.
1168
1169         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1170         insertion into jump_table_hash into mono_codegen (), also implement proper
1171         locking.
1172
1173         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1174         tail calls, it is already done by the aot code.
1175         
1176         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1177         mechanism on amd64.
1178
1179         * iltests.il.in: Make the jmp test a bit more complex.
1180
1181         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1182         generic instances which doesn't have a token.
1183
1184         * aot-runtime.c (decode_method_ref): Ditto.
1185         
1186         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1187         can handle this case now.
1188         (handle_box): Ditto.
1189
1190 2008-08-15  Geoff Norton  <gnorton@novell.com>
1191
1192         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1193         debugging check.
1194
1195 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1196
1197         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1198         calling generic methods.
1199
1200         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1201
1202         * aot-runtime.c (decode_patch_info): Ditto.
1203
1204         * mini.c (mono_resolve_patch_target): Ditto.
1205         
1206         * patch-info.h: Add METHOD_RGCTX.
1207
1208         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1209
1210 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1211
1212         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1213         arguments in registers.
1214
1215         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1216         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1217
1218         * mini.c (mini_method_compile): Abort aot compilation for generic
1219         methods if generic sharing is disabled.
1220         
1221         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1222         an mrgctx.
1223
1224         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1225         requiring an mrgctx.
1226
1227         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1228         store instructions when converting a vcall to a normal call.
1229
1230         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1231         mono_arch_find_jit_info.
1232
1233 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1234
1235         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1236         avoid calling mono_method_full_name () for every method even if the
1237         env var is not set.
1238         (check_inline_caller_method_name_limit): Ditto.
1239
1240 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1241
1242         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1243         assemblies in one run.
1244
1245         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1246         skipped methods if it is not 0.
1247
1248         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1249
1250 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1251
1252         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1253           MONO_ARCH_HAVE_UNWIND_TABLE.
1254
1255         Contributed under MIT/X11 license.
1256
1257 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1258
1259         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1260           from default optimizaton list on Winx64.
1261
1262         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1263
1264         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1265           the LMF from the MonoJitTlsData structure.
1266
1267         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1268
1269         Contributed under MIT/X11 license.
1270
1271 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1272
1273         * mini.c (sigsegv_signal_handler): Fix the build.
1274
1275         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1276         assembly->aot_module.
1277
1278         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1279         hash table. This simplifies and speeds up a lot of code, and fixes support
1280         for .netmodules.
1281
1282         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1283         with the runtime.
1284
1285         * mini-exceptions.c: Ditto.
1286         
1287         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1288         'native_offset' argument, since these are computed in the 
1289         mono_find_jit_info () function.
1290
1291         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1292         is used by exceptions-ppc.c.
1293
1294         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1295         mono_arch_find_jit_info ().
1296         
1297         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1298         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1299         generic code in mini-exceptions.c.
1300
1301 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1302
1303         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1304
1305         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1306         
1307         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1308         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1309         called while holding the loader lock. Fixes #415608.
1310         (mono_aot_get_method_from_token_inner): Ditto.
1311
1312 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1315         to reduce differences between this and the generic implementation in
1316         mini-exceptions.c.
1317         (ves_icall_get_frame_info): Ditto.
1318
1319         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1320
1321         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1322         longer neccesarry.
1323
1324         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1325         mono_arch_get_call_filter () and make it non-static, for consistency with the
1326         other architectures.
1327
1328 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1329
1330         * mini.c:
1331         * local-propagation.c:
1332         * mini-x86.c: Correct the name of arch defines.
1333
1334 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1335
1336         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1337         NO_EMULATE_LONG_SHIFT_OPS define.
1338
1339 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1340
1341         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1342         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1343
1344         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1345         MACH fixes. Merged from the 2.0 branch.
1346
1347         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1348
1349         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1350         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1351
1352         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1353
1354         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1355         mono_marshal_get_native_wrapper () signature changes.
1356
1357 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1358
1359         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1360         conversion bug under arm.
1361
1362 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1363
1364         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1365
1366         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1367         with overflow checking.
1368
1369 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1370
1371         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1372         to the genmdesc.pl file
1373
1374 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1375
1376         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1377         arg_array in the soft-float versions of the LOAD/STORE macros.
1378
1379         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1380         implementation.
1381
1382         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1383
1384 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1385
1386         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1387         a float HFA. Fixes #413621.
1388
1389 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1390
1391         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1392         frame_size to args_size. Fixes build.
1393
1394 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1395
1396         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1397         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1398
1399         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1400         the stack are not unaligned. Fixes #413247.
1401         
1402 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1403
1404         * mini.c: update jitted methods performance counters.
1405
1406 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1407
1408         * mini-exceptions.c: increase the exceptions thrown performance
1409         counter in mono_handle_exception ().
1410
1411 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1412
1413         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1414         can work with netmodules.
1415
1416 2008-07-28  Geoff Norton  <gnorton@novell.com>
1417
1418         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1419         regression tests.
1420
1421 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1422
1423         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1424         correct place.
1425
1426 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1427
1428         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1429           The float param registers and other param registers must be the 
1430           same index on Windows x64.
1431
1432         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1433           ArgValuetypeAddrInIReg argument case.  Setting the argument
1434           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1435
1436         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1437           variable computed above as the copy length for arguments of storage
1438           type ArgValuetypeAddrInIReg.
1439
1440         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1441           ArgValuetypeAddrInIReg argument case.  This case will rely on
1442           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1443
1444         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1445           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1446           jump and tail call instructoins as they do not follow the typical call behavior.
1447
1448         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1449           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1450           local variable and pass the local variable by reference to the called method.
1451
1452         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1453           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1454           of a struct is passed in a register it must be saved with the other
1455           volatile argument on the stack.
1456
1457         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1458           frame pointer the stack adjustment value must be saved to the unwind 
1459           info structure.
1460
1461         Contributed under MIT/X11 license.
1462
1463 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1464
1465         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1466         which got lost in the merge.
1467
1468 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1469
1470         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1471         build.
1472
1473         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1474         
1475         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1476         icalls, since they won't be patched.
1477
1478         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1479         different code sequence when running under valgrind to prevent some valgrind
1480         errors.
1481
1482         * iltests.il.in: Add new regression test.
1483
1484         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1485         end with a throw.
1486
1487         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1488         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1489
1490         * iltests.il.in: Add new test.
1491
1492         * aot-compiler.c: Fix some warnings.
1493
1494         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1495         Fixes #412494.
1496
1497 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1498
1499         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1500         (mini_usage_jitdeveloper): Add a missing --wapi option.
1501
1502 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1503
1504         * mini-codegen.c: Simplify the is_fp macros.
1505         (free_up_ireg): Remove, use free_up_reg instead.
1506         (free_up_reg): Fix the fp case.
1507
1508 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1509
1510         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1511         lowered earlier.
1512
1513         * exceptions-x86.c: Merge some changes which seemed to have got lost
1514         in the linear-ir merge.
1515
1516         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1517
1518         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1519         long vreg volatile even if the variable was already created.
1520
1521         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1522         volatile variables.
1523
1524 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1525
1526         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1527
1528         * mini.c (mono_jit_compile_method_inner): Add support for 
1529         MONO_EXCEPTION_BAD_IMAGE.
1530
1531         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1532         mini_method_get_context () returns NULL. Fixes #356531.
1533
1534         * mini.c (mono_method_to_ir): Ditto.
1535         
1536         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1537         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1538
1539 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1542         in the LDFTN implementation.
1543
1544 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1545
1546         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1547         code, patch calls to icalls, too, even if they're not in the
1548         shared generic code hash.  Fixes #411962.
1549
1550 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * cpu-x86.md: Increase the length of the fcall opcodes.
1553
1554         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1555         calls returning floats.
1556
1557         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1558         on NEWARR.
1559         
1560         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1561         missed earlier.
1562
1563         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1564         into the domain->method_code_hash.
1565
1566         * aot-compiler.c: Fix win32 build.
1567
1568         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1569         
1570         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1571         gshared NEWARR implementation.
1572
1573         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1574
1575         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1576         can be used outside of method_to_ir.
1577
1578         * mini.h (MonoCompile): Add arg_types field.
1579
1580         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1581         
1582         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1583         the values of the local arg_array and param_types array.
1584
1585 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1586
1587         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1588         got accesses might only get generated later when NEWOBJ is decomposed.
1589         
1590         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1591         looking up the native code of the target method when a delegate is called
1592         for the first time.
1593
1594         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1595         optimization.
1596
1597         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1598
1599         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1600         AOT work on platforms without a working dlsym implementation.
1601
1602         * mini.h: Bump AOT image format version.
1603         
1604 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1605
1606         * mini-exceptions.c: Free a MonoType with
1607         mono_metadata_free_type() instead of g_free().
1608
1609         * aot-runtime.c: Free a MonoType.
1610
1611 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1612
1613         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1614         optimization.
1615
1616         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1617         fp stack on x86.
1618
1619 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1620         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1621         profiler hook.
1622
1623 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1624
1625         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1626         NEWOBJ calls on valuetypes.
1627
1628         * iltests.il.in: Add new test.
1629
1630         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1631
1632 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1633
1634         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1635         is no longer needed.
1636
1637         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1638         non register sized integer arguments.
1639         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1640         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1641         emit_memcpy2 ().
1642
1643         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1644         CEE_MONO_RETOBJ.
1645         
1646         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1647         two a binop with different sized arguments is emitted.
1648
1649         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1650         instruction in the ins==NULL case.
1651
1652 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1653
1654         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1655
1656         * mini-x86.c: Fix osx build.
1657
1658         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1659         opcodes as well.
1660
1661         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1662         instruction for non int sized variables.
1663
1664         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1665         implementation.
1666
1667 2008-07-23  Robert Jordan  <robertj@gmx.net>
1668
1669         * method-to-ir.c: Fix MSVC build.
1670
1671 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1672
1673         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1674         a non int sized type, widen it to an int since newer versions of gcc seem to
1675         generate code which needs this.
1676
1677         * ssa2.c abcremoval2.c: Fix warnings.
1678
1679         * *: Merge the Linear IR branch.
1680
1681         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1682         the ChangeLog file there describes all the changes done over the years. 
1683         Further documentation can be found at www.mono-project.com/Linear_IL.
1684
1685 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1686
1687         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1688           The float param registers and other param registers must be the 
1689           same index on Windows x64.
1690
1691         Contributed under MIT/X11 license.
1692
1693 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1694
1695         * mini.c: Make the previous fix GC safe.
1696
1697 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1698
1699         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1700
1701 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1702
1703         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1704           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1705           ArgValuetypeAddrInIReg instead.
1706
1707         Contributed under MIT/X11 license.
1708
1709 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1710
1711         * mini-codegen.c (get_register_spilling): Fix a warning.
1712
1713 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1714
1715         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1716         for types which the initialization fails. Raises the provided exception
1717         at the right stop after cleanup.
1718
1719 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1720
1721         * aot-compiler.c: Free most of the memory allocated during compilation.
1722
1723         * mini.c (mini_parse_debug_options): Fix a leak.
1724         
1725         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1726         during aot compilation.
1727
1728 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1729
1730         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1731         it has too much register pressure.
1732
1733 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1734
1735         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1736
1737 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1740         on x86.
1741
1742         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1743         on amd64 similar to the way it is done on arm.
1744
1745         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1746
1747         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1748         consistency, normalize error messages, avoid loading aot-only modules in
1749         normal mode.
1750
1751         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1752         for consistency.
1753
1754         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1755
1756 2008-07-11  Martin Baulig  <martin@ximian.com>
1757
1758         * debug-debugger.h
1759         (MonoDebuggerInfo): Add `interruption_request'.
1760
1761 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1762
1763         * aot-compiler.c (emit_plt): Remove some dead code.
1764
1765         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1766
1767         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1768         return the plt info offset belonging to a given plt entry.
1769
1770         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1771         mono_aot_get_plt_info_offset.
1772         
1773         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1774         similar to the amd64 code by makeing jumps through a separate jump table 
1775         instead of embedding the jump addresses into the code.
1776
1777 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1778
1779         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1780         method.
1781
1782 2008-07-10  Martin Baulig  <martin@ximian.com>
1783
1784         * mini.c (mini_method_compile): Disable generics sharing when
1785         running in the debugger.
1786
1787 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1788
1789         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1790
1791         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1792         the local register allocator from running out of registers on x86 when 
1793         using aot.
1794
1795 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1796
1797         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1798         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1799         C4146.
1800
1801         Contributed under MIT/X11 license.
1802
1803 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1804
1805         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1806         speed up the assembler.
1807
1808 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1809
1810         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1811         support.
1812
1813         * mini.c: Move the soft float handling macros a bit earlier, add 
1814         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1815         place.
1816
1817         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1818
1819         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1820         read-only to help catch code allocation requests.
1821         
1822         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1823         and turn it off when using --aot-only or when compiling with --aot=full.
1824
1825         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1826         jump table for switches from the normal domain mempool, not the code
1827         manager.
1828
1829         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1830         unbox trampoline which handles aot-only mode too.
1831
1832         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1833         an AOTed unbox trampoline.
1834
1835         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1836
1837 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1838
1839         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1840         ""
1841
1842         Contributed under MIT/X11 license.
1843
1844 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1845
1846         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1847           the unwind information for the method at the end of the allocated block.
1848           
1849         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1850           MonoCompileArch to hold the unwind info for SEH on Winx64
1851         
1852         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1853           frame pointer info for the method being compiled.
1854           
1855         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1856           the call to mono_exception_from_token.
1857           
1858         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1859           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1860           information is stored a the end of the method block because it is all 32-bit offset based.
1861
1862         Contributed under MIT/X11 license.
1863
1864 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1865
1866         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1867
1868         * wapihandles.c: Fix warnings.
1869
1870         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1871         mode.
1872
1873         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1874         mono_jit_compile_method in aot-only mode since that calls the type 
1875         initializer.
1876         
1877         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1878         get_delegate_invoke_impl in aot-only mode.
1879
1880         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1881
1882 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1883
1884         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1885
1886         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1887         is on by default.
1888
1889         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1890
1891         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1892         init trampoline from the AOT file as well.
1893
1894         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1895         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1896         code.
1897
1898         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1899         mono_init.
1900
1901         * exceptions-amd64.c: Add _full variants for the remaining exception code
1902         creation functions as well, allow emission of relocatable code, remove
1903         caching since that is now done by the caller.
1904
1905         * mini-exceptions.c: Add _full variants for the remaining exception code
1906         creation functions as well, add aot-only support.
1907
1908         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1909         if we can determine a proper token for them.
1910         (add_wrappers): Add a few more wrappers.
1911         (emit_method_code): Remove some dead code.
1912         (emit_trampolines): Emit exception code too.
1913
1914         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1915
1916         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1917         mono_array_new_va which avoids varargs.
1918
1919         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1920
1921         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1922         mono_arch_create_specific_trampoline () in all places.
1923
1924         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1925         a bit so it can be used for other things as well.
1926         
1927         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1928         on demand as well.
1929
1930         * exceptions-amd64.c: Rename the caching from the exception code creation
1931         functions, it is done by the caller instead.
1932         
1933         * exceptions-amd64.c: Change the signature of the exception code creation 
1934         functions to allow the creation of relocatable code later.
1935
1936         * mini-exceptions.c: Add a set of functions to query the various 
1937         runtime-generated exception functions.
1938
1939         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1940         mono_arch_.. () functions.
1941         
1942 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1945
1946         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1947
1948         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1949         (mini_get_vtable_trampoline): Ditto.
1950
1951         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1952         code in the AOT case by returning the code size and a list of relocations to
1953         the caller.
1954
1955         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1956
1957 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1958
1959         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1960           clean the stack.
1961
1962         Contributed under MIT/X11 license.
1963
1964 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1965
1966         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1967         so the buffer size can be computed correctly. Fixes #404735.
1968
1969         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1970         normally as cfg->debug_info is already freed.
1971
1972 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1973
1974         * mini-amd64.c: For calls returning vtypes in registers, don't store
1975         the return address on the stack, instead allocate a separate local for
1976         it. Fixes #404729.
1977
1978 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1979
1980         * mini-trampolines.c, mini.h: Add an argument to
1981         mono_create_jit_trampoline_in_domain() for turning off the adding
1982         of the sync wrapper.
1983
1984         * mini.c: Use the JIT trampoline without sync instead of
1985         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1986         be patched.
1987
1988 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1989
1990         * driver.c: Turn on GSHARED optimization by default.
1991
1992 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1993
1994         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1995         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1996
1997         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1998         create a variant of the generic trampoline code callable from AOTed trampolines.
1999
2000         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2001         trampoline code callable from AOTed trampolines.
2002
2003         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2004
2005 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2006
2007         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2008         pass-through manner.
2009
2010         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2011         and don't fail sharing for them anymore.
2012
2013         * mini-exceptions.c: Handle exceptions in shared generic methods.
2014
2015         * generic-sharing.c: When checking the context of a generic
2016         method, also check its class's context.  Don't treat wrappers as
2017         sharable.
2018
2019         * mini-trampolines.c: Some code factored out to
2020         metadata/generic-sharing.c.  Handle the MRGCTX case.
2021
2022         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2023         we must deal with the method being of another instantiation of the
2024         class.  Add static rgctx invoke wrappers to generic methods.
2025
2026 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2027
2028         * mini.c: Provide all jit infos of generic shared methods with a
2029         generic jit info.
2030
2031         * mini-exceptions.c: Handle the new situation that a generic info
2032         might be available, but not info about the this/vtable/mrgctx
2033         variable.
2034
2035 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2036
2037         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2038         generic methods.
2039
2040 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * dominators.c (check_dominance_frontier): Fix a warning.
2043
2044         * mini.h: Add some missing prototypes.
2045
2046         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2047
2048         * driver.c (mono_jit_init_version): Correct the comments since the first
2049         argument should be the name of the root domain, not a filename.
2050
2051         * aot-runtime.c (make_writable): Error out if this is called while running
2052         with --aot-only.
2053         (load_aot_module): Ditto.
2054
2055         * aot-compiler.c: Really fix the computation of method indexes.
2056
2057         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2058         optimizations as this is no longer called frequently.
2059
2060         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2061         method and the invoke impl code and pass it to the delegate trampoline instead of
2062         just the delegate class.
2063
2064 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2065
2066         * aot-compiler.c: Fixup the computation of method indexes.
2067         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2068         the method builder infrastructure.
2069
2070         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2071         has no header.
2072
2073         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2074         mode, load the method right away instead of creating a trampoline.
2075
2076         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2077
2078         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2079         some checks a bit.
2080
2081 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2084         (mono_aot_load_method): Use method_index instead of method->token.
2085
2086         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2087         can handle icalls etc. properly.
2088
2089         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2090
2091         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2092
2093         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2094         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2095         JIT_ICALL_ADDR patch type.
2096
2097         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2098
2099         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2100         request flag.
2101         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2102
2103         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2104
2105 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2106
2107         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2108         domain->jit_code_hash.
2109
2110 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2111
2112         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2113
2114 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2115
2116         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2117         get_this_arg_from_call, let it compute it when needed.
2118
2119         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2120         gsctx from code only when needed.
2121
2122         * mini-trampolines.c (get_generic_context): Rename this to 
2123         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2124         it can be called by the arch backends.
2125
2126         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2127
2128 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2129
2130         * driver.c (mono_main): Add experimental --aot-only command line option.
2131
2132         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2133         set.
2134
2135 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2136
2137         * driver.c (DllMain): Remove mono_module_handle.
2138
2139         Contributed under MIT/X11 license.
2140
2141 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2144         for emitting methods which are not in the source assembly. Detect and report
2145         failure of assembling+linking.
2146         
2147         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2148
2149         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2150
2151 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2152
2153         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2154
2155 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2156
2157         * mini.h: Remove some obsolete prototypes.
2158
2159         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2160
2161 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2162
2163         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2164         supported by Visual Studio, so use alloca().
2165
2166 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2167
2168         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2169         Fixes #402585.
2170
2171 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2172
2173         * mini.c: Fail sharing of a generic method if it contains an open
2174         catch clause (because we don't pass MRGCTXs yet).
2175
2176 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2177
2178         * mini.c: When compiling a method with generic sharing, insert the
2179         method instantiated with an all-Object generic context into the
2180         jit info table, instead of the context of the first instantiation
2181         of the method we happen to compile.
2182
2183 2008-06-18  Martin Baulig  <martin@ximian.com>
2184
2185         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2186         `major_version' and `minor_version'.
2187
2188 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2189
2190         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2191         mono_method_is_generic_sharable_impl() takes an additional
2192         argument specifying whether to treat type variables as reference
2193         types.
2194
2195 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2196
2197         * mini.h: Removed obsolete prototypes.
2198
2199 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2200
2201         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2202         already handle them.
2203
2204 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2205
2206         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2207         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2208         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2209         tramp-x86.c: Added a MonoGenericContext* argument to
2210         mono_arch_get_unbox_trampoline() so that it can call other
2211         functions which require it.
2212
2213 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2214
2215         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2216         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2217         mono_arch_get_this_arg_from_call() takes a
2218         MonoGenericSharingContext* as well.
2219
2220 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2221
2222         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2223         implement generic sharing of unbox.
2224
2225 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2226
2227         * mini.c: Don't compute the vtable to determine whether a field is
2228         special static, because it might not work for open types.
2229
2230 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2231
2232         * mini.c: Removed the unused token_type and token_source arguments
2233         from get_runtime_generic_context_ptr().
2234
2235 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2236
2237         * mini.c (ADD_BINOP): fix the build
2238
2239 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2240
2241         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2242         a widening op.
2243
2244 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2245
2246         * mini.h: Removed class relations enum that's not used anymore.
2247
2248 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2249
2250         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2251
2252         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2253         the lazy fetch trampoline access code.
2254
2255 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2256
2257         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2258
2259 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2260
2261         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2262
2263         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2264
2265         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2266
2267 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2268
2269         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2270         intrinsics.
2271
2272         * mini-ops.h: Add MIN/MAX_UN opcodes.
2273
2274         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2275         intrinsics.
2276
2277         * basic-math.cs: Add more min/max tests.
2278
2279         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2280
2281 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2282
2283         * mini.c: Small fix in the prologue of emit_castclass.
2284
2285 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2286
2287         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2288
2289         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2290         do not work even for unsigned types. Fixes #400014.
2291
2292         * basic-math.cs: Add regression tests for unsigned Min/Max.
2293
2294 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2295
2296         * mini.c: Added additional context_used argument to several
2297         functions, which will be needed for sharing generic methods.  Use
2298         GET_RGCTX macro wherever appropriate.  Declare only one
2299         context_used in mono_method_to_ir().
2300
2301 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2302
2303         * mini.c, generic-sharing.c: Removed generic class relations.
2304
2305         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2306         functions due to MRGCTX changes.
2307
2308 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2309
2310         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2311         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2312         with calculated IMT.
2313
2314         * mini.c: Generic sharing of calls via generic interfaces.
2315
2316         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2317         generic method with non-constant MonoGenericContext*.  Instead,
2318         the context is taken out of the method itself.
2319
2320 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2321
2322         * mini.c: Generic sharing of ldvirtftn.
2323
2324 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2325
2326         * mini.c: Generic sharing of ldftn.
2327
2328 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2329
2330         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2331
2332 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2333
2334         * mini.c: Generic sharing of the special case of ldtoken followed
2335         by a call to GetTypeFromHandle.
2336
2337 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2338
2339         * mini.c: Generic sharing of box for nullable types.
2340
2341 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2342
2343         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2344         are passed on the stack. Fixes #324807.
2345
2346 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2347
2348         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2349         for the ArgValuetypeAddrInIReg case.
2350
2351         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2352         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2353
2354         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2355         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2356         local variable and pass the local variable by reference to the called method.
2357           
2358         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2359         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2360
2361         Contributed under MIT/X11 license.
2362
2363 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2364
2365         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2366
2367         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2368         everything.
2369
2370 2008-06-10  Martin Baulig  <martin@ximian.com>
2371
2372         * debug-mini.c
2373         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2374
2375 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2376
2377         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2378         possible error when no arguments are passed.
2379
2380         Contributed under MIT/X11 license.
2381
2382 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2383
2384         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2385         where the file name is NULL.
2386
2387 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2388
2389         * mini.c: Fix s390 build.
2390
2391 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2392
2393         * trace.c (mono_trace_parse_options): Fix warnings.
2394
2395         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2396
2397 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2398
2399         * mini.c (remove_block_if_useless): Avoid printing the method name.
2400         
2401         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2402         MONO_INST_NEW.
2403
2404         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2405         LMF. Not yet used.
2406
2407         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2408         translated code after it has been patched.
2409
2410 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2411
2412         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2413         avoid problems during code patching on SMP systems.
2414         (emit_call): Avoid adding a patch info which is already added by 
2415         emit_call_body.
2416         (mono_arch_emit_exceptions): Ditto.
2417
2418 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2419
2420         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2421         MONO_TYPE_ISSTRUCT already checks for it.
2422
2423 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2424
2425         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2426           structs with floats on Winx64 the float registers are not used.  
2427           The integer registers are always used..
2428         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2429           only one register will be used and only if the size of the struct 
2430           is 1,2,4, or 8 bytes.
2431
2432         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2433           to work for Winx64.
2434
2435         Contributed under MIT/X11 license.
2436
2437 2008-06-05  Martin Baulig  <martin@ximian.com>
2438
2439         * debug-debugger.c (debugger_lookup_class): Also call
2440         mono_class_setup_methods() here; we're only called from RTI.
2441
2442 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2443
2444         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2445         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2446         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2447         Post-process object files and add dtrace-generated object, if necessary.
2448
2449         Contributed under MIT/X11 license.
2450
2451 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2452
2453         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2454         element class.
2455
2456         * mini.c: Generic sharing for unbox.any and castclass.
2457
2458 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2459
2460         * mini.c: Ignore tailcall prefix in shared generic code and when
2461         doing calls which require a vtable/rgctx argument.
2462
2463 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2464
2465         * mini.c: Don't free the JIT info.
2466
2467         * driver.c: Changes in the JIT info table testing code.
2468
2469 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2470
2471         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2472         interruption. Fix some warnings.
2473
2474         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2475         interruption_checkpoint.
2476
2477 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2478
2479         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2480         from embedding applications.
2481
2482 2008-06-02  William Holmes  <billholmes54@gmail.com>
2483
2484         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2485           reserving 32 bytes on the stack when making calls. 
2486
2487         Contributed under MIT/X11 license.
2488
2489 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2490
2491         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2492         the linear IL branch.
2493
2494         * driver.c: Print out more information for --version on arm.
2495
2496 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2499         bb_exit instead, since out of line bblocks might not actually be emitted
2500         out-of-line.
2501         
2502         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2503         maximum epilog size for out of line bblocks if tracing is enabled.
2504
2505         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2506
2507 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2508
2509         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2510
2511 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2512
2513         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2514         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2515         opcodes.
2516
2517 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2520         the 'value' to store is a constant.
2521
2522         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2523
2524         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2525         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2526
2527 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2530         for accessing method->generic_container.
2531
2532 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2535         
2536         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2537
2538         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2539
2540         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2541         fails.
2542
2543 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2544
2545         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2546
2547         * mini.c: Handle the case when mono_class_vtable () fails.
2548
2549 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2550         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2551         the stat profiler.
2552
2553 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2554
2555         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2556         together with domain sharing.
2557
2558 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2559
2560         * mini.c: Treat callvirts to final methods like non-virtual calls
2561         when doing generic sharing, i.e. look them up in the runtime
2562         generic context.
2563
2564 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2565
2566         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2567         with computed types (for generic sharing).
2568
2569         * mini.c: Generic sharing for mkrefany and refanyval.
2570
2571 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2572
2573         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2574         possible.
2575
2576         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2577         the generic sharing code.
2578         
2579         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2580         when needed.
2581
2582 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2583
2584         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2585
2586 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2587
2588         * driver.c: updated copyright date
2589
2590 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2591
2592         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2593         needed.
2594
2595 2008-05-19  Martin Baulig  <martin@ximian.com>
2596
2597         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2598         pointing to the new `_mono_debug_using_mono_debugger' variable.
2599
2600         * driver.c
2601         (mono_main): Check mono_debug_using_mono_debugger() rather than
2602         the `MONO_INSIDE_MDB' environment variable to check whether we're
2603         inside the debugger.
2604
2605 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2606
2607         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2608         argument.
2609
2610 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2611
2612         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2613
2614         * mini.c: Added mini_assembly_can_skip_verification. This
2615         function checks if the assembly requested to skip verification. 
2616         Fixes part of #387274.
2617
2618 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2619
2620         * mini.c (mini_get_method): Disable the check for open generic classes when
2621         using generic sharing.
2622
2623         * generics.cs: Add a test #387034.
2624
2625         * mini.c (mini_get_method): Check whenever the method class is an open generic
2626         type, and return NULL in that case, causing a verification error. Fixes
2627         #384123.
2628
2629 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2630
2631         * driver.c (mono_main): Revert r102623. The right
2632         thing to do is to enable the verifier under verifiable
2633         unless a --security flag was passed.
2634
2635         We need this non-trivial behavior for --verify-all otherwise
2636         mcs-compileall won't be able to use it. As it needs everything to
2637         be verified under validil.
2638
2639 2008-05-06  Martin Baulig  <martin@ximian.com>
2640
2641         Fix #383749.
2642
2643         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2644         (mono_debugger_thread_cleanup): Likewise.
2645         (mono_debugger_extended_notification): Likewise.
2646
2647 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2648
2649         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2650         against both inflated and non-inflated methods. We need to check against the
2651         generic definition for cases where the instantiated method is not visible.
2652         We need to check against the inflated types for cases where the instantiation
2653         changes any super type. This fixes #382986.
2654
2655         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2656         that check for visibiliy as generic params only appears as the type subject
2657         of tokens on call opcodes. Field manipulation and ldftn must always
2658         target an exact type.
2659
2660 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2661
2662         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2663         if no related --security flag is passed.
2664
2665 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2666
2667         * mini-arch.h: Prepare support for ppc64.
2668
2669         Contributed under MIT/X11 license.
2670
2671 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2672
2673         * aot-runtime.c: Prepare support for ppc64.
2674
2675         Contributed under MIT/X11 license.
2676
2677 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2678
2679         * mini-ops.h: Prepare support for ppc64.
2680
2681         Contributed under MIT/X11 license.
2682
2683 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2684
2685         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2686
2687         Contributed under MIT/X11 license.
2688
2689 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2690
2691         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2692         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2693         assemblies on windows.
2694
2695 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2696
2697         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2698         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2699         * main.c: Use UTF-8 encoded command line instead of Windows default code
2700         page on Windows to support Unicode.
2701         * driver.c (DllMain): New function for mixed-mode assembly support.
2702         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2703         export __stdcall functions without decoration.
2704
2705         Contributed under MIT/X11 license.
2706
2707 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2708
2709         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2710         saving it very early.
2711
2712 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2713
2714         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2715         deleted.  The only way to access the new RGCTX is via the
2716         trampline.
2717
2718         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2719         vtable instead of the RGCTX to static methods.
2720
2721         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2722         accessing the new RGCTX.
2723
2724         * generic-sharing.c: There is no separation between self, type
2725         arguments and other types in the RGCTX anymore.
2726
2727 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2728
2729         * mini-amd64.c (add_general): Remove previous stack adjustment.
2730         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2731         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2732         for 32 bytes of stack space reserved for all calls.
2733         
2734         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2735         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2736         adjustment.
2737         
2738         Code contributed under MIT/X11 license.
2739
2740 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2741
2742         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2743         against the root definition, peeling out method and type instantiations.
2744         Cache verify success results, code that fails verification is still
2745         checked multiple times.
2746
2747 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2748
2749         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2750
2751 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2752
2753         * mini-amd64.c (add_general): Always increment stack on Win64.
2754         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2755         on Win64.
2756         
2757         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2758         stack based argument handling on Win64.
2759         
2760         Code contributed under MIT/X11 license.
2761
2762 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2763
2764         * Makefile.am (version.h): Add support for git-svn.
2765
2766 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2767
2768         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2769         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2770         avoiding allocations and libc functions which might deadlock.
2771         
2772         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2773         'no-gdb-backtrace' option is set.
2774
2775         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2776
2777         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2778
2779 2008-04-21  Martin Baulig  <martin@ximian.com>
2780
2781         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2782         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2783
2784 2008-04-21  Martin Baulig  <martin@ximian.com>
2785
2786         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2787         `thread_vtable', `event_handler_ptr' and `event_handler'.
2788
2789 2008-04-21  Martin Baulig  <martin@ximian.com>
2790
2791         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2792         allows delayed initialization of the `executable_code_buffer' when
2793         attaching.
2794
2795 2008-04-21  Martin Baulig  <martin@ximian.com>
2796
2797         * mini.h (mono_debugger_create_notification_function): Removed.
2798         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2799
2800         * mdb-debug-info64.s
2801         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2802
2803         * mdb-debug-info32.s
2804         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2805
2806         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2807         currently only works on x86 and x86_64, so don't create it on ppc.
2808
2809 2008-04-21  Martin Baulig  <martin@ximian.com>
2810
2811         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2812
2813         * mini.c
2814         (mini_method_compile): In the fp elimination check, check
2815         `debug_options.mdb_optimizations' in addition to
2816         mono_debug_using_mono_debugger().       
2817
2818         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2819         disable some JIT optimizations which are only disabled when
2820         running inside the debugger.
2821         Added `--help-debug' option to describe the debugging options.
2822         (parse_debug_options): New static function to parse the `--debug'
2823         options, so we can easily add more stuff in future.
2824
2825 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2828         the method has no body.
2829
2830 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2831
2832         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2833         assembly is not allowed in MSVC 64-bit compiler. 
2834         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2835         as we get floating point exceptions everywhere.
2836         
2837         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2838         correctly align arguments for call to throw_exception.
2839         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2840         
2841         Code contributed under MIT/X11 license.
2842
2843 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2844
2845         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2846
2847 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2848
2849         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2850
2851         * mini-amd64.c (NEW_INS): Set cil_code.
2852
2853         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2854         from mini-amd64.c so all debugger related logic is in one place.
2855
2856         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2857         later won't have a random ip assigned to them.
2858
2859 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2860
2861         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2862         the arch specific function initializes code_size.
2863         (mono_create_delegate_trampoline): Ditto.
2864
2865         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2866         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2867         platforms.
2868
2869         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2870         running under the debugger.
2871
2872         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2873         debugger.
2874
2875         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2876         debugger. Also move the disabling of optimizations here from driver.c.
2877         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2878         debugger.
2879
2880         * mini.h (MonoCompile): Add a few new flags.
2881
2882 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2883
2884         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2885         so the cil_code field of created MonoInst's is properly set.
2886         (mini_select_instructions): Ditto.
2887
2888         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2889         (MONO_INST_NEW_CALL): Ditto.
2890
2891         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2892         in many places so the ins->cil_code field is properly initialized.
2893
2894         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2895         place.
2896
2897 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * mini.c (mini_method_compile): Print a different message when compiling a 
2900         shared method.
2901         
2902         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2903         > 1.
2904
2905 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2908         SSE2 instructions.
2909
2910         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2911         
2912 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2913
2914         * mini.c (handle_stack_args): Make this return void since its return value was
2915         never used. Also set cfg->unverifiable for invalid IL instead of calling
2916         G_BREAKPOINT ().
2917
2918 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2919
2920         * mini.c: Make sure "this" is live in catch clauses with type
2921         variables in shared generic code.
2922
2923 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2924
2925         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2926         generic_class_is_reference_type() to ensure the proper behaviour
2927         when sharing generic code and the type in question is a type
2928         argument.
2929
2930 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2933         race conditions when printing thread dumps. Fixes #377738.
2934
2935 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2936         
2937         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2938         shows up when both MonoInst arguments can cause aliasig.
2939         There is likely no way in the current JIT to trigger this problem, but
2940         it showed up in the development of generics sharing, when in a new
2941         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2942         When the generics sharing code will be committed, its tests will be
2943         valid also for this bug.
2944
2945 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2948         PATCH_INFO_METHOD.
2949
2950         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2951         NULL.
2952
2953 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2954
2955         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2956         use a more detailed exception message for InvalidCastException.
2957
2958         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2959
2960         * driver.c (mono_main): Add --debug=casts option to turn on better 
2961         InvalidCastException message details.
2962
2963         * mini.c (mini_get_debug_options): New helper function to return the address of
2964         the debug_options variable.
2965
2966         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2967         the jit_tls TLS variable.
2968
2969         * mini.c (mono_jit_tls): New TLS variable.
2970
2971         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2972         option is used.
2973
2974 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2975
2976         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2977
2978         * mini.c: Removed verifer related stuff, code moved to verify.c.
2979
2980         * driver.c: Using code from verify.c instead of mini.c.
2981
2982 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2983
2984         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2985         longer valid.
2986
2987 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2988
2989         * mini.c (check_for_method_verify): Enabling verification of
2990         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2991         have been fixed.
2992
2993 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2994
2995         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2996         caller saved registers as well.
2997         
2998         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2999         saved registers as well.
3000
3001 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3002
3003         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3004
3005         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3006         code.
3007
3008 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3009
3010         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3011         to get_call_info.
3012         (get_call_info): Take a gsctx argument instead of 'cfg'.
3013
3014 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3017         mono_verify_all is set.
3018
3019         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3020
3021         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3022
3023 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3024
3025         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3026         an exception.
3027
3028         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3029         verifier and the code generated by the compiler.
3030
3031 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3032
3033         * mini.c: Generic sharing of the non-nullable case of the box
3034         instruction.
3035
3036 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3037
3038         * inssel.brg: Fix the build.
3039
3040         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3041
3042 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3043
3044         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3045         Array:Address. Fixes #372410.
3046
3047         * iltests.il.in: New tests for readonly prefix.
3048
3049 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3050
3051         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3052         mini-trampolines.c.
3053
3054         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3055         mini-exceptions.c.
3056
3057         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3058         
3059         * mini.c (mono_decompose_op_imm): New helper function.
3060
3061         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3062         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3063         return value.
3064
3065         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3066         mono_arch_output_basic_block. Fix warnings.
3067
3068         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3069         for now.
3070
3071 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3072
3073         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3074         since the extra frame is now detected automatically inside the loop.
3075
3076         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3077         opts which are now in mono_peephole_ins ().
3078         
3079         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3080
3081         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3082         frames and skip duplicate managed-to-native frames. Fixes #367665.
3083
3084         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3085         opts which are now in mono_peephole_ins ().
3086         (mono_arch_peephole_pass_2): Ditto.
3087
3088         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3089
3090         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3091         arch independent peephole optimizations.
3092
3093         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3094         opts which are now in mono_peephole_ins ().
3095
3096         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3097         
3098         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3099
3100         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3101         pattern.
3102
3103         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3104         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3105         opcode. 
3106
3107 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3110         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3111         return value.
3112
3113         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3114         mono_arch_output_basic_block. Fix warnings.
3115
3116 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3117
3118         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3119         conv.ovf.u.un.
3120
3121 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3122
3123         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3124         conv.ovf.u.un.
3125
3126         * iltests.il: Add new tests.
3127
3128 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3129
3130         * mini.c: Removed Windows version macros.
3131
3132 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3133
3134         * generic-sharing.c: Put reflection types in the extensible part
3135         of the runtime generic context.
3136
3137         * mini.c: Generic sharing of the GetTypeHandle special case of the
3138         ldtoken instruction.
3139
3140 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3141
3142         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3143
3144         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3145         
3146         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3147         consistency with the other version on the linear IR branch.
3148
3149         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3150
3151         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3152
3153         * iltests.il.in: Add new tests.
3154
3155 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3156
3157         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3158
3159         * iltests.il.in: Add new tests.
3160
3161 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3162
3163         * mini.c: Two variables with the same name were declared in
3164         nesting contexts and one wasn't initialized.  Fixed.
3165
3166 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3167
3168         * mini.c: Generic sharing of the initobj instruction.
3169
3170 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3171
3172         * mini.c: make the test to optimize ldtoken from typeof() more
3173         precise.
3174
3175 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3176
3177         * mini.c: Generic sharing of the initobj instruction for reference
3178         types.
3179
3180 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3181
3182         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3183         the mono_breakpoint_clean_code() code to perform bound checks.
3184
3185 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3186
3187         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3188         mono_arch_patch_callsite() to include the start of the managed method
3189         to be able to perform bound checks.
3190
3191 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3192
3193         * mini.c: Generic sharing for the isinst instruction.
3194
3195 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3196
3197         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3198         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3199         with the runtime generic context argument.
3200
3201         * mini.c: Share calls to several types of unsharable methods by
3202         putting the address of the method code in the runtime generic
3203         context and doing an indirect call.
3204
3205         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3206         to switches.
3207
3208 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3209
3210         * generic-sharing.c: Change due to a change in the runtime genric
3211         context API.
3212
3213 2008-03-15  Martin Baulig  <martin@ximian.com>
3214
3215         * tramp-x86.c
3216         (mono_arch_nullify_class_init_trampoline): Add call to
3217         mono_breakpoint_clean_code() to make things work when running
3218         inside the debugger.
3219
3220         * tramp-amd64.c
3221         (mono_arch_nullify_class_init_trampoline): Add call to
3222         mono_breakpoint_clean_code() to make things work when running
3223         inside the debugger.
3224
3225 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3226
3227         * inssel-long.brg (reg): Fix 64 bit build.
3228
3229 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3230
3231         * mini.c, mini.h: Share static generic code by passing it an
3232         implicit argument pointing to the runtime generic context.
3233
3234         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3235         inssel-long32-mips.brg: New opcodes for calling shared static,
3236         which need to be passed the runtime generic context.
3237
3238         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3239         argument on the stack in the prologue if needed.  New function for
3240         finding the runtime generic context argument from the registers
3241         saved by the trampoline.
3242
3243         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3244         runtime generic context argument.
3245
3246         * tramp-amd64.c: Also restore the register used for the runtime
3247         generic context argument.
3248
3249         * mini-trampoline.c: Resolve shared static calls by consulting the
3250         runtime generic context via the new argument.
3251
3252         * generic-sharing.c: Add an argument to sharability-checking
3253         functions that specifies whether type variables should be treated
3254         as sharable type arguments.
3255
3256         * inssel-x86.brg: Removed a superfluous, buggy rule.
3257
3258         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3259         to switches.
3260
3261 2008-03-14  Martin Baulig  <martin@ximian.com>
3262
3263         * debug-debugger.c (main_thread_handler): Call
3264         mono_runtime_run_main() without sending any notifications.
3265
3266         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3267
3268 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3269
3270         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3271
3272 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3273
3274         * tramp-x86.c: Fixed register restore offsets in the trampoline
3275         code for ECX and EDX.
3276
3277 2008-03-12  Geoff Norton  <gnorton@novell.com>
3278
3279         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3280         different ucontext_t implementations.
3281         * exceptions-arm.c: Use the above defines to get exceptions working on 
3282         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3283         * mini-arm.c: Implement iPhone icache support (based on a patch by
3284         Luke Howard lukeh@padl.com)
3285
3286 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3287
3288         * mini.c: Enable generic sharing of calls to non-static
3289         non-interface non-generic non-value-type methods.
3290
3291         * mini-trampolines.c: Resolve calls from shared generic code.
3292
3293 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3294
3295         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3296
3297         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3298
3299 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3300
3301         * mini.c: some fixes for the AOT compiler.
3302
3303 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3304
3305         * cpu-amd64.md: Add clob:1 to some float opcodes.
3306
3307 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3308
3309         * mini.h: Added MiniVerifierMode enumeration.
3310
3311         * mini.c: Added mini_verifier_set_mode to control
3312         the usage of the new verifier.
3313
3314         * mini.c (mono_method): Integrated the new verifier.
3315
3316         * driver.c: Extended --security option with validil and
3317         verifiable options to activate the new verifier.
3318
3319 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3320
3321         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3322         optimization to ctors taking 0 or 2 arguments too.
3323
3324         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3325         a bit.
3326
3327         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3328
3329         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3330
3331 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3334         non-aot case as well.
3335
3336         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3337
3338         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3339         changes.
3340
3341         * aot-compiler.c (encode_patch): Ditto.
3342
3343         * mini.h (G_MININT32): Fix the definition of this.
3344
3345 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3346
3347         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3348
3349         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3350
3351 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3352
3353         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3354         methods returning vtypes in registers.
3355         (mono_arch_allocate_vars): Ditto.
3356
3357         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3358
3359         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3360
3361         * generics.cs: Add a test from the linear IR branch.
3362
3363         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3364
3365         * mini.c (inline_method): Cache failed inline attempts.
3366
3367 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3368
3369         * mini.c: For shared methods of generic classes put the location
3370         of "this" into the MonoGenericJitInfo.
3371
3372         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3373         register out of a MonoContext by register number.  Add the generic
3374         sharing context as an argument to mono_arch_find_this_argument().
3375
3376         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3377         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3378         for new arch function.
3379
3380         * mini-exception.c: Handle open exception clauses in shared
3381         generic code.
3382
3383         * mini-trampolines.c: Supply additional argument to
3384         mono_arch_find_this_argument().
3385
3386 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * Makefile.am (regtests): Run the bench.exe tests last.
3389
3390 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3393         a bit.
3394
3395 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3398         with MS.
3399
3400         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3401         
3402         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3403
3404         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3405         whose class has no cctor.
3406
3407         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3408
3409 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3410
3411         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3412         unverified.
3413
3414 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3415
3416         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3417         to be in sync with the code on the linear IR branch.
3418
3419         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3420
3421         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3422
3423 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3424
3425         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3426
3427         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3428
3429         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3430
3431         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3432
3433         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3434         
3435         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3436         body.
3437
3438 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3439
3440         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3441         OP_LOADR4_MEMBASE emission.
3442
3443         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3444         (mono_spillvar_offset_float): Ditto.
3445
3446         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3447
3448         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3449         emission.
3450
3451         * basic-long.cs: Add regression tests for them.
3452
3453         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3454         use.
3455         (mono_arch_allocate_vars): Fix representation of single-precision float
3456         argument.
3457         (mono_arch_output_basic_block): Ditto.
3458
3459         * inssel-mips.brg: Ditto, remove duplicate items.
3460
3461         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3462         arguments of tail calls as on other platforms.
3463         (mono_arch_output_basic_block): Handle tail calls.
3464
3465         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3466         register.
3467
3468         * objects.cs (test_5_pass_static_struct): Add test for it.
3469
3470         Contributed under MIT/X11 license.
3471
3472 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * Makefile.am: Use gmcs for compiling the regression tests.
3475
3476         * *.2.cs *.2.il: Rename to *.cs and *.il.
3477
3478 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * regalloc.h: Make the vassign array smaller.
3481
3482         * mini.c (mini_method_compile): Remove an unused field in cfg.
3483
3484         * mini-codegen.c: Add a bunch of micro optimizations.
3485
3486 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3487
3488         * regalloc.h: Remove some unused fields.
3489
3490 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3493
3494         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3495
3496 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3497
3498         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3499
3500         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3501         trampoline: Fetch an entry from the runtime generic context.  If
3502         it's NULL, jump to the actual trampoline to fill the runtime
3503         generic context.  Otherwise, return it.
3504
3505         * mini.c: Call the lazy fetch trampoline to get entries out of the
3506         runtime generic context.
3507
3508         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3509         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3510         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3511
3512 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3513
3514         * mini.c: Fetch data out of the extensible part of the runtime
3515         generic context instead of calling a helper function.
3516
3517         * generic-sharing.c: Some functions moved into
3518         metadata/generic-sharing.c.  Helper function for fetching other
3519         types now checks and asserts against extensible rgctx (just for
3520         debugging purposes - the helper function isn't called anymore
3521         unless for debugging).
3522
3523 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3524
3525         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3526         for tail calls up to the point that the tests in iltests.exe run. Also add a
3527         dummy CKFINITE implementation.
3528         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3529         needed for trampoline LMF frames.
3530
3531         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3532         trampoline LMF frames.
3533
3534 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3535
3536         * mini.c (inline_method): clean any pending loader error when inlining fail.
3537         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3538
3539 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3540
3541         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3542
3543         * aot-runtime.c (decode_patch_info): Ditto.
3544
3545         * mini.c (mono_resolve_patch_target): Ditto.
3546         
3547         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3548         icall wrappers.
3549
3550         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3551         
3552         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3553         if it references an icall address.
3554
3555 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3556
3557         * cpu-s390x.md: Remove some more unused opcodes.
3558         
3559         * cpu-s390x.md: Remove some unused opcodes.
3560
3561         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3562         mono_op_imm_to_op ().
3563
3564         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3565         instead of a switch statement.
3566         
3567         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3568         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3569
3570         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3571         
3572         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3573
3574         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3575         -1.
3576
3577 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3580         opened. Fixes #362607.
3581
3582         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3583
3584         * iltests.il.in: Add a test for static methods in interfaces.
3585
3586 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3587
3588         * genmdesc.c (build_table): Fix a crash on older glib versions.
3589
3590         * cpu-sparc.md: Remove some unused opcodes.
3591         
3592         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3593         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3594
3595         * cpu-amd64.md: Remove some unused opcodes.
3596
3597         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3598         like the other opcodes.
3599
3600 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3601
3602         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3603
3604         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3605
3606         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3607         variables 'cfg' instead of 'm' for consistency.
3608
3609         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3610
3611         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3612         argument holding the vtype return address, to avoid the ambigious use of
3613         cfg->ret for this purpose.
3614
3615         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3616
3617         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3618         
3619         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3620         new mono_print_ins () function which only takes one argument.
3621
3622 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3623
3624         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3625         macro arguments.
3626
3627 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3628
3629         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3630
3631         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3632
3633         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3634         opcodes and other small changes.
3635
3636         * mini-ops.h: Add some new opcodes from the linear IR branch.
3637
3638         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3639
3640         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3641         opcodes, use the REG_MEMBASE opcodes instead.
3642         
3643         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3644         opcodes, use the REG_MEMBASE opcodes instead.
3645         
3646         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3647         linear IR branch.
3648
3649         * mini.c (mono_op_imm_to_op): New helper function.
3650
3651         * mini-ops.h: Add some opcodes from linear IR branch.
3652
3653 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3654
3655         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3656         <tsv@solvo.ru>.
3657
3658 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3659
3660         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3661         OP_ICONV_TO_R4/R8.
3662
3663         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3664
3665 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3666
3667         * aot-compiler.c (emit_method_code): Add an assert.
3668
3669         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3670         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3671         methods.
3672
3673 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3676         some load/store opcodes so they are consistent. 
3677         (mono_arch_emit_prolog): Simplify some code.
3678
3679         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3680
3681         * objects.cs: Add tests for large argument offsets on ARM.
3682
3683         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3684         stack offsets. Fixes #359651.
3685
3686         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3687
3688         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3689
3690         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3691
3692         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3693
3694         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3695
3696         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3697         rid of CEE_CONV_R_UN.
3698
3699         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3700
3701 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3702
3703         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3704
3705         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3706
3707         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3708
3709         * cpu-amd64.md: Remove some unused opcodes.
3710
3711         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3712
3713         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3714
3715         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3716         arch specific functions for its parts. Call the peephole pass after local
3717         regalloc so the prolog can compute a more accurate max_offset.
3718         
3719         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3720         the corresponding OP_I/OP_L opcodes.
3721
3722         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3723
3724         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3725
3726 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3729         as they are handled in mini.c.
3730
3731         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3732         
3733         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3734         case since it is handled in mini.c.
3735
3736         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3737
3738         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3739
3740         * *.c: Use the new opcodes in the IR and back end code.
3741
3742         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3743
3744         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3745
3746 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3747
3748         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3749         an assert because it has a race condition.
3750
3751 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3752
3753         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3754
3755         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3756
3757         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3758
3759         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3760         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3761
3762 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3763
3764         * cpu-amd64.md (move): Correct the maximum size of move.
3765
3766 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3767
3768         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3769         the generic class init trampoline to return quickly if the class
3770         is already inited.
3771
3772 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3773
3774         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3775         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3776
3777 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3778
3779         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3780         branch.
3781
3782 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3783
3784         * objects.cs: Add some soft-float tests.
3785
3786         * mini.c: Fix a couple more soft-float issues.
3787
3788         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3789
3790         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3791         avoid a REX prefix.
3792
3793 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3794
3795         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3796         exception happens while compiling a virtual method.
3797
3798 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3799
3800         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3801         
3802         * mini-sparc.c: Fix build.
3803
3804         * mini-sparc.c (get_call_info): Add support for generic sharing.
3805
3806         * mini-exceptions.c: Add a FIXME.
3807
3808 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3809
3810         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3811         altstack handling code.
3812
3813         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3814         
3815         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3816
3817         * mini-s390.c: Add support for generic sharing.
3818
3819         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3820         Fix CAS on s390.
3821         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3822
3823         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3824
3825         * mini-s390x.c: Add support for generic sharing.
3826         
3827         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3828         Fix CAS on ia64.
3829         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3830
3831         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3832         can be used since it takes a 16 bit signed immediate.
3833
3834         * inssel-s390x.brg: Fix OP_SETRET.
3835
3836         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3837
3838         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3839
3840         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3841
3842         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3843
3844         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3845         in one place.
3846
3847         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3848         stuff.
3849
3850         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3851         of the unused mono_arch_patch_delegate_trampoline stuff.
3852
3853 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3854
3855         * basic-long.cs: Move the fp related tests to basic-float.cs.
3856
3857         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3858
3859         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3860
3861         * basic-calls.cs: Add a test for proper float argument passing.
3862
3863         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3864         if the context corresponds to an exception received through a signal.
3865
3866         * exceptions.cs: Add a test for nullref handling at the start of a try
3867         clause.
3868
3869         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3870
3871         * jit-icalls.c (mono_break): New JIT icall.
3872
3873         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3874
3875         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3876
3877 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3878
3879         * cpu-*.md: Get rid of unused opcodes.
3880
3881         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3882
3883         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3884         by all platforms.
3885
3886         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3887         define.
3888
3889         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3890         the arch independent trampoline code in mini-trampolines.c.
3891
3892         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3893
3894         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3895
3896         * mini-s390.h: Remove an unused define.
3897         
3898         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3899         the arch independent trampoline code in mini-trampolines.c.
3900
3901         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3902
3903 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3906
3907         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3908
3909         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3910
3911         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3912
3913         * cpu-amd64.md: Use smaller sizes for int opcodes.
3914
3915         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3916
3917         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3918         objects.cs.
3919
3920         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3921         debugging.
3922
3923         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3924         instead of though a pointer to save an indirection when accessing elements of
3925         the array.
3926
3927         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3928         some typos.
3929         (NOT_IMPLEMENTED): New helper macro.
3930         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3931         of a bb.
3932
3933         * *.c: Use the new helper macro.
3934
3935 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3936
3937         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3938
3939 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3940
3941         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3942         stack slots.
3943
3944 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3945
3946         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3947         profiling is enabled.
3948         
3949         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3950         the end.
3951         (mono_arch_emit_prolog): Add more first bblock optimizations.
3952
3953         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3954         in order if possible.
3955         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3956         bblock, since the arguments are still in their original registers.
3957
3958         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3959
3960 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3961
3962         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3963         as well.
3964
3965         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3966         offset 0.
3967
3968         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3969
3970         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3971         process async exceptions received while in unmanaged code.
3972
3973         * mini.c (mini_init): Install a callback with the runtime which will be called
3974         when a thread receives an async exception while in unmanaged code.
3975
3976         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3977
3978         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3979
3980 2008-01-16  Wade Berrier  <wberrier@novell.com>
3981
3982         * cpu-g4.md:
3983         * cpu-arm.md:
3984         * cpu-s390x.md:
3985         fix build
3986
3987 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3988
3989         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3990         compilation with sun cc.
3991
3992         * cpu-*.md: Fix the build.
3993
3994         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3995
3996         * mini-amd64.h: Add some comments to the MonoLMF structure.
3997
3998         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3999         
4000         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4001         in the LMF structure if possible. This saves two instructions in the
4002         managed->native wrappers.
4003
4004         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4005
4006 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4007
4008         * generic-sharing.c: New type argument lookup code which uses the
4009         runtime generic context template.
4010
4011 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4012
4013         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4014
4015         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4016         (mono_arch_output_basic_block): Fix localloc implementation.
4017
4018         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4019
4020         * mini-ia64.c (peephole_pass): Fix ia64 build.
4021
4022         * mini-amd64.c (peephole_pass): Fix a warning.
4023         
4024         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4025         at a constant offset from sp/fp.
4026
4027         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4028         instead of obtaining it from *lmf in the managed method case.
4029
4030 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4031
4032         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4033
4034 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4035
4036         * mini.h (MonoInstList): New type.
4037         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4038         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4039         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4040         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4041         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4042         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4043         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4044         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4045         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4046         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4047         MONO_INST_LIST_FOR_EACH_ENTRY,
4048         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4049         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4050         mono_inst_list_first, mono_inst_list_last,
4051         mono_inst_list_next, mono_inst_list_prev): New instruction
4052         list handling interfaces.
4053         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4054         list head 'ins_list'.
4055         (MonoInst): Replace next pointer with list head 'node'.
4056         (MonoCallInst): Make 'out_args' a MonoInstList.
4057         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4058         (MonoCompile): Delete reverse_inst_list and
4059         reverse_inst_list_len.
4060         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4061         mono_arch_lowering_pass, mono_arch_local_regalloc,
4062         mono_arch_output_basic_block, mono_arch_emit_prolog):
4063         Convert to new instruction lists.
4064         (insert_after_ins): Delete.
4065         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4066         instruction lists.
4067         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4068         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4069         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4070         mono_emulate_opcode, mono_emit_load_got_addr,
4071         inline_method, mono_method_to_ir, mono_print_bb_code,
4072         print_dfn, decompose_pass, nullify_basic_block,
4073         replace_out_block_in_code, remove_block_if_useless,
4074         merge_basic_blocks, move_basic_block_to_end,
4075         try_unsigned_compare, optimize_branches, mono_print_code,
4076         mini_select_instructions, remove_critical_edges): Likewise.
4077         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4078         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4079         mono_arch_output_basic_block, mono_arch_emit_prolog):
4080         Likewise.
4081         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4082         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4083         mono_arch_output_basic_block): Likewise.
4084         (inst_list_prepend, insert_after_ins): Delete.
4085         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4086         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4087         instruction lists.
4088         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4089         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4090         mono_arch_emit_prolog): Likewise.
4091         * cfold.c (mono_constant_fold): Likewise.
4092         * liveness.c (visit_bb, mono_analyze_liveness,
4093         optimize_initlocals): Likewise.
4094         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4095         * graph.c (mono_draw_code_cfg): Likewise.
4096         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4097         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4098         mono_ssa_cprop): Likewise.
4099         * abcremoval (get_relations_from_previous_bb, process_block):
4100         Likewise.
4101         * local-propagation (mono_cprop_invalidate_values,
4102         mono_local_cprop_bb): Likewise.
4103         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4104         peephole_pass, mono_arch_output_basic_block,
4105         mono_arch_emit_prolog): Likewise.
4106         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4107         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4108         mono_arch_emit_prolog): Likewise.
4109         (insert_after_ins): Delete.
4110         * aliasing.c (print_code_with_aliasing_information,
4111         mono_build_aliasing_information, mono_aliasing_deadce):
4112         Convert to new instruction lists.
4113         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4114         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4115         mono_arch_local_regalloc, mono_arch_output_basic_block):
4116         Likewise.
4117         (insert_after_ins): Delete.
4118         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4119         peephole_pass, mono_arch_output_basic_block): Convert to
4120         new instruction lists.
4121         * mini-codegen (InstList, inst_list_prepend,
4122         insert_after_ins): Delete.
4123         (insert_before_ins, get_register_force_spilling,
4124         get_register_spilling, free_up_ireg, free_up_reg,
4125         create_copy_ins, create_spilled_store, alloc_int_reg,
4126         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4127         to new instruction lists.
4128         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4129         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4130         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4131         (insert_after_ins): Delete.
4132         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4133         mono_arch_local_regalloc, mono_arch_output_basic_block,
4134         mono_arch_call_opcode): Convert to new instruction lists.
4135         (insert_after_ins): Delete.
4136         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4137         peephole_pass, mono_arch_output_basic_block,
4138         mono_arch_emit_prolog): Convert to new instruction lists.
4139
4140 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4141
4142         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4143
4144         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4145         Fixes #353182.
4146
4147         * Makefile.am (version.h): Make this work with non-bash shells.
4148
4149 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4150
4151         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4152
4153 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4154
4155         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4156         the InitializeArray optimization.
4157
4158 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4159
4160         * mini.c driver.c: Don't include os/gc_wrapper.h.
4161
4162 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4163
4164         * mini.c (print_jit_stats): Print GC statistics if available.
4165
4166 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4167
4168         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4169
4170 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4171
4172         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4173
4174 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4175
4176         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4177         
4178         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4179
4180         * driver.c (mono_main): Ditto.
4181
4182 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4183
4184         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4185
4186         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4187         in the vtable can't be encoded.
4188         (compile_method): Ditto.
4189
4190 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4191
4192         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4193         defined.
4194
4195         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4196         lmf->rbp.
4197
4198         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4199         the top LMF entry belongs to the current method.
4200
4201         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4202
4203 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4204
4205         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4206         
4207         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4208
4209         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4210
4211         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4212
4213         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4214
4215         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4216         implementation.
4217
4218         * basic-float.cs: Add an ulong->double cast test.
4219
4220 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4221
4222         * mini.c (mono_method_to_ir): Fix a warning.
4223
4224 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4225
4226         * mini-ops.h: Add OP_SWITCH.
4227
4228         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4229         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4230
4231 2007-12-11  Geoff Norton  <gnorton@novell.com>
4232
4233         * mini-s390x.c: Minor change to the MAX() define to allow
4234         it to compile with other gcc versions.
4235
4236 2007-12-11  Geoff Norton  <gnorton@novell.com>
4237
4238         * cpu-s390x.md:
4239         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4240
4241 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4242
4243         exceptions-arm.c (mono_arch_get_restore_context): Restore
4244         the frame pointer.
4245
4246         exceptions-arm.c (throw_exception): Save the frame pointer.
4247         This is a partial fix for #323747. Only the client side is
4248         fixed.
4249
4250 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4251
4252         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4253         was using an unrelated variable to log the class which
4254         needed the cctor to be called. This was crashing on arm.
4255
4256 2007-12-09  Robert Jordan  <robertj@gmx.net>
4257
4258         * mini-x86.c (mono_arch_emit_epilog):
4259         Consider all kinds of 64-bit types. Fixes #323114.
4260
4261 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4262
4263         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4264
4265 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4266
4267         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4268
4269 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4270
4271         * mini.c: run type ctor before allocating an object, not only
4272         when running it's constructor method (fixes at least part of bug #342507).
4273
4274 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4275         
4276         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4277         
4278         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4279         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4280         function.
4281
4282         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4283         mono_generic_class_init_trampoline () the same as it is done with the other
4284         trampolines.
4285
4286         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4287         aot-runtime.c aot-compiler.c: Implement AOT support.    
4288
4289 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4290
4291         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4292         build for archs which don't have the vtable trampoline defined
4293         yet.
4294
4295 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4296
4297         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4298
4299         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4300
4301         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4302
4303         * tramp-<ARCH>.c: Use the new helper function.
4304
4305 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4306
4307         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4308         trampoline call, which takes a vtable argument.
4309
4310         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4311         OP_TRAMPCALL_VTABLEs like other calls.
4312
4313         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4314         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4315         call.  Implemented a support function which fetches the vtable
4316         from a register set.
4317
4318         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4319         Implemented a generic class init trampoline, using the
4320         OP_TRAMPCALL_VTABLE opcode.
4321
4322         * mini.c: Implemented static field access when sharing generic
4323         code.  This implies initing the class using the new
4324         OP_TRAMPCALL_VTABLE call.
4325
4326 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4327
4328         * mini.c: Don't compile methods with sharing enabled if their
4329         classes are disabled for sharing.
4330
4331 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4332
4333         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4334         opcodes. Fixes #346563.
4335
4336         * objects.cs: Add a new test.
4337
4338         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4339
4340         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4341         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4342
4343 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4344
4345         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4346
4347 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4348
4349         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4350         code stream.
4351
4352 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4353
4354         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4355
4356         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4357         optimization in the AOT case.
4358         
4359 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4362         
4363         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4364
4365         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4366
4367         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4368
4369         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4370         is created by the inlined delegate ctor.
4371
4372         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4373
4374         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4375
4376 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4377
4378         * cpu-x86.md: Fix the length of ckfinite.
4379
4380 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4383         
4384         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4385         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4386
4387         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4388
4389         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4390         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4391
4392 2007-11-28  Martin Baulig  <martin@ximian.com>
4393
4394         * mini-x86.c
4395         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4396         after creating the trampoline.
4397
4398 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4399
4400         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4401
4402         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4403         the same version.
4404
4405         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4406         instead of the calling method to help AOT.
4407
4408         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4409
4410 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4411
4412         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4413         is defined.
4414
4415 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4416
4417         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4418         
4419         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4420         (encode_method_ref): No need to handle generic method definitions specially.
4421
4422         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4423
4424         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4425         decode_klass_info.
4426
4427         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4428         encode_klass_info.
4429         (compile_method): Enable generic sharing.
4430
4431 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4432
4433         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4434         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4435
4436         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4437         generic code.
4438
4439         * mini-trampolines.c: Fix a warning.
4440
4441         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4442         NEW_PCONST.
4443         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4444         (generic_class_is_reference_type): Remove unused function.
4445
4446         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4447         in the generic vtable trampoline case.
4448
4449         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4450         
4451         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4452         return an AOT method based on a vtable slot.
4453
4454         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4455
4456         * mini.c (mini_get_vtable_trampoline): Export this.
4457
4458 2007-11-22  Martin Baulig  <martin@ximian.com>
4459
4460         * debug-debugger.h
4461         (MonoDebuggerInfo): Move `debugger_version' up.
4462
4463 2007-11-22  Martin Baulig  <martin@ximian.com>
4464
4465         * mini-amd64.c
4466         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4467
4468         * mini-trampolines.c
4469         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4470         after compiling the method.
4471
4472 2007-11-20  Martin Baulig  <martin@ximian.com>
4473
4474         * debug-mini.c
4475         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4476         (mono_debugger_remove_breakpoint): Likewise.
4477         (mono_debugger_check_breakpoints): Likewise.
4478
4479         * debug-debugger.c: Implement the new breakpoint interface here.
4480
4481 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4482
4483         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4484         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4485
4486         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4487
4488 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4489
4490         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4491
4492         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4493         mini.c.
4494
4495         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4496         mini.c.
4497
4498         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4499         returning a vtype in a register.
4500
4501         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4502         here from the arch specific code.
4503
4504         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4505         mini.c.
4506
4507         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4508         (mono_arch_emit_prolog): Increment maximum prolog size.
4509
4510         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4511         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4512
4513         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4514         MonoGenericSharingContext.
4515
4516         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4517         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4518
4519 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4520
4521         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4522         which extract fields out of the runtime generic context.  Full
4523         sharing of the NEWARR opcode.
4524
4525 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4526
4527         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4528         --enable-minimal=ssa.
4529
4530 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4531
4532         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4533         mono_marshal_get_delegate_invoke () signature change.
4534
4535 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4536
4537         * mini.c: Removed the shared context in favor of the generic
4538         sharing context.  Allocate the MonoJitInfo structure with room for
4539         the generic sharing context if it's needed.
4540
4541         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4542         domain-internals.h now.
4543
4544         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4545
4546         * generic-sharing.c: Several changes for working without a shared
4547         context and instead operating on open types instead.
4548
4549 2007-11-12  David S. Miller  <davem@davemloft.net>
4550
4551        * inssel-sparc.brg: Fix double instruction emit.
4552
4553 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4554
4555         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4556         Get/Set/Address methods.
4557         
4558         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4559         mono_marshal_get_delegate_invoke signature change.
4560
4561 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4562
4563         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4564         This can happens with dynamic methods. Fixes the other bug in #322722.
4565
4566 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4567
4568         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4569         BX call sequence.
4570
4571         * mini-arm.c (arm_patch): Implement patching of BX call
4572         sequence. Fixes one of the bugs in #322722.
4573
4574 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4575
4576        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4577        under Linux.  We only need to flush every 32-byte cache line.    
4578
4579 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4580
4581         * mini.c:
4582         move_basic_block_to_end: Add branches when needed, eventually creating
4583         a new BB.
4584         optimize_branches: added a parameter that tells if it's ok to create
4585         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4586         and avoid calling move_basic_block_to_end when it's not ok.
4587         Fixes bug 318677.
4588
4589 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4590
4591         * mini.c: Abort inlining call to InitializeArray if something
4592         looks wrong.  Let the icall handle it, which now has proper safety
4593         checks.
4594
4595 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4596
4597         * mini.c (mono_spill_call): add support for soft-float.
4598
4599         * mini.c (mono_method_to_ir): add support for soft-float
4600         to inlined functions that return float.
4601
4602         * mini.c (mono_method_to_ir): add support for soft-float
4603         to cee_stsfld opcode on float fields.
4604
4605 2007-11-05  Geoff Norton  <gnorton@novell.com>
4606
4607         * mini-x86.h: Fix the structure access for X86 Leopard.
4608
4609
4610 2007-11-05  Martin Baulig  <martin@ximian.com>
4611
4612         * mini-trampolines.c
4613         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4614         after compiling the method to notify the debugger.
4615
4616 2007-11-05  Martin Baulig  <martin@ximian.com>
4617
4618         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4619
4620 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4621
4622         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4623         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4624
4625 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4626
4627         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4628         native-to-managed wrappers.
4629         
4630 2007-11-01  Geoff Norton  <gnorton@novell.com>
4631
4632         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4633         members.
4634
4635 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4636
4637         * mini.c, mini-x86.c: when getting back from unmanaged code
4638         to managed via a marshaled delegate we also need to set the
4639         right domain.
4640
4641 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4642
4643         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4644         for amd64.
4645
4646 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4647
4648         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4649         let the debugger or other external agents to tell the JIT when
4650         a sw breakpoint has been inserted in the code that the JIT needs
4651         to be able to inspect.
4652
4653 2007-10-31  Martin Baulig  <martin@ximian.com>
4654
4655         * debug-debugger.h
4656         (MonoDebuggerInfo): Remove `runtime_class_init'.
4657
4658 2007-10-30  Martin Baulig  <martin@ximian.com>
4659
4660         * debug-mini.h
4661         (mono_debugger_thread_created): Added `MonoThread *' argument.
4662         (mono_debugger_extended_notification): New public method.
4663         (mono_debugger_trampoline_compiled): New public method.
4664
4665         * debug-mini.c
4666         (MonoDebuggerThreadInfo): Added `thread' and
4667         `extended_notifications' fields.
4668
4669         * debug-debugger.c
4670         (debugger_executable_code_buffer): New static variable.
4671
4672         * debug-debugger.h
4673         (MonoDebuggerInfo): Added `executable_code_buffer',
4674         `executable_code_buffer_size', `breakpoint_info_area',
4675         `breakpoint_table' and `breakpoint_table_size'.
4676
4677 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4678
4679         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4680         that IP  either is an unused value or the vtable pointer. IMT 
4681         calls use vtable + offset now. Reduced by almost half the size
4682         of IMT entries.
4683
4684 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4685
4686         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4687         defines to access param registers. Replace long usage with
4688         gsize as sizeof(long) != sizeof(void*) on Win64.
4689
4690         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4691         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4692         instead of non-existant _GetAddressOfReturnAddress.
4693
4694         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4695         param registers. Save/restore %rdi and %rsi in MonoLMF.
4696
4697         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4698         param registers. Modify (throw_exception) signature to take 
4699         %rdi and %rsi on Win64. 
4700
4701         Code is contributed under MIT/X11 license.
4702
4703 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4704
4705         * helpers.c: unlink debugging output files.
4706
4707 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * mini.c: Move mono_create_ftnptr () to object.c.
4710
4711 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4712
4713         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4714         optional. This function can now be used to disassemble code generated
4715         outside the JIT such as trampolines and IMT thunks.
4716
4717         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4718
4719         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4720         vtable pointer from a ldr instruction.
4721
4722         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4723         new IMT call sequence.
4724
4725         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4726         call sequence for interface invocations.
4727
4728         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4729         for imt support. This function is empty since IMT on ARM requires no
4730         special handling on the IR side.
4731
4732         * mini-arm.c (mono_arch_find_imt_method): added, required for
4733         imt support.
4734
4735         * mini-arm.c (mono_arch_find_this_argument): added, required
4736         for imt support.
4737
4738         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4739         a ldr instruction to load a value stored in the code stream.
4740
4741         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4742         for imt support.
4743
4744
4745 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * mini.c (mini_init): Install the jump trampoline callback.
4748
4749 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4750
4751         * mini-trampolines.c: handle synchronized methods with the common
4752         vtable trampoline (bug #335601).
4753
4754 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4755
4756         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4757
4758         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4759         64 bit platforms.
4760
4761         * mini-ia64.h mini-ia64.c: Add support for IMT.
4762
4763         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4764         prolog. Fixes #331958.
4765
4766 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4767
4768         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4769
4770 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4771
4772         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4773         trampoline.
4774
4775 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4776
4777         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4778         trampoline.
4779
4780 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4781
4782         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4783         trampoline.
4784
4785 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4786
4787         * mini-trampolines.c: changed the magic rampoline to understand
4788         the common vtable trampoline method: the method to invoke is
4789         determined by the vtable displacement of the call.
4790
4791 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4792
4793         * mini.c, mini.h: register the common vtable trampoline if the
4794         architecture supports it.
4795
4796 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4797
4798         * cpu-amd64.md: use the correct max length for tls_get.
4799
4800 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4801
4802         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4803         CEE_STELEM_ANY. Fixes #333696.
4804
4805 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4806
4807         * exceptions-x86.c: provide more graceful handling of the case where
4808         we followed a bogus function pointer from managed code (bug #332866).
4809
4810 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4811
4812         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4813         replaces the generic_shared flag and will carry more information
4814         in the future.
4815
4816         * generic-sharing.c: Added mini_type_stack_size() which allows
4817         allows open types if given a generic sharing context.
4818         mini_get_basic_type_from_generic() takes a
4819         MonoGenericSharingContext* instead of a MonoCompile* now.
4820
4821         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4822         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4823         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4824         changes above.  Just passing arguments through to the right
4825         places.
4826
4827 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4828
4829         * mini-arm.c: unify the call emission to emit_code_seq().
4830
4831 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4832
4833         * tramp-arm.c: reduced the trampoline size.
4834
4835 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4836
4837         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4838         variable handling out of arch-specific code.
4839
4840 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4841
4842         * mini-arm.c: implemented fast delegate dispatch.
4843
4844 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4847         that fp elimination is turned off if the space required by locals is too
4848         big. Fixes #331958.
4849
4850 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4851
4852         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4853         ARM to the new style trampoline.
4854
4855 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4856
4857         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4858
4859         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4860
4861 2007-10-09  Martin Baulig  <martin@ximian.com>
4862
4863         * debug-debugger.h
4864         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4865         `field_info_offset_offset'.     
4866
4867 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4868
4869         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4870         removed more internal usage of the r11 register and made it available
4871         to the register allocator.
4872
4873 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4874
4875         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4876         when sharing generics and treat type variables as references.
4877
4878 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4879
4880         * mini-ppc.c: started removing the internal uses of register r11
4881         to eventually allow the register allocator to manage it as an
4882         additional available register.
4883
4884 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4885
4886         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4887
4888 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4889
4890         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4891         specific trampolines as they are not performance critical as a jump
4892         target (maybe align as before only for AOT code?). This saves about
4893         200 KB of native code on x86 for monodevelop startup.
4894
4895 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4896
4897         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4898         monodevelop startup.
4899
4900 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4901
4902         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4903
4904         * mini-sparc.h mini-sparc.c: Implement IMT support.
4905
4906         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4907         its smaller and doesn't clobber sparc_g1.
4908
4909         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4910
4911 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4912
4913         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4914
4915 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4916
4917         * mini-ppc.c: implemented fast delegate invocation.
4918
4919 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4920
4921         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4922
4923 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4924
4925         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4926         code to the new style trampoline in preparation for IMT support.
4927
4928 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4929
4930         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4931         systems already. This also reduces the specific trampiline sizes and
4932         prepares for the use of r12 as the IMT identifier register.
4933
4934 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4935
4936         * mini-mips.h: endianess fix (simplified from a patch by
4937         Thomas Kunze <thommy@tabao.de>, bug #323737).
4938
4939 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4940
4941         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4942         to access ucontext fields and enable netbsd support
4943         (partially from Magnus Henoch <mange@freemail.hu>).
4944
4945 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4946
4947         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4948         use the preprocessor from the CPP env var if it is set.
4949
4950 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4951
4952         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4953         code, before interface_offset gets used.
4954
4955 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4958         mono_class_setup_vtable () before accessing klass->vtable.
4959
4960 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4961
4962         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4963         hackish.
4964
4965 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4966
4967         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4968         IMT slots (this saves hundreds of KB of memory in programs like
4969         IronPython and Monodevelop).
4970
4971 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4972
4973         * mini.c: print the delegate counter.
4974
4975 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4976
4977         * mini-x86.c: make it easier to enable the debugging code for IMT
4978         slots.
4979
4980 2007-09-28  Martin Baulig  <martin@ximian.com>
4981
4982         * debug-debugger.h
4983         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4984         `mono_method_klass_offset' and `mono_method_token_offset'.
4985
4986 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4987
4988         * mini.c: First generics sharing implementation.  Can only share
4989         in very simple cases.  If sharing doesn't work it falls back to
4990         dedicated compilation.
4991
4992         * mini.h: Flag in MonoCompile to specify whether generic
4993         compilation is shared.  Flags enum for marking which generic inst
4994         of a context is used.  Prototypes for helper functions.
4995
4996         * generic-sharing.c: Helper functions for generic method sharing.
4997
4998         * optflags-def.h: Optimization flag (gshared) for enabling generic
4999         method sharing added.
5000
5001         * Makefile.am: generic-sharing.c added.
5002
5003 2007-09-19 Daniel Nauck <dna@mono-project.de>
5004
5005         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5006
5007 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5008         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5009         fixes bug 325507.
5010
5011 2007-09-19  Martin Baulig  <martin@ximian.com>
5012
5013         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5014         mono_debug_cleanup() is now part of mono_cleanup().
5015
5016 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5017
5018         * driver.c (mono_main): Fix a warning.
5019
5020 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5021
5022         * aot-compiler.c: Optimize various parts when processing large assemblies.
5023         Fixes ##325568.
5024
5025         * mini.c (mono_patch_info_hash): Improve hash function.
5026
5027 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5028
5029         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5030         
5031         Code is contributed under MIT/X11 license.
5032
5033 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5034
5035         * mini.c (mini_init): Fix a leak.
5036
5037         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5038
5039 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5040
5041         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5042
5043 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5044
5045         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5046
5047 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5048
5049         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5050         variance tests.
5051
5052         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5053
5054         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5055
5056         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5057
5058         * aot-runtime.c (decode_patch_info): Ditto.
5059
5060 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5061
5062         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5063         static case. Cache delegates in architecture specific code, 
5064         based on number of parameters.
5065         
5066         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5067         in architecture specific code, based on number of parameters.
5068         
5069         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5070         caching happen in architecture specific code now.
5071         
5072         Code is contributed under MIT/X11 license.
5073
5074 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5075
5076         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5077         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5078         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5079
5080         Code is contributed under MIT/X11 license.
5081
5082 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5083         * mini.c: (mono_thread_abort) Fixed bug #82416.
5084
5085 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5086
5087         * mini.: hook the new managed GC allocation feature into the JIT.
5088
5089 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5090
5091         * mini.c: implementation for the new runtime tls opcode.
5092
5093 2007-09-11  Martin Baulig  <martin@ximian.com>
5094
5095         * debug-debugger.h
5096         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5097         `mono_method_inflated_offset'.
5098
5099 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5100
5101         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5102         async exceptions into a method.
5103
5104         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5105         purpose of testing whenever the unwinder works at every instruction.
5106
5107 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5108
5109         * mini.c: check accessibility of method used in ldftn (fixes
5110         bug #82635).
5111
5112 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5113
5114         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5115
5116         * inssel.brg: Fix a warning.
5117
5118 2007-09-03  Martin Baulig  <martin@ximian.com>
5119
5120         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5121         now takes the `main_method' as argument.
5122
5123 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5124
5125         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5126
5127 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5128
5129         * driver.c: include the cil-coff.h header on Windows.
5130         
5131         Code is contributed under MIT/X11 license.
5132
5133 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5134
5135         * mini.c, driver.c: don't include the cil-coff.h header.
5136
5137 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5138
5139         * mini.c: flag places that needs fixes fo soft-float support.
5140
5141 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5142
5143         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5144         endian systems (partially from Dean Jenkins, bug #81924).
5145
5146 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5147
5148         * mini.c (check_linkdemand): Remove embedded reference object in
5149         call to LinkDemandSecurityException.
5150         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5151         with an IntPtr instead of a reference object.
5152
5153 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5154
5155         * mini.c (handle_initobj): Handle alignment properly.
5156
5157         * inssel.brg (mini_emit_memset): Ditto. 
5158
5159         * inssel.brg (mini_emit_memcpy): Ditto. 
5160
5161         * inssel-sparc.brg: Ditto.              
5162
5163         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5164
5165 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5166
5167         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5168         exceptions raised in unmanaged code. Fixes part of #82594.
5169
5170 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5171
5172         * mini.c (mono_method_to_ir), declsec.c
5173         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5174
5175 2007-08-22  Martin Baulig  <martin@ximian.com>
5176
5177         * debug-mini.h
5178         (MonoDebuggerThreadInfo): New typedef.
5179         (mono_debugger_thread_table): New global variable.
5180         (mono_debugger_thread_created): New public function.
5181         (mono_debugger_thread_cleanup): New public function.
5182
5183         * debug-debugger.h
5184         (MonoDebuggerInfo):
5185         - removed `get_current_thread' and `lookup_assembly'.
5186         - removed `data_table'.
5187         - added `thread_table'.
5188
5189         * mini.c
5190         (mono_thread_start_cb): Call mono_debugger_thread_created().
5191         (mono_thread_attach_cb): Likewise.
5192         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5193         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5194         initial domain.
5195
5196         * driver.c (mono_main): Move mono_debug_init() up, before calling
5197         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5198
5199 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5200
5201         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5202         together when passing several arguments of type double (gives a small
5203         speedup and saves a few bytes of generated code).
5204
5205 2007-08-20  Jb Evain  <jbevain@novell.com>
5206
5207         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5208
5209 2007-08-20  Jb Evain  <jbevain@novell.com>
5210
5211         * mini.c (mono_method_to_ir): throw MethodAccessException
5212         and FieldAccessException instead of InvalidProgramException.
5213
5214 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5215
5216         * mini.c: CoreCLR security checks.
5217
5218         * mini.h: Removed MonoSecurityMode (moved to
5219         metadata/security-manager.h) and mono_security_mode global var
5220         (replaced by set/get functions in security-manager.h).
5221
5222         * driver.c: Added "core-clr-test" security mode for testing.  Used
5223         set-function for setting security mode.
5224
5225 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5226
5227         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5228         the new jit_info_table.
5229
5230         * driver.c: Test code for the new jit_info_table (enabled by the
5231         define MONO_JIT_INFO_TABLE_TEST).
5232
5233 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5234
5235         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5236         detection of call <REG> instruction sequence. Fixes build on freebsd.
5237
5238 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5239
5240         * mini-exceptions.c: Fix a warning.
5241
5242 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5243
5244         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5245         stack overflow handling code on amd64 too.
5246
5247         * mini-exceptions.c (mono_setup_altstack): Make this use 
5248         mono_thread_get_stack_bounds ().
5249
5250         * mini-x86.h: Disable sigaltstack on solaris x86.
5251
5252 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5253
5254         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5255
5256 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5257
5258         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5259
5260 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5261
5262         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5263
5264         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5265
5266 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5267
5268         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5269         due to alignment.
5270
5271 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5272
5273         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5274         to be emitted (bug #82281).
5275
5276 2007-08-01  Martin Baulig  <martin@ximian.com>
5277
5278         Merged the `debugger-dublin' branch.
5279
5280         * debug-debugger.h (MonoDebuggerInfo):
5281         Removed the `old_*' compatibility entries.
5282         Added `debugger_version' and `data_table'.
5283         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5284         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5285
5286         * debug-mini.c
5287         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5288         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5289         instead of a `gconstpointer'.
5290         (mono_debugger_insert_method_breakpoint): Return a
5291         `MonoDebugMethodAddressList *'.
5292
5293 2007-06-28  Martin Baulig  <martin@ximian.com>
5294
5295         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5296
5297 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5298
5299         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5300         __builtin_frame_address () since it is broken on older gcc versions.
5301
5302 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5303
5304         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5305         on the stack overflow handling and made the managed stack overflows
5306         catchable in most cases using soft guard pages.
5307         * exceptions-x86.c: added code to restore the protection in the soft
5308         guard pages at the end of exception handling.
5309
5310 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5311
5312         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5313
5314 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5315
5316         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5317         exception handling.
5318
5319 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5320
5321         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5322         signal handling support until it has been ported to the new mechanism.
5323         * mini.c: fixed stack overflow detection and use the new
5324         architecture code  to handle signals on the altstack.
5325
5326 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5327
5328         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5329         stack overflows on the alt stack.
5330
5331 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5332
5333         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5334         stack overflows on the alt stack.
5335
5336 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5337
5338         * exceptions-ppc.c: cleanup preparing for altstack support.
5339
5340 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5341
5342         * exceptions-arm.c: cleanup preparing for altstack support.
5343
5344 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5345
5346         * mini.c (print_jit_stats): Output hazard pointer stats.
5347
5348 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5349
5350         * driver.c, mini.c: Replaced security mode flags with a single
5351         enum variable.
5352
5353 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5354
5355         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5356
5357 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5358
5359         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5360         (which doesn't do anything yet) for activating Core CLR
5361         (Silverlight) security.
5362
5363 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5364
5365         * mini-codegen.c: work around a possible gcc bug on arm.
5366
5367 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5368
5369         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5370         message for platforms that don't support AOT compilation.
5371
5372 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5373
5374         * mini.h, mini.c, driver.c: temporary smcs hack.
5375
5376 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5377
5378         * mini-arm.h, mini-arm.c: arm EABI fixes.
5379
5380 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5381
5382         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5383         case.
5384
5385         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5386         trampolines taking a method argument.
5387
5388         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5389
5390         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5391         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5392
5393         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5394         JIT compilation throws an exception. Fixes #82050.
5395
5396 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5397
5398         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5399         with the MONO_EXCEPTION_ defines.
5400
5401 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5402
5403         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5404         #82117.
5405         
5406         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5407         the cause of an assertion.
5408
5409 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5410
5411         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5412         removed.
5413
5414 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5415
5416         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5417         assert. Should fix #82103.
5418
5419 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5420
5421         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5422         here too. Fixes #82095.
5423
5424         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5425         addresses.
5426
5427         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5428
5429         * mini-amd64.h: Enable IMT for amd64.
5430         
5431         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5432
5433 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5434
5435         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5436
5437 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5438
5439         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5440         as soon as check_linkdemand sets an exception_type.
5441
5442 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5443
5444         * mini-x86.c: fixed offsets for IMT call sequence.
5445         * mini-x86.h: enable IMT again.
5446
5447 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5448
5449         * trace.c (mono_trace_enter_method): Decode MonoType too.
5450
5451         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5452
5453         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5454
5455         * mini-amd64.c: Add preliminary IMT implementation.
5456         
5457 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5458
5459         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5460         understand the new IMT-base interface invocation (thanks to
5461         Daniel Nauck for the report and the remote debugging session).
5462
5463 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5464
5465         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5466
5467 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5468
5469         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5470
5471 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5472
5473         * mini-trampolines.c: implement AOT IMT support.
5474         * mini-x86.h: enable IMT support for wider testing.
5475
5476 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5477
5478         * inssel.brg (emit_imt_argument): Add aot support here.
5479
5480         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5481
5482 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5483
5484         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5485         of the IMT implementation, partially from massi, with my
5486         implementation of the bsearch sequence. Disabled by default until
5487         the AOT code is implemented.
5488
5489 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5490
5491         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5492
5493         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5494
5495 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5496
5497         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5498         arch-independent IMT JIT code from Massimiliano
5499         Mantione (massi@ximian.com) with small cleanups from me.
5500
5501 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5502
5503         * Makefile.am: fix svn invocation to get the svn revision to be
5504         independent of the local language (build fix).
5505
5506 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5507
5508         * mini.c (inline_method): Reset cfg->exception_type if the
5509         inlining is aborted.  Fixes: 82049.
5510
5511 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5512
5513         * mini.c: remove assert from exception handling code when exception_ptr
5514         is not set.
5515
5516 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5517
5518         * mini.c (mono_codegen): Add an assert.
5519
5520         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5521         enter and leave code.
5522         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5523
5524 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5525
5526         * mini-ppc.c: fixed memory corruption for localloc(0)
5527         (bug #81852).
5528
5529 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5530         
5531         * mini.c: Fix warnings.
5532
5533 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5534
5535         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5536         to emit better double->int conversions.
5537
5538 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5539
5540         * mini.c: the provided Min/Max optimizations are valid for unisgned
5541         ints.
5542
5543 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5544
5545         * 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
5546
5547 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5548
5549         * mini.c (mono_running_on_valgrind): Add support for reporting the
5550         method and  its boundaries to valgrind.
5551
5552 2007-06-28  Martin Baulig  <martin@ximian.com>
5553
5554         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5555
5556 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5557
5558         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5559
5560         * generic.2.cs: Add new test case.
5561
5562 2007-06-25  Martin Baulig  <martin@ximian.com>
5563
5564         Merged the `debugger-dublin' branch.
5565
5566         * debug-mini.c
5567         (mono_debugger_insert_method_breakpoint): New public method.
5568         (mono_debugger_remove_method_breakpoint): Likewise.
5569         (mono_debugger_check_breakpoints): New static method.
5570         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5571
5572         * debug-debugger.h (MonoDebuggerInfo):
5573         Renamed (to keep backward compatibility in the vtable):
5574         `insert_breakpoint' -> `old_insert_breakpoint'.
5575         `remove_breakpoint' -> `old_remove_breakpoint'.
5576         `create_string' -> `old_create_string'.
5577         `lookup_class' -> `old_lookup_class'.
5578         `lookup_type' -> removed; changed into a dummy field.
5579         `lookup_assembly' -> `old_lookup_assembly'.
5580         Added (same functionality, but different signature):
5581         `create_string', `lookup_class', `lookup_assembly'
5582         Added new:
5583         `get_method_addr_or_bpt', `remove_method_breakpoint',
5584         `runtime_class_init'.
5585
5586         * debug-debugger.c: Merged the `debugger-dublin' branch.
5587
5588 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5589
5590         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5591         well.
5592         (peephole_pass): Likewise.
5593
5594 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5595
5596         * driver.c: hopefully make setaffinity work also for ancient
5597         versions of linux.
5598
5599 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5600
5601         * driver.c : win32 build fix.
5602
5603 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5604
5605         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5606         processor if it is set.
5607
5608 2007-06-21  Martin Baulig  <martin@ximian.com>
5609
5610         * debug-mini.h: New file.
5611
5612         * debug-mini.c
5613         (mono_debugger_insert_breakpoint_full): Moved here from
5614         ../metadata/mono-debug-debugger.c.
5615         (mono_debugger_remove_breakpoint): Likewise.
5616         (mono_debugger_breakpoint_callback): Likewise.
5617
5618 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5619
5620         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5621         changes in MonoGenericClass.
5622
5623 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5626
5627 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5628
5629         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5630         removal of MonoGenericMethod.
5631
5632 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5633
5634         * mini-exceptions.c: hooks for the exception events profiling API.
5635
5636 2007-06-14  Randolph Chung  <tausq@debian.org>
5637
5638         * Makefile.ma: Add hppa target.
5639         * mini-arch.h: Include mini-hppa.h
5640         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5641         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5642         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5643
5644 2007-06-14  Randolph Chung  <tausq@debian.org>
5645
5646         * inssel.brg: Add rules for "chained" compare-branch operations so that
5647         a single compare op can affect multiple branches.  Adjust cost for
5648         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5649         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5650         cost for some rules so that they can more easily be overridden by
5651         per-arch rules (with fixes from lupus).
5652         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5653
5654 2007-06-13  Randolph Chung  <tausq@debian.org>
5655
5656         * mini-ops.h: Reorder branch ops so that they match the order of the
5657         corresponding CEE_* ops.  The code expects them this way.
5658         Add new ops for HPPA target.
5659         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5660
5661 2007-06-13  Randolph Chung  <tausq@debian.org>
5662
5663         * mini-exceptions.c: Handle cases where the stack grows towards
5664         larger addresses.
5665         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5666
5667 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5668
5669         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5670         counter.
5671         * driver.c: explain where a non-matching corlib is found.
5672
5673 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5674
5675         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5676
5677 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5678
5679         * mini-exceptions.c: Generate a method profile leave event during
5680         an exception to ensure that the profiler gets notified.
5681
5682 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5683
5684         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5685         branch.
5686
5687         * cpu-amd64.md: Add long_and/or/xor opcodes.
5688
5689 2007-06-06  Wade Berrier  <wberrier@novell.com>
5690
5691         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5692         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5693         length of instruction shr_imm (expected 8, got 10)
5694
5695 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5696
5697         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5698
5699 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5700
5701         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5702         MonoInternalHashTable again (fixed bug in the internal hash table
5703         code).
5704
5705 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5706
5707         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5708         Have to figure out what makes it crash the SWF regression.
5709
5710 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5711
5712         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5713
5714 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5715
5716         * mini.c: optimize out the type check when storing null in a
5717         reference array.
5718
5719 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5720
5721         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5722         MonoInternalHashTable.
5723
5724 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5725
5726         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5727         signed integer methods.
5728
5729 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5730
5731         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5732         permanently since the current approach doesn't work.
5733
5734 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5735
5736         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5737         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5738
5739 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5740
5741         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5742         the sreg2==rdx case.
5743         
5744         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5745         account if it contains a rex prefix.
5746         (peephole_pass): Handle OP_FMOVE as well.
5747
5748 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5749
5750         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5751         as it causes regressions.
5752
5753 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5754
5755         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5756         static case as well.
5757
5758         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5759
5760         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5761         (mono_arch_get_this_arg_from_call): Ditto.
5762
5763         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5764
5765         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5766         invoke_impl field.
5767
5768         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5769         (mono_arch_get_this_arg_from_call): Ditto.
5770
5771         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5772         
5773         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5774         try to create optimized invoke code and use that for further invocations. 
5775         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5776
5777         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5778
5779 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5780
5781         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5782         sealed classes or methods.
5783         *devirtualization.cs: tests for the new optimization
5784
5785 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5786
5787         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5788         by the update_volatile () function.
5789
5790 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5791
5792         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5793         require it.
5794
5795         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5796
5797 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5798
5799         * mini.c: Add configure checks for header files.
5800         * mini-x86.c: Add configure checks for header files.
5801         * trace.c: Add configure checks for header files.
5802         * aot-runtime.c: Add configure checks for header files.
5803         * aot-compiler.c: Add configure checks for header files.
5804         * driver.c: Add configure checks for header files.
5805         * mini-codegen.c: Add configure checks for header files.
5806         
5807         Code is contributed under MIT/X11 license.
5808
5809 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5810
5811         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5812         icompare_imm -128 + op_iclt. Fixes #81703.
5813
5814 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5815
5816         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5817
5818 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5819
5820         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5821         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5822         so that all isinst checks now use "interface_bitmap".
5823
5824 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5825
5826         * cpu-amd64.md (jmp): Fix a warning.
5827
5828         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5829
5830         * basic.cs: Add new regression test.
5831
5832         * basic.cs: Remove test which is now in basic-long.cs.
5833
5834         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5835
5836         * basic-long.cs: Add new test.
5837         
5838 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5839
5840         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5841
5842 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5843
5844         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5845
5846         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5847         places.
5848         
5849         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5850         throwing code a bit.
5851
5852         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5853         the exception throwing code a bit.
5854
5855         * mini-x86.c (get_call_info): Allocate result from a mempool.
5856
5857 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5860
5861         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5862
5863         * mini.h (MonoCompile): Add 'token_info_hash' field.
5864
5865         * mini.c: Save token->method associations during compilation so the AOT 
5866         compiler can use it.
5867         
5868         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5869         which reference generic classes and methods.
5870
5871 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5872
5873         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5874
5875         * aot-compiler.c (compile_method): Fix a typo in a comment.
5876
5877         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5878
5879         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5880         everything generic.
5881
5882         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5883
5884 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5885
5886         * mini.h (MonoCompile): Add 'args' field.
5887
5888         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5889         into cfg->args.
5890
5891         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5892
5893 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5894
5895         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5896
5897         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5898
5899         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5900         opcodes for some opcodes.
5901
5902         * mini.h *.brg *.c: Use the new opcodes.
5903
5904 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5905
5906         * mini.h: Bumped aot revision.
5907
5908         * inssel.brg: modified code generation of type checks for interfaces
5909         to use the new "MonoClass.interface_bitmap" instead of the old
5910         "MonoClass.interface_offsets".
5911
5912 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5913
5914         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5915
5916 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5917
5918         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5919         64 bit platforms.
5920
5921 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5922
5923         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5924
5925 2007-04-27  Wade Berrier  <wberrier@novell.com>
5926
5927         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5928         mini.h) to fix build.
5929
5930 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5931
5932         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5933         
5934         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5935         causes the corlib unit tests to fail.
5936
5937 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5938
5939         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5940
5941         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5942
5943         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5944         opcodes to the comparison relations.
5945
5946         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5947         opcodes to their types.
5948         
5949         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5950
5951         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5952         it in cfg->arch.cinfo.
5953
5954         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5955
5956         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5957         cfg->cil_offset_to_bb.
5958
5959 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5960
5961         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5962         created becase of initlocals.
5963
5964 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5965
5966         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5967         Sergey Tikhonov <tsv@solvo.ru>.
5968
5969 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5970
5971         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5972
5973 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5974
5975         * cpu-s390.md (break): Correct the length of break instruction.
5976
5977 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5978
5979         * mini.c: fix a couple of soft-float issues and comments.
5980
5981 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5982
5983         * trace.c (is_filenamechar): - is also a filename char.
5984
5985 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5986
5987         * mini-s390.c: Correct checking for enum type in return value processing.
5988
5989 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5990
5991         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5992         (version.h): Makefile is in the build directory.
5993
5994 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5995
5996         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5997
5998 2007-04-11  Martin Baulig  <martin@ximian.com>
5999
6000         * mini.c (can_access_member): Fix handling of generic classes;
6001         fixes #81259.
6002
6003 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6004
6005         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6006
6007 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6008
6009         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6010
6011 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6012
6013         * mini-codegen.c: make sure the right spill amount is
6014         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6015
6016 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6017
6018         * mini-ppc.c: fixes for the fp_branch_nan test.
6019
6020 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6021
6022         * basic.cs: Comment out new test which still fails on ia64.
6023
6024 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6025
6026         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6027
6028 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6029
6030         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6031
6032 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6033
6034         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6035         on 64 bit machines. Fixes part of #80738.
6036
6037         * basic.cs: Add regression test.
6038
6039 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6040
6041         * inssel.brg basic.cs: Revert previous change to fix build.
6042
6043         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6044         platforms.
6045         
6046         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6047
6048         * basic.cs: Add new regression test.
6049
6050 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6051
6052         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6053         many arguments.
6054
6055 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6056
6057         * cpu-s390x.md: Correct length of break instruction.
6058
6059 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6060
6061         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6062         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6063
6064 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6065
6066         * *.c: Begin WIN64 port.
6067         * mini.c:  Use correct register in profiler.
6068         * mini-amd64.c: No inline assembly on Win64.
6069         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6070         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6071         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6072         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6073         mono_arch_ip_from_context for Win64.
6074         
6075         Contributed under MIT/X11 license.
6076
6077 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6078
6079         * exceptions-amd64.c (seh_handler): Ditto.
6080
6081         * exceptions-x86.c (seh_handler): Fix a memory leak.
6082
6083 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6084
6085         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6086         mini-s390x.c: fixed peephole optimizations to deal
6087         correctly with 1 and 2 byte reload avoidance.
6088
6089 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6090
6091         * cpu-s390.md, cpu-s390x.md: update localloc length.
6092
6093 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6094
6095         * cpu-g4.md: added missing descriptions.
6096
6097 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6098
6099         *  Makefile.am: Add support so the tail tests are not executed on
6100         PowerPC as that is a known limitation of the PowerPC port.
6101
6102 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6103
6104         * runmdesc.bat:  Move to msvc directory.
6105         
6106 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6107
6108         * runmdesc.bat:  Run executable that was produced by the current
6109         target and sent via an argument.
6110         
6111 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6112
6113         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6114         #81102.
6115
6116         * generics.2.cs: Add regression test.
6117
6118 2007-03-09  Wade berrier  <wberrier@novell.com>
6119
6120         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6121
6122 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6123
6124         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6125         AOT code depends on this.
6126
6127 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6128
6129         * mini.c: more precise tracking of types in the eval stack
6130         (part of fix for bug #81044).
6131
6132 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6133
6134         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6135
6136         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6137
6138 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6139
6140         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6141
6142         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6143
6144 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6145
6146         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6147         a pointer on 64 bit systems. Fixes #80190.
6148
6149         * iltests.il: Add new regression test.
6150
6151 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6152
6153         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6154
6155 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6156
6157         * trace.c: Remove an erroneous alignemnt check when tracing.
6158           Fixes --trace on OSX86.
6159
6160 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6161
6162         * mini-$(arch).h: initialize SP in context for all the archs.
6163
6164 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6165
6166         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6167         regressions in the thread tests.
6168
6169 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6170
6171         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6172         - fixed implementation of LOCALLOC opcode
6173         - implemented non-un compare for floats
6174         - code cleanup
6175         - implementation of FDIV and CKFINITE opcodes
6176         - fixes for latest mono updates
6177         - additional arch opcodes
6178
6179 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6180
6181         * Makefile.am: simplify and merge rules for cross-compilation.
6182
6183 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6184
6185         * local-propagation.c: Actually *apply* the fix for bug 80591...
6186
6187 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6188
6189         * mini-exceptions.c: backuot part of the last change
6190         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6191
6192 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6193         * inssel.brg: Fix bug 59286.
6194
6195
6196 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6197
6198         * mini-exceptions.c: patch from Zoltan to correctly check for
6199         stack boundaries (using the stack register, not the frame register),
6200         fixes bugs #80724, #79717.
6201
6202 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6203
6204         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6205         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6206
6207         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6208         presence of frame pointer elimination.
6209
6210 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6211         
6212         * mini-x86.h: NetBSD UCONTEX_REG defines.
6213
6214 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6215
6216         * inssel-amd64.brg: Fix amd64 build.
6217
6218 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6219
6220         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6221         on amd64.
6222
6223 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6224
6225         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6226         ends.
6227
6228         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6229
6230 2007-01-30 Mark Mason <mason@broadcom.com>
6231
6232            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6233            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6234            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6235            beginning support for CEE_JMP [not quite working yet]
6236            * tramp-mips.c: LMF handling now works
6237         
6238 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6239
6240         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6241
6242         * mini.h (NULLIFY_INS): New macro.
6243
6244 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6245
6246         * mini.c: statistical profiler fix for windows, patch
6247         from Tor Lillqvist (tml@novell.com).
6248
6249 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6250         * local-propagation.c: Fix bug 80591.
6251
6252 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6253
6254         * Makefile.am: put back the --export-dynamic option as with
6255         the previous gmodule flags (thanks to Robert Jordan).
6256
6257 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6258
6259         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6260
6261         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6262         simplify and speed up the local register allocator. Also rename some fields
6263         like iassign->vassign.
6264         
6265         * regalloc.c: Remove some functions which are no longer used since their
6266         inlined version is in mini-codegen.c.
6267         
6268         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6269
6270         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6271
6272 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6273
6274         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6275         narrowing. Fixes #80622.
6276
6277         * iltests.il: Add new regresssion test. 
6278
6279 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6280
6281         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6282         debug-debugger.c, debug-debugger.h: warning fixes.
6283         * driver.c: updated copyright year and made it fit in one line.
6284
6285 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6286
6287         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6288
6289 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6290
6291         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6292
6293         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6294
6295         * iltests.il: Add new test for bug #80507.
6296
6297 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6298
6299         * mini-arm.h: use soft-float also on vfp for now.
6300
6301 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6302
6303         * mini.c: fix some more soft-float issues.
6304
6305 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6306
6307         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6308
6309 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6310         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6311         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6312         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6313
6314 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6315
6316         * mini-arm.c: typo fix.
6317
6318 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6319
6320         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6321
6322 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6323
6324         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6325         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6326
6327         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6328
6329         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6330
6331         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6332         
6333         * inssel.brg: Fix a warning.
6334
6335         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6336
6337         * abcremoval.c ssa.c ssapre.c: Update after this change.
6338         
6339         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6340
6341         * dominators.c (df_set): Use mono_bitset_union_fast.    
6342
6343 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6344
6345         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6346         mini-codegen.c: reduce relocations and memory usage for the cpu
6347         description.
6348
6349 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6350
6351         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6352
6353         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6354         to reduce their size.
6355
6356 2007-01-19 Mark Mason <mason@broadcom.com>
6357
6358         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6359         * mini-mips.c: more configuration macros, support long conditional branches, additional
6360         asserts, fix epilog instrumentation.
6361         * mini-mips.h: use standard stack walk
6362         * cpu-mips.md: increase size of div, rem and conditional branches
6363         
6364 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6365
6366         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6367         to cpu spec data.
6368
6369 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6370
6371         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6372         (compile_method): Ditto.
6373
6374         * aot-runtime.c (decode_klass_info): Ditto.
6375
6376         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6377         needed by the code generated by inssel.brg. Also fix a warning.
6378
6379 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6380
6381         * mini.c: deal with enums that become genericinsts by
6382         being nested in a generic class (bug #79956).
6383
6384 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6385
6386         * mini.c: match the generic definition to check for
6387         private access with generic types (bug #78431).
6388
6389 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6390
6391         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6392         to make life easier for people cross-compiling that insist on not
6393         using scratchbox.
6394
6395 2007-01-17 Mark Mason <mason@broadcom.com>
6396
6397         * inssel-long.brg: patch to deal with mips missing flags
6398         * inssel-long32-mips.brg: implement overflow checks
6399         * insset-mips.brg: implement overflow checks
6400         * mini-mips.h: implement conditional exception handling
6401         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6402           Remove unused code, minor cleanups.
6403         * exceptions-mips.c: minor cleanups
6404         * mini-ops.h: add mips conditional exception ops
6405         * cpu-mips.md: add mips conditional exception ops
6406
6407         
6408 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6409
6410         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6411         to deal with mips missing of flags.
6412
6413 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6414
6415         * exceptions-ppc.c: execute fault handlers.
6416
6417 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6418
6419         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6420
6421 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6422
6423         * mini.c: handle also floating point values in initialize_array.
6424
6425 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6426
6427         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6428         array initialization and make it conditional on the intrins option.
6429
6430 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6431
6432         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6433         relocations and put the patch info names close to the enum definition.
6434
6435 2007-01-15 Mark Mason <mason@broadcom.com>
6436
6437         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6438
6439 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6440
6441         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6442
6443 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6444
6445         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6446
6447 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6448
6449         * Makefile.am: distribute the mips sources.
6450
6451 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6452
6453         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6454         directly.
6455
6456 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6457
6458         * cpu-x86.md: back out for now as this triggers other regressions.
6459
6460 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6461
6462         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6463         to eax:edx, so ecx can't get allocated to them (bug #80489).
6464
6465 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6466
6467         * mini.c, mini-exceptions.c: enabled running fault handlers
6468         (bug #80469).
6469
6470 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6471
6472         * driver.c: If nothing fail, do not use the string "failed",
6473         because it makes it very annoying to view test result logs on the
6474         web. 
6475
6476 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6477
6478         * debug-debugger.c (mono_debugger_main): Rename "main" to
6479         "main_method" to prevent a warning.
6480
6481         Remove a warning for unused field.
6482
6483 2006-12-28  Martin Baulig  <martin@ximian.com>
6484
6485         * debug-debugger.c
6486         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6487
6488 2006-12-22  Martin Baulig  <martin@ximian.com>
6489
6490         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6491         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6492         seperate `.mdb_debug_info' section, so we can access it from the
6493         debugger even if the binary is stripped.
6494
6495         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6496         from the `.mdb_debug_info' here to prevent the linker from
6497         removing that section.
6498
6499         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6500         mdb-debug-info64.s.
6501
6502 2006-12-19  Robert Jordan  <robertj@gmx.net>
6503
6504         * mini-x86: enable the code to return small structures in
6505         registers for FreeBSD as well. Fixes bug #80278.
6506         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6507
6508 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6509
6510         * mini-x86.c: align the stack when calling the profiler
6511         function instrumenting the prolog (on OSX).
6512
6513 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6514
6515         * mini.c: emit a break opcode where Debugger.Break () is called.
6516
6517 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6518
6519         * mini.c (mono_method_to_ir): Provide useful information on this
6520         assert, to prevent others from debugging like I did.
6521
6522 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6523
6524         * mini.c: enable code which was incorrectly commented
6525         (bug #80235).
6526
6527 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6528
6529         * mini-x86.c: enable on OSX, too, the code to return small
6530         structures in registers.
6531
6532 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6533
6534         * mini-x86.c: remove the use of the dynamic code manager here, too.
6535
6536 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6537
6538         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6539         mono_debugger_create_notification_function() to use
6540         mono_global_codeman_reserve () instead of a dynamic code manager.
6541
6542 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6543
6544         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6545         ves_array_element_address() jit icall and use a generated
6546         managed method instead (which is about 4 times faster for a rank 3
6547         array access).
6548
6549 2006-11-29  Mark Mason  <mason@broadcom.com>
6550
6551         * basic-calls.cs: additional tests for passing
6552         structures as function arguments.
6553
6554 2006-11-29  Mark Mason  <mason@broadcom.com>
6555
6556         * mini-mips.h: disable custom exception handling
6557         * mini-mips.c: throw/rethrow should use jalr to call
6558         exception stubs.  Fixed bug with passing structures
6559         by value. More support for tracing floating point
6560         functions.
6561
6562 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6563
6564         * mini.c: fixed typo in the soft-float ldind.r4 handling
6565         (bug #80086).
6566
6567 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6568
6569         * mini.c, mini.h, driver.c: added --runtime command line
6570         option to select a different runtime than the autodetected one.
6571         * jit.h: added API for embedders to initialize with a specific
6572         runtime version.
6573
6574 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6575
6576         * mini.c: handle also boxing of r4 values (bug #80024).
6577
6578 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6579
6580         * mini-ppc.c: force indirect calls until we reserve
6581         enough address space for all the generated code.
6582
6583 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6584
6585         * exceptions-arm.c: workaround bugs in the libc definition
6586         of struct ucontext.
6587
6588 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6589
6590         * inssel.brg: fixes from me and Mark Mason.
6591
6592 2006-11-23  Dick Porter  <dick@ximian.com>
6593
6594         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6595         semaphore display now we've fixed the initial value
6596
6597 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6598
6599         * inssel.brg: partially revert the last change to fix the build.
6600
6601 2006-11-21  Mark Mason  <mason@broadcom.com>
6602
6603         * inssel.brg: Add and use compare-and-branch macros to support
6604         architectures that do not have condition code registers (ie. MIPS).
6605         * *-mips.{c,brg,md}: Fix copyright statements
6606
6607 2006-11-20  Mark Mason  <mason@broadcom.com>
6608
6609         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6610         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6611         * mini.h: Added declaration for mono_print_ins()
6612         * mini-codegen.c: added ins_spec initializer for MIPS
6613         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6614         vreg to be virtual and hreg to be non-virtual.
6615         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6616         is not yet working/implemented correctly.
6617         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6618         non-static, fixup calls to print_ins() from other parts in the file.
6619
6620 2006-11-20  Mark Mason  <mason@broadcom.com>
6621
6622         * basic-calls.cs: added tests for passing structures as arguments
6623         to calls.
6624
6625 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6626
6627         * inssel-long32.brg: optimize signed division by power of two.
6628
6629 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6630
6631         * mini-arm.c: added support for interworking with thumb code
6632         (mono must be still be built using the ARM instruction encoding).
6633
6634 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6635
6636         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6637         verifier has different rules for it.   Fixes a few verifier issues
6638         in the test suite.
6639
6640         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6641         at the end, so people know what happened.
6642
6643 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6644
6645         * brach-opts.c: in optimize_exception_target() make sure we
6646         are in a catch clause (fixes bug #79871).
6647
6648 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6649
6650         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6651         more soft-float support fixes.
6652
6653 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6654
6655         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6656         that are passed half on the stack and half in registers.
6657
6658 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6659
6660         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6661         more mips integration work from Mark E Mason 
6662         <mark.e.mason@broadcom.com>.
6663
6664 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6665
6666         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6667         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6668         tramp-mips.c: added sources for the mips port, not
6669         integrated in the build yet. Contributed by
6670         Mark E Mason <mark.e.mason@broadcom.com>.
6671
6672 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6673
6674         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6675
6676 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6677
6678         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6679         put the soft-float rules in its own file since it seems to
6680         break s390 compilation.
6681
6682 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6683
6684         * mini-arm.c: fixed wrnings.
6685
6686 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6687
6688         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6689         inssel-arm.brg: ARM support for soft-float.
6690
6691 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6692
6693         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6694         loads and stores of 32 bit fp values.
6695
6696 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6697
6698         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6699
6700         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6701         works. Fixes #79852 and #79463.
6702
6703 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6704
6705         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6706         more soft-float support WIP and fixes.
6707
6708 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6709
6710         * mini-arm.c: some VFP updates.
6711
6712 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6713
6714         * mini-exceptions.c: 0 is a valid local var offset in some
6715         architectures, don't assert (bug #78508).
6716
6717 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6718
6719         * exceptions-arm.c: fixed off by one error in stack walk code.
6720
6721 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6722
6723         * mini.h, mini.c: more precise tracking of type load exceptions.
6724
6725 2006-11-03  Robert Jordan  <robertj@gmx.net>
6726
6727         * Makefile.am: [WIN32] Add monow.exe target.
6728         * driver.c: [WIN32] Don't detach the console when debugging.
6729         Fixes bug #79797.
6730         
6731 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6732
6733         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6734
6735 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6736
6737         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6738
6739         * driver.c (mini_regression): Fix --regression with AOT.
6740
6741         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6742
6743 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6744
6745         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6746
6747         * mini-sparc.h: Don't use sigaction on sparc/linux.
6748
6749         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6750
6751         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6752
6753         * mini-exceptions.c: Add proper include files for getpid ().
6754
6755 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6756
6757         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6758         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6759         method.
6760
6761         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6762         name cache to reduce its size.
6763
6764         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6765
6766 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6767
6768         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6769         the mono_lmf TLS variable.
6770
6771         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6772         trampoline lmf frames.  
6773
6774         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6775
6776 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6777
6778         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6779         the mono_lmf TLS variable.
6780
6781         * mini-exceptions.c: Access the LMF structure through accessors.
6782
6783         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6784         variable instead of in jit_tls->lmf.
6785
6786         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6787         
6788         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6789         trampoline lmf frames.
6790
6791         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6792
6793 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6794
6795        * mini.c trace.c mini-x86.c: Revert these too.
6796         
6797        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6798        signature change.
6799
6800 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6801
6802         * genmdesc.c: removed now dead code.
6803
6804 2006-10-09  Robert Jordan <robertj@gmx.net>
6805
6806         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6807
6808 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6809
6810         * mini.h: do not leave gaps in the opcode values.
6811
6812 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6813
6814         * jit-icalls.h: flag functions as internal here, too.
6815
6816 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6817
6818         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6819         functions with the internal attribute.
6820
6821 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6822
6823         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6824
6825 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6826
6827         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6828         for soft-float.
6829
6830 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6831
6832         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6833         tail calls as on other platforms.
6834
6835         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6836
6837         * iltests.il: Add a few tailcall tests.
6838
6839 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6840
6841         * driver.c: fix loop for old compilers (bug #79521).
6842
6843 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6844
6845         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6846
6847         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6848
6849         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6850         metadata without any code.
6851
6852         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6853         more precise debugging information using gdb.
6854
6855 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6856
6857         * inssel-ia64.brg: Make the helper methods static.
6858
6859 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6860
6861         * inssel-x86.brg: make the helper methods static.
6862
6863 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6864
6865         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6866
6867 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6868
6869         * mini.c: updates for monoburg changes.
6870         * inssel.brg: make a few helper functions static as they should.
6871
6872 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6873
6874         * Makefile.am: Move mini-codegen.c to common_sources.
6875
6876 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6877
6878         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6879         instructions.
6880         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6881         mini-ppc.h: port to use the common local register allocator.
6882
6883 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6884
6885         * mini.h: Remove the comment too then.
6886
6887 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6888
6889         * mini.h: put back backend.data which is to be used shortly and
6890         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6891         pointers on 4 byte boundaries it'd have much bigger issues running
6892         and you can ifdef it out anyway.
6893
6894 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6895
6896         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6897         MonoInst size by 4 bytes on 64 bit machines.
6898
6899 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6900
6901         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6902         replacement with more meaningful field names. Arch maintainers, please
6903         check the assigned names are good enough for your arch.
6904
6905 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6906
6907         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6908         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6909
6910 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6911
6912         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6913         relocations and memory requirements, put the optimization flags
6914         definitions in their own file.
6915
6916 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6917
6918         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6919
6920         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6921
6922 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6923
6924         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6925
6926 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6927
6928         * inssel.brg: use the correct function to get the size of an item
6929         in an array, given an element class.
6930         * aot-compiler.c: do not access class->class_size directly.
6931
6932 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6933
6934         * mini.h, debug-mini.c: added a debugging function to print
6935         info about local variables and arguments in a jitted method.
6936
6937 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6938
6939         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6940
6941         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6942
6943 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6944
6945         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6946         inner and outer loops when passing vtypes.
6947
6948 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6949
6950         * mini-ppc.c: take into account the cpu errata for cache flushing
6951         which caused some random errors (bug #79381).
6952
6953 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6954
6955         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6956         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6957
6958 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6959
6960         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6961         loaded.
6962
6963         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6964         freebsd ports tree.
6965
6966         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6967         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6968
6969         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6970         displacement.
6971
6972 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6973
6974         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6975
6976 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6977
6978         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6979         macro does not have to be changed during debugging.
6980
6981         * 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>.
6982
6983         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6984
6985         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6986         
6987         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6988         MONO_ARCH_NO_EMULATE_MUL is defined.
6989
6990         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6991
6992         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6993
6994         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6995
6996         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6997         
6998 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6999
7000         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7001         stuff to mini-exceptions.c where it is used.
7002
7003         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7004         setup code, the real one is in mini-exceptions.c.
7005
7006         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7007         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7008         some changes from the freebsd ports tree.
7009
7010         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7011         constants.
7012         
7013         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7014
7015 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7016
7017         * mini.c: on Linux, check for /proc to be mounted
7018         (bug# 79351, novell bug#201204).
7019
7020 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7021
7022         * mini.c: handle cases where pthread_attr_getstack() behaves
7023         incorrectly (bug #78096).
7024
7025 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7026
7027         * mini-arm.c: support larger stack frames (bug #79272).
7028
7029 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7030
7031         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7032
7033         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7034         tokens.
7035
7036         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7037         mono_class_from_name () to find a class from its name.
7038
7039         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7040
7041 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7042
7043         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7044
7045 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7046
7047         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7048
7049 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7050
7051         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7052         callinfo->trampoline.
7053
7054         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7055         fixes #79271.
7056         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7057         future.
7058
7059 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7060
7061         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7062
7063 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7064
7065         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7066         stats.method_trampolines, it is already done by the generic trampoline code.
7067
7068         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7069         
7070 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7071
7072         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7073
7074         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7075
7076         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7077
7078         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7079         
7080         * mini.c (print_jit_stats): Print new stats.
7081
7082         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7083
7084 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7085
7086         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7087         Address on two dimensional arrays. Fixes #78729.
7088
7089         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7090
7091         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7092         a method.
7093
7094         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7095
7096         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7097         #79130.
7098         
7099         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7100         a race condition.
7101         (mini_get_ldelema_ins): Ditto.
7102
7103 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7104
7105         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7106         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7107         Fixes #79213.
7108
7109 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7110
7111         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7112         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7113
7114         * exceptions-s390x.c: Cosmetic change.
7115
7116         * tramp-s390.c: Fix warning.
7117
7118         * cpu-s390.md: Correct length of mul_imm.
7119
7120 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7121
7122         * aot-compiler.c: added binary writer with ELF backend
7123         implementation (only on Linux/x86 for now).
7124
7125 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7126
7127         * Makefile.am: Don't run net 2.0 AOT tests.
7128
7129         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7130         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7131
7132         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7133
7134 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7135
7136         * aot-compiler.c: simplified and refactored the asm-writing code
7137         to allow different backends.
7138
7139 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7142
7143         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7144         little. Share patches of type TYPE_FROM_HANDLE as well.
7145
7146         * mini.c (mono_patch_info_equal): New helper function.
7147         (mono_patch_info_hash): Ditto.
7148
7149         * aot-compiler.c (emit_method_code): Fix s390 build.
7150
7151         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7152         is not handled because it is stored as a flag and not as a type ctor. Fixes
7153         #79016.
7154
7155 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7156
7157         * aot-compiler.c: Fix computation of GOT slot statistics.
7158         
7159         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7160         Also remove support for not PIC AOT.
7161
7162         * mini.h: Bump AOT file format version.
7163
7164         * objects.cs: Add a test for #78990.
7165
7166         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7167         (peter.dettman@iinet.net.au). Fixes #79087.
7168
7169         * basic-long.cs: Add a test for the above.
7170
7171 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7172
7173         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7174         
7175         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7176         code somewhat.
7177
7178 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7179
7180         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7181         exceptions.
7182
7183 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7184
7185         * mini.c: Don't verify COM proxy invoke calls
7186         
7187
7188 2006-08-10  Dick Porter  <dick@ximian.com>
7189
7190         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7191         which process is holding semaphores locked.
7192
7193 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7194
7195         * mini-ia64.c mini-amd64.c: Fix #79027.
7196
7197         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7198
7199         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7200
7201         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7202         implicit arguments in a vararg call. Fixes #79027.
7203
7204 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7205
7206         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7207         (mono_get_array_new_va_signature): Ditto.
7208
7209 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7210
7211         * aot-runtime.c: Call init_plt lazily.
7212
7213         * inssel-long.brg: Fix unsigned long->int conversion.
7214
7215         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7216
7217         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7218         that most data is now in the .rss/.data section.
7219
7220 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7221
7222         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7223
7224         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7225
7226         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7227
7228         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7229
7230         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7231         virtual call. Fixes #79010.
7232
7233         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7234         and use the result as the this argument in the real call.
7235
7236         * generics.2.cs: Add a new test for #79010.
7237         
7238 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7239
7240         * mini-x86.c: Fix a warning.
7241
7242         * aot-compiler.c: Add a bunch of statistics.
7243
7244         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7245
7246 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7247
7248         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7249
7250 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7251
7252         * 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>.
7253
7254 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7255
7256         * mini.c (mono_method_to_ir): Obtain the original method in the
7257         CIL stream and use this to perform validation.
7258
7259         Fixed: #78816
7260
7261 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7262
7263         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7264         (mono_arch_call_opcode): Ditto.
7265
7266         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7267         #78826.
7268
7269         * mini.c (mono_patch_info_dup_mp): New helper function.
7270         
7271         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7272         compilation. Fixes #78827.
7273
7274 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7275
7276         * declsec.c: Use original security informations for
7277           MONO_WRAPPER_MANAGED_TO_MANAGED.
7278
7279 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7280
7281         * mini.c: Allow Com Interop methods/classes and
7282         don't verify COM wrapper calls
7283         
7284
7285 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7286
7287         * inssel-long32.brg: Fix long->i4 checked conversion.
7288
7289         * exceptions.cs: Add a test for the above.
7290
7291 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7292
7293         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7294
7295         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7296         leaks.
7297
7298         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7299         #78775.
7300
7301 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7302
7303         * mini.c: Fix solaris/x86 exception handling.
7304
7305         * Makefile.am: Get rid of $(ICU_LIBS).
7306
7307 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7308
7309         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7310         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7311         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7312
7313         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7314
7315         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7316         this function causes a SIGSEGV.
7317
7318 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7319
7320         * mini.c: Remove unused solaris/x86 includes.
7321
7322 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7323
7324         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7325
7326 2006-06-20  Jb Evain  <jbevain@gmail.com>
7327
7328         * cpu-g4.md: fix max length of start_handler instruction.
7329
7330 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7331         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7332
7333 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7334         * ssa.c: Fixed bug 78653 for SSA based deadce.
7335         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7336         MonoInst.flags, used in SSA based deadce.
7337         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7338         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7339
7340 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7341
7342         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7343         it can end up using non executable memory on ppc64 systems
7344         running ppc32 userspace (fix from Johannes Berg).
7345
7346 2006-06-14  Dick Porter  <dick@ximian.com>
7347
7348         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7349         4.1.1
7350
7351 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7352         * mini.c: Made so that inline is locally disabled if it would
7353         trigger a .cctor, because too many apps depend on this behavior
7354         (which seems to be also the one of the MS CLR).
7355
7356 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7357
7358         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7359         No idea why this worked before.
7360
7361         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7362         which branch to outer exception clauses since they could skip the
7363         inner finally clauses. Fixes #78633.
7364
7365         * exceptions.cs: Add a test for the above.
7366
7367         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7368         Fixes #78629.
7369
7370         * iltests.il: Add a test for the above.
7371
7372 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7373
7374         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7375         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7376
7377         * iltests.il: Add a test for the above.
7378
7379 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7380
7381         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7382         
7383         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7384         methods as instrinsics.
7385
7386 2006-06-09  Wade Berrier <wberrier@novell.com>
7387
7388         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7389         (simple-cee-ops.h ssapre-mini-ops.h)
7390
7391 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7392
7393         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7394         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7395         instruction).
7396         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7397         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7398
7399 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7400
7401         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7402
7403 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7404
7405         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7406         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7407         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7408         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7409         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7410         of opcodes, so that bug 78549 should not happen again.
7411         * ssapre.c: Updated to use the renamed files.
7412
7413 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7414
7415         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7416         in OP_ATOMIC_EXCHANGE_I4.
7417
7418 2006-06-07  Wade Berrier <wberrier@novell.com>
7419
7420         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7421         in mono_debugger_create_notification_function)
7422
7423 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7424
7425         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7426         
7427         * mini.c (type_from_stack_type): Disable some changes which do not
7428         seem to work.
7429
7430         * driver.c: Reenable opts.
7431
7432         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7433         of the evaluation stack.
7434         
7435         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7436         evaluation stack trace at entry to the bblock.
7437
7438         * mini.c (merge_stacks): New function to perform verification of stack merges.
7439         Turned off by default.
7440
7441         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7442         STACK_MP.
7443         
7444 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7445
7446         * local-propagation.c: Fixed bug 78549.
7447
7448 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7449
7450         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7451
7452 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7453
7454         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7455         tramp-arm.c, tramp-ia64.c
7456         (mono_debugger_create_notification_function): Update signature to
7457         new signature and use new protocol for creating the notification
7458         function.  
7459
7460         Should fix the build.
7461
7462 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7463
7464         * exceptions-ppc.c (mono_jit_walk_stack)
7465         (ves_icall_get_frame_info): Fix the build
7466
7467 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7468
7469         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7470
7471 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7472
7473         * il2tests.2.il: New file for generics CIL tests.  Add test for
7474         #78019.
7475         * Makefile.am: Update.
7476
7477         Fix #78019
7478         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7479         to nullable types.
7480
7481 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7482
7483         * aliasing.c: Fixed bug 78311.
7484
7485 2006-05-29  Martin Baulig  <martin@ximian.com>
7486
7487         * mini-exceptions.c (mono_find_jit_info): When computing the
7488         native offset, check whether we're actually inside the method's
7489         code; call mono_debug_print_stack_frame() to format the frame.
7490         (ves_icall_System_Exception_get_trace): Call
7491         mono_debug_print_stack_frame() to format the stack frame.
7492         (ves_icall_get_trace): Update to the new debugging API.
7493         (mono_jit_walk_stack_from_ctx): Likewise.
7494         (ves_icall_get_frame_info): Likewise.
7495
7496         * mini.c (get_method_from_ip): Use the new debugging API.
7497         (mono_print_method_from_ip): Likewise.
7498
7499         * exceptions-ppc.c
7500         (mono_jit_walk_stack): Use the new debugging API.
7501         (ves_icall_get_frame_info): Likewise.   
7502
7503 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7504
7505         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7506
7507 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7508
7509         * mini.c: Added "limitator" to inline for debugging.
7510
7511 2006-05-24  Martin Baulig  <martin@ximian.com>
7512
7513         * debug-debugger.c (mono_debugger_init): Create a private,
7514         malloc()-based code manager for the notification function and
7515         intentionally leak it on exit.  This fixes the crash-on-exit race
7516         condition.
7517
7518         * tramp-amd64.c
7519         (mono_debugger_create_notification_function): Added
7520         `MonoCodeManager *' argument.
7521
7522         * tramp-x86.c
7523         (mono_debugger_create_notification_function): Added
7524         `MonoCodeManager *' argument.
7525
7526 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7527
7528         * aliasing.c: Fixed 64 bit issue.
7529         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7530         default since all known bugs are fixed (one more time!).
7531
7532 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7533
7534         * mini.c: write barrier support.
7535
7536 2006-05-23  Martin Baulig  <martin@ximian.com>
7537
7538         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7539         check at the top of the file.
7540
7541 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7542
7543         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7544         reverting changes without reason and without changelog entries.
7545
7546 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7547
7548         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7549         to a few opcodes. Fixes #78439.
7550
7551         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7552         consistency with other archs.
7553
7554         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7555
7556 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7557
7558         * debug-debugger.c: fix the build.
7559
7560 2006-05-17  Martin Baulig  <martin@ximian.com>
7561
7562         * debug-debugger.c
7563         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7564         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7565         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7566         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7567
7568 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7569
7570         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7571
7572 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7573
7574         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7575         MONO_TYPE_GENERICINST.
7576         
7577         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7578         MONO_TYPE_GENERICINST.
7579
7580 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7581
7582         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7583         #78325.
7584
7585 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7586
7587         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7588         mempool.
7589         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7590
7591 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7592
7593         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7594         mono_trace_cleanup ().
7595
7596         * iltests.il: Fix problem with the newly added test.
7597
7598         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7599         due to register constraints, free up the previous hreg. Fixes #78314.
7600
7601         * iltests.il: Add new test for #78314.  
7602
7603         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7604         Interlocked.Add. Fixes #78312.
7605
7606         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7607         
7608 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7609
7610         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7611
7612 2006-05-05  Martin Baulig  <martin@ximian.com>
7613
7614         * debug-mini.c (mono_debug_open_block): New method.
7615
7616         * mini-amd64.c
7617         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7618         the beginning of each basic block.
7619
7620         * mini-x86.c
7621         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7622         the beginning of each basic block.
7623
7624 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7625
7626         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7627         default until I understand why they break the build on amd64.
7628
7629 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7630
7631         * mini.c (mini_cleanup): Call mono_cleanup ().
7632
7633         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7634         errors.
7635
7636 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7637
7638         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7639         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7640         default since all known bugs are fixed, and I cannot reproduce bug
7641         77944... I'm asking Matt Hargett to test again after this commit.
7642
7643 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7644
7645         * mini-codegen.c: Fixed typo that thrashed inline.
7646
7647 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7648
7649         * dominators.c (compute_dominators): Avoid using a worklist since
7650         it is not correct in some cases. Instead, iterate over all bblocks as
7651         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7652
7653 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7654
7655         * mini.c (mono_jit_compile_method_inner): Use
7656         mono_prepare_exception_from_error that resets the value
7657         internally.
7658
7659 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7660
7661         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7662         
7663 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7664
7665         * aliasing.c: Fixed bug 78210.
7666
7667 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7668
7669         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7670         default until all their problems (or the ones they trigger) are fixed.
7671
7672 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7673
7674         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7675         
7676         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7677         as loaded only after resolving patches since that could invoke the same method.
7678
7679         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7680
7681         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7682         functions.
7683
7684         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7685         AOT loader.
7686
7687         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7688         stack.
7689
7690         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7691         made from AOT code through the PLT table.
7692
7693         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7694         holding the plt offset when a call is made to the aot plt trampoline.
7695         
7696 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7697
7698         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7699         amd64 AOT support.
7700
7701         * Makefile.am (common_sources): Fix build breakage.
7702
7703         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7704         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7705         intra-assembly calls if possible.
7706         
7707         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7708
7709         * mini-trampolines.c: Handle PLT entries.
7710
7711         * mini.c: Avoid creating a GOT var for calls.
7712
7713         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7714         from mscorlib code.
7715
7716         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7717         from mscorlib code.
7718
7719         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7720         AOT code.       
7721
7722         * mini.h: Bump AOT file format version.
7723         
7724         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7725         covers more cases.
7726
7727 2006-04-25  Martin Baulig  <martin@ximian.com>
7728
7729         * driver.c: Disable copyprop, consprop and inline when running
7730         inside the debugger.
7731
7732 2006-04-25  Martin Baulig  <martin@ximian.com>
7733
7734         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7735         with `get_current_thread' and added `detach'.
7736         (MonoDebuggerMetadataInfo): Added `thread_size',
7737         `thread_tid_offset', `thread_stack_ptr_offset' and
7738         `thread_end_stack_offset'.
7739
7740 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7743         aot-runtime.c.
7744
7745         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7746         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7747
7748         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7749
7750         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7751
7752         * aot.c: Add support for ADJUSTED_IID.  
7753
7754 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7755
7756         * aot.c (emit_method_order): Don't align method_order_end.
7757
7758         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7759         the interface ID changes.
7760
7761 2006-04-21  Dick Porter  <dick@ximian.com>
7762
7763         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7764         cleaning up a thread.  Fixes the new part of bug 77470.
7765
7766 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7767
7768         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7769         to managed wrapper.
7770                      
7771 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7772
7773         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7774         
7775         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7776         SIGSEGV. Fixes #78072.
7777
7778         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7779         unregister our SIGABRT handler.
7780
7781 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7782
7783         * mini.c: Disabled inline where it can alter the call stack in a
7784         way visible from managed code.
7785         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7786         default.
7787
7788 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7789
7790         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7791         on other platforms. Fixes #78089.
7792
7793 2006-04-13  Martin Baulig  <martin@ximian.com>
7794
7795         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7796         determine whether we're inside the debugger.
7797
7798         * debug-debugger.h
7799         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7800
7801 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7802
7803         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7804         handler clauses. Fixes #78024.
7805
7806         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7807         in the CALL_MEMBASE opcodes. Fixes #78088.
7808         (mono_arch_get_vcall_slot_addr): Ditto.
7809
7810 2006-04-10  Martin Baulig  <martin@ximian.com>
7811
7812         * debug-debugger.c: The thread handling code has now been moved
7813         into ../metadata/threads.c.
7814
7815 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7816
7817         * driver.c (mono_main): Fix --with-gc=none build.
7818
7819         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7820         (mono_spillvar_offset_float): Ditto.
7821         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7822         hreg, not when its !global, since on ia64, there is a third category: stacked
7823         registers.      
7824
7825 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7826
7827         * mini.c: set MonoInst->klass for load field address and a few other
7828         places.
7829
7830 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7831
7832         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7833
7834 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7835
7836         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7837         the branch opt changes.
7838
7839 2006-04-06  Dick Porter  <dick@ximian.com>
7840
7841         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7842         
7843         * wapihandles.c (mini_wapi_seminfo): 
7844         * driver.c (mono_main): Add semaphore info option
7845
7846 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7847
7848         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7849         branch optimization changes. Fixes #78009.
7850
7851 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7852
7853         * mini.c: ignore accessibility of methods in managed->native wrappers.
7854
7855 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7856
7857         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7858         
7859         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7860
7861 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7862
7863         * mini.c: Modify the branch optimizations to preserve the invariant that
7864         the entries inside the in_bb and out_bb arrays are unique.
7865         (mono_unlink_bblock): Avoid creation of new arrays.
7866
7867 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7868
7869         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7870         change (#77992).
7871
7872 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7873
7874         * mini.c (optimize_branches): Remove the "optimizations" in
7875         the cbranch1/cbranch2 -> branch cases which were causing several
7876         problems in the past. Fixes #77986.
7877
7878 2006-03-31  Chris Toshok  <toshok@ximian.com>
7879
7880         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7881         default optimizations :(
7882
7883 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7884
7885         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7886         branch.
7887
7888 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7889
7890         * local-propagation.c: Added comments to structs and removed
7891         "Mono" prefixes from local tree mover types.
7892
7893 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7894
7895         * Makefile.am (arch_sources): Define this for each architecture so 
7896         libmono_la_SOURCES is defined in one place.
7897
7898 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7899
7900         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7901         from handles/.
7902
7903 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7904
7905         * driver.c: print the GC name supplied by configure.
7906
7907 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7908
7909         * local-propagation.c: Added tree mover, and moved here all the
7910         local propagation code from mini.c
7911         * mini.c: Added support for treeprop, and moved all the local
7912         propagation code to local-propagation.c
7913         * mini.h: Added support for treeprop
7914         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7915         treeprop, inline and deadce by default
7916         * Makefile.am: Added local-propagation.c
7917
7918 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7919
7920         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7921
7922 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7923
7924         * debug-debugger.c: make it compile without the Boehm GC.
7925
7926 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7927
7928         * mini.c: fixed issue with mismatch when an icall is registered
7929         with multiple names but same address.
7930
7931 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7932
7933         * declsec.c, mini-exceptions.c: use write barrier to set reference
7934         fields of managed objects.
7935
7936 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7937
7938         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7939         (can_access_internals): Fix a warning.
7940
7941         * mini.c (print_method_from_ip): Rename this to 
7942         mono_print_method_from_ip so it gets exported.
7943
7944         * trace.c: Deal with strings inside StringBuilder's containing garbage
7945         and fix memory leaks. Fixes #77848.
7946
7947 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7948
7949         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7950         fixes #77787.
7951
7952 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7953         
7954         * mini-s390.c: Remove OP_X86_TEST_NULL.
7955
7956 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7957
7958         * mini.c: use the correct GetHashCode() for the moving collector.
7959
7960 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7961
7962         * liveness.c: Regalloc spill cost tuning.
7963
7964 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7965         
7966         * mini-s390x.h: Correct S390_LONG macro.
7967
7968         * mini-s390x.c: Cleanup unused code.
7969
7970 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7971
7972         * jit-icalls.h: New file.
7973
7974         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7975         icalls and include that instead of including jit-icalls.c.
7976
7977         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7978         OP_X86 opcodes.
7979
7980 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7981
7982         * mini.c: when checking for member accessibility, also check for
7983         friend assemblies and for explicit interface implementations.
7984
7985 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7986
7987         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7988
7989         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7990
7991         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7992         common cases are done first.    
7993
7994         * mini-ops.h: Only define platform specific opcodes on the given platform.
7995
7996         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7997         branch.
7998         
7999 2006-03-14  Martin Baulig  <martin@ximian.com>
8000
8001         Revert Paolo's change from r57348:
8002
8003         * mini.h: don't use gboolean for bitfields.
8004         * mini.c: verifier changes for fields and methods accessibility.
8005
8006 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8007
8008         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8009
8010         * mini-s390x.c: Fix conv_r_un.
8011
8012         * cpu-s390, cpu-s390x.md: Fix lengths.
8013
8014 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8015
8016         * mini.c: nested types have access to all the nesting
8017         levels, not just the enclosing types.
8018
8019 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8020
8021         * mini.c: added a few more verification checks.
8022
8023 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8024
8025         * liveness.c: Merge optimizations from the linear-il branch.
8026
8027 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8028
8029         * mini-ia64.c (emit_call): Add a comment.
8030
8031         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8032
8033         * tramp-ia64.c: Fix some warnings.
8034
8035 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8036
8037         * mini.h: don't use gboolean for bitfields.
8038         * mini.c: verifier changes for fields and methods accessibility.
8039
8040 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8041
8042         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8043         lazy icall wrapper changes.
8044
8045         * dominators.c: Replace all the dominator algorithms with faster
8046         ones from the linear-il branch.
8047
8048         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8049         the mempool.
8050
8051         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8052         common cases are done first.
8053
8054         * mini-amd64.c: Fix some warnings.
8055
8056         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8057         from the mempool.
8058
8059         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8060         added code.
8061
8062         * mini.h: Add a missing prototype.
8063
8064 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8065
8066         * mini.c: Compile icall wrappers lazily.
8067
8068         * mini-codegen.c: Use printf instead of g_print since its much faster.
8069
8070         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8071         function.
8072
8073         * mini.c (optimize_branches): Cache the negative result from 
8074         remove_block_if_useless ().
8075
8076         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8077         Also fix some bblock linking issues.
8078
8079         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8080         assembly files.
8081
8082         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8083
8084         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8085         accessed fields first, for better cache behavior.
8086         
8087 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8088
8089         * mini.c: speedup IList<T> array accesses.
8090
8091 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8092
8093         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8094         inline_costs counter. Fixes #77190.
8095
8096 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8097
8098         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8099         trace messages. Fixes #77706.
8100
8101 2006-03-04  Martin Baulig  <martin@ximian.com>
8102
8103         * tramp-amd64.c, tramp-x86.c
8104         (mono_debugger_create_notification_function): Use
8105         mono_global_codeman_reserve() to allocate a buffer at runtime and
8106         return it.
8107
8108         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8109
8110         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8111         notification function at runtime and then call `initialize' in the
8112         `MONO_DEBUGGER__debugger_info' vtable.
8113
8114 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8115
8116         * iltests.il: Fix a visibility problem.
8117
8118 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8119
8120         * driver.c, mini.c: add hooks for the counters API.
8121
8122 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8123
8124         * driver.c: show disabled options.
8125
8126 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8127
8128         * linear-scan.c: always use cost-driven selection.
8129
8130 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8131
8132         * jit-icalls.c (helper_compile_generic_method): Revert change from
8133         2006-02-24.
8134
8135 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8136
8137         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8138
8139 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8140
8141         * inssel.brg: style fixes, mostly to force the updated monoburg
8142         to run for people using svn.
8143
8144 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8145
8146         * mini.c: match monoburg changes.
8147
8148 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8149
8150         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8151         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8152         declaration in the header file.
8153
8154 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8155
8156         * helpers.c: reduce relocations and mem usage.
8157
8158 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8159
8160         * mini.h, mini-codegen.c: disable logging features if
8161         requested by configure.
8162
8163 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8164
8165         * mini.c: tiny verifier changes.
8166
8167 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8168
8169         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8170         cpu-pentium.md: stack alignment changes for osx/x86,
8171         partially from Geoff Norton <gnorton@customerdna.com>.
8172
8173 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8174
8175         * jit-icalls.c (helper_compile_generic_method): Update to changes
8176         in metadata/class.c.
8177
8178 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8179         
8180         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8181         
8182         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8183         interface calls with large offsets.
8184
8185 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8186
8187         * jit-icalls.c (helper_compile_generic_method): Document the
8188         special-case we depend on so that we can inflate the method twice
8189         with the same context with no bad side-effects.
8190
8191 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8192
8193         * mini-x86.c, mini-amd64.c: fix for case when xen support
8194         is disabled.
8195
8196 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8197
8198         * mini-x86.c, mini-amd64.c: generate code to access tls items
8199         in a faster way for Xen systems.
8200
8201 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8202
8203         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8204         updates and compilation fixes for the OSX/x86 port, mostly from
8205         Geoff Norton <gnorton@customerdna.com>.
8206
8207 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8208
8209         * inssel.brg: faster interface call implementation
8210         to sync with the interface_offsets MonoVTable changes.
8211
8212 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8213
8214         * mini.c: more verification checks.
8215
8216 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8217
8218         * mini.c: added a few more verification checks.
8219
8220 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8221
8222         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8223         facility on the processor and use it if available.
8224
8225 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8226
8227         * driver.c, aot.c, mini.c: throw exception if the IL code is
8228         invalid or unverifiable.
8229
8230 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8231
8232         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8233         m.StructField.
8234
8235 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8236
8237         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8238
8239 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8240
8241         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8242         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8243         handling of instantiated generic valuetypes.
8244
8245 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8246
8247         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8248         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8249         instead.
8250
8251         * generics.2.cs: Revert the nullable reftypes tests.
8252
8253 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8254
8255         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8256         using __builtin_frame_address (1) as it doesn't work in the presence
8257         of optimizations. Hopefully fixes #77273.
8258
8259         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8260         -> generics.cs change as it doesn't work with some automake versions.
8261
8262 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8263
8264         * mini.c: handle systems that sue a different way to
8265         retrieve the stack address of the current thread.
8266
8267 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8268
8269         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8270         it specially in the makefile.
8271
8272         * generics.2.cs: Add tests for nullable reference types.
8273
8274 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8275
8276         * mini.c: always handle the case when mono_jit_init()
8277         is called in a thread different from the main thread,
8278         confusing libgc (bug #77309).
8279
8280 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8281
8282         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8283
8284 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8285
8286         * mini.c: change optimize_branches () to use a single loop
8287         and introduce a new optimization to simplify some range checks.
8288
8289 2006-02-03  Martin Baulig  <martin@ximian.com>
8290
8291         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8292         and merged with debugger_thread_manager_add_thread().
8293         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8294         inform the debugger about the main thread.
8295
8296 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * basic.cs: Add test for div.un/rem.un constant folding.
8299
8300 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8301
8302         * cpu-s390x.md: correct int_xor_imm length
8303
8304 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8305
8306         * generics.2.cs: New test for #77442.
8307
8308         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8309         #77442.
8310
8311 2006-02-02  Martin Baulig  <martin@ximian.com>
8312
8313         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8314         <mono/metadata/mono-debug-debugger.h>   
8315
8316         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8317
8318 2006-02-02  Martin Baulig  <martin@ximian.com>
8319
8320         * debug-debugger.h: New header file for debug-debugger.c.
8321
8322         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8323         function is a separate thread anymore; add support for attaching.
8324
8325 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8326
8327         * tramp-x86.c: Fix a warning.
8328
8329 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8330
8331         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8332         on very large methods.
8333
8334         * aot.c (load_patch_info): Fix a warning.
8335
8336 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8337
8338         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8339         mini-ops.h: alu membase optimizations.
8340
8341 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8342
8343         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8344         to speedup StringBuilder.
8345
8346 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8347
8348         * dominators.c (mono_compute_natural_loops): Fix detection of
8349         loop body start blocks.
8350
8351         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8352
8353 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8354
8355         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8356         #75145.
8357
8358 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8359
8360         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8361
8362 2006-01-25  Martin Baulig  <martin@ximian.com>
8363
8364         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8365         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8366         started to cleanup this file a little bit.
8367
8368 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8369
8370         * mini.c: optimize a codepath frequently happening in generics code.
8371
8372 2006-01-23  Martin Baulig  <martin@ximian.com>
8373
8374         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8375
8376         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8377         functions directly.
8378
8379         * driver.c: debug-debugger.c is only available if
8380         `MONO_DEBUGGER_SUPPORTED' is defined.   
8381
8382 2006-01-23  Martin Baulig  <martin@ximian.com>
8383
8384         * debug-debugger.c: Only enable this on platforms where the Mono
8385         Debugger is working (x86 and x86_64).
8386
8387 2006-01-21  Martin Baulig  <martin@ximian.com>
8388
8389         The Mono Debugger is now using the normal `mono' instead of the
8390         `mono-debugger-mini-wrapper' when executing managed code.
8391
8392         * debug-debugger.c: New file; previously known as
8393         debugger/wrapper/wrapper.c.
8394
8395         * debug-mini.c (mono_init_debugger): Removed.
8396
8397         * driver.c (mono_main): Added new `--inside-mdb' command line
8398         argument which is used when running inside the debugger.
8399
8400 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8401
8402         * liveness.c (mono_analyze_liveness): Remove some unused data
8403         structures.
8404
8405 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8406
8407         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8408
8409 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8410
8411         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8412         depends on implementation details of monobitset.
8413
8414         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8415         Fixes #77271.
8416
8417 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8418
8419         * liveness.c: Update after monobitset changes.
8420
8421 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8422
8423         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8424
8425 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8426
8427         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8428
8429         * mini-s390x.c: Remove warning messages.
8430
8431 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8432
8433         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8434
8435 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8436
8437         * generics.2.cs: Add ldelem/stelem_any test.
8438
8439 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8440
8441         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8442
8443 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8444
8445         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8446         
8447 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8448
8449         * generics.2.cs: Reenable vtype tests.
8450
8451         * inssel-x86.brg: Remove an icorrect valuetype rule.
8452
8453 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8454
8455         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8456         initial support for OP_ABS.
8457
8458 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8459
8460         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8461
8462 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8463
8464         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8465         conversion and implement LADD/LSUB.
8466
8467         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8468         architectures.
8469
8470 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8471
8472         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8473
8474         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8475         architectures.
8476
8477 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8478
8479         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8480         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8481         (stack walk problem).
8482
8483 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8484
8485         * aot.c (mono_aot_load_method): Fix a warning.
8486
8487 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8488
8489         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8490
8491 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8492
8493         * iltests.il: Add test for #77148.
8494
8495         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8496         #77148.
8497
8498 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8499
8500         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8501
8502 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8503
8504         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8505         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8506
8507         * basic-long.cs: Add lconv-to-r4/r8 tests.
8508
8509 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8510
8511         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8512
8513         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8514         here as on other archs.
8515
8516 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8517
8518         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8519
8520 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8521
8522         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8523         
8524         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8525
8526         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8527         instrument_prolog; Add memory_barrier instruction.
8528
8529 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8530
8531         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8532
8533 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8534
8535         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8536
8537         * aliasing.c inssel.brg: Fix warnings.
8538
8539         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8540         could skip initialization of some parts of memory.
8541
8542         * mini.c mini-ia64.c: Fix warnings.
8543
8544         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8545
8546 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8547
8548         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8549         a crash seen on sparc.
8550
8551         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8552         
8553         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8554
8555 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8556
8557         * mini-ops.h: Add s390_backchain instruction
8558
8559         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8560
8561         * cpu-s390.md: Add s390_backchain instruction
8562
8563         * mini-s390.c: Significant ABI changes
8564
8565         * mini-s390.h: Cater for zero length structures
8566
8567 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8568
8569         * mini-s390.c: ABI fixes
8570
8571         * inssel-s390.brg: Remove debug statements
8572
8573         * cpu-s390.md: Fix length of ATOMIC_xx operations
8574
8575 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8576
8577         * basic-float.cs: Add float<->long conversion tests.
8578
8579 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8580
8581         * mini-s390.c: Fix LOCALLOC processing.
8582
8583         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8584
8585 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8586
8587         * iltests.il: Add tests for some opcodes not covered by the other
8588         tests.
8589
8590 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8591
8592         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8593         register loading for Tail processing; Correct trace output.
8594
8595         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8596
8597         * cpu-s390.md: Correct size of jmp instruction. 
8598
8599 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8600
8601         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8602
8603 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8604
8605         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8606           Bring s390 up to current level.
8607
8608 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8609
8610         * generics.2.cs: Disable the newly added tests as they do not work yet.
8611         
8612         * generics.2.cs: Add valuetype tests.
8613
8614 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8615
8616         * basic-long.cs: Add i4->u8 test.
8617
8618         * objects.cs: Add tests for JIT intrinsic.
8619
8620         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8621         optimizations lost by a mistake.
8622
8623 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8624
8625         * basic-long.cs: Remove a test moved to objects.cs.
8626
8627         * arrays.cs: Add more array tests.
8628
8629 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8630
8631         * arrays.cs: Add new tests for multi-dimensional arrays.
8632
8633 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8634
8635         * Makefile.am (test_sources2): Add generics.2.cs.
8636         (EXTRA_DIST): Add test_sources2.
8637
8638 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8639
8640         Support for boxing and unboxing nullable types as well as the
8641         isinst operation on nullables, per the CLI ammendment.
8642
8643         * inssel.brg (CEE_ISINST): Special case for nullable
8644
8645         * mini.c (handle_unbox_nullable): new method
8646         (handle_box): Special case for nullable types
8647         (mono_method_to_ir): Call handle_unbox_nullable in correct
8648         places.
8649
8650         * generics.2.cs: New test suite
8651
8652         * Makefile.am: Support for regression tests with generics.
8653
8654 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8655
8656         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8657         allocated to registers. Fixes #76800.
8658
8659 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8660
8661         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8662
8663 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8664
8665         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8666         of platforms.
8667
8668 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8669
8670         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8671         objects.cs.
8672
8673         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8674         
8675         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8676 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8677
8678         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8679         single precision before storing to a single precision location.
8680
8681 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8682
8683         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8684
8685 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8686
8687         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8688         correct files.
8689
8690         * basic.cs: Remove test_0_byte_compares test which was moved to
8691         objects.cs a long time ago.
8692
8693 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8694
8695         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8696
8697 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8698
8699         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8700         handlers are called.
8701
8702         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8703         throwing code.
8704
8705          * mini-ia64.c: Add support for the throw->branch exception 
8706         optimization.   
8707
8708         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8709
8710 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8711
8712         * mini.c: Enabled "fastpath" deadce :-)
8713         
8714 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8715
8716         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8717         alias analysis pass to support it.
8718         * mini.h: Likewise.
8719         * ssa.c: Likewise.
8720         * liveness.c: Likewise (liveness computation can use aliasing
8721         information to be more accurate).
8722         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8723         moreover made so that "--compile-all" uses the given optimization
8724         flags and not the default ones.
8725         * aliasing.c: Alias analysis (new file).
8726         * aliasing.h: Likewise.
8727         * Makefile.am: added "aliasing.c" and "aliasing.h".
8728         
8729 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8730
8731         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8732         OP_L opcodes.
8733
8734 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8735
8736         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8737         fp >= end_of_stack exit condition, as it is not needed, and it might
8738         become true for fp eliminated frames.
8739
8740 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8741
8742         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8743         coded offsets.
8744
8745 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8746
8747         * mini-arm.c: fixed alignment of doubles/longs to match
8748         the C ABI (bug #76635).
8749
8750 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8751
8752         * aot.c: fix compilation with --enable-minimal=aot.
8753
8754 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8755
8756         * mini-arm.c: fixed compatibility with the new
8757         floating point emulator package for compares.
8758
8759 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8760
8761         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8762
8763 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8764
8765         * mini-exceptions.c (print_stack_frame): Output to stderr.
8766         (mono_handle_native_sigsegv): Ditto.
8767
8768 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8769
8770         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8771         OP_LCONV_TO_OVF_I implementation.
8772
8773         * mini-amd64.c: Add support for the throw->branch exception 
8774         optimization.
8775
8776         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8777         when the catch clause catches a more general exception, i.e. Object.
8778
8779 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8780
8781         * cpu-ia64.md: Remove unused opcodes.
8782
8783         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8784         specific defines for architectures defining USE_SIGACTION.
8785
8786         * mini-ia64.c: Fix some warnings.
8787
8788         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8789         version seemed to skip a frame.
8790
8791 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8792
8793         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8794         only calls which are made to native code use this flag.
8795
8796 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8797
8798         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8799         varargs methods as well.
8800         
8801         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8802         which have save_lmf set. Reorganize methods prologs a bit.
8803
8804         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8805         debugger to the proper place.
8806
8807 2005-10-29  Martin Baulig  <martin@ximian.com>
8808
8809         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8810         when running inside the debugger until the debugger has support
8811         for it.
8812
8813 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8814
8815         * mini.h: Fix a warning.
8816
8817 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8818
8819         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8820         we expose publicly, this returns the string.
8821
8822 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8823
8824         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8825         with fp elimination.
8826
8827 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8828
8829         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8830         native stacktrace using the glibc 'backtrace' function if available.
8831
8832 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8833
8834         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8835
8836         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8837         handle SIGSEGVs received while in native code.
8838
8839         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8840         code, call mono_handle_native_sigsegv which will abort the runtime
8841         after printing some diagnostics, instead of converting it into a
8842         confusing NullReferenceException.
8843
8844 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8845
8846         * cpu-pentium.md: Remove unused opcodes.
8847
8848 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8849
8850         * mini-amd64.h (MonoLMF): Add rsp field.
8851
8852         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8853         the lmf too.
8854
8855 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8856
8857         * mini-codegen.c (get_register_spilling): Fix some warnings.
8858
8859 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8860
8861         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8862         elimination during exception handling. Enable fp elimination by
8863         default.
8864
8865         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8866         elimination.
8867
8868 2005-10-16  Martin Baulig  <martin@ximian.com>
8869
8870         * mini-exceptions.c
8871         (mono_debugger_run_finally): New public method for the debugger.
8872
8873 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8874
8875         * debug-mini.c (mono_debug_init_method): Fix warning.
8876
8877         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8878         the 'exname' parameter const to fix some warnings.
8879
8880 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8881
8882         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8883         introduced by the previous patch.
8884
8885 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8886
8887         * basic-float.cs: Add test for precision of float arithmetic.
8888
8889         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8890         when loading/storing single values from/to memory.
8891
8892         * mini.c (mono_jit_compile_method_with_opt): Create the function
8893         pointers in the correct domain.
8894
8895 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8896
8897         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8898         introduced by previous patch.
8899         
8900         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8901         when out_filter_idx is NULL.
8902
8903         * mini-exceptions.c: Don't run filter clauses twice during exception
8904         handling. Fixes #75755.
8905
8906 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8907
8908         * aot.c: Add support for ldflda wrappers.
8909
8910         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8911         #75902.
8912
8913 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8914
8915         * mini.c, mini.h: do not consider exception handlers blocks when
8916         setting up interface variables.
8917
8918 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8921
8922 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8923
8924         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8925         causes a regression.
8926
8927         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8928
8929 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8930
8931         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8932         of the OP_P definitions.
8933
8934         * TODO: Add a proposal for dealing with the CEE/OP mess.
8935
8936         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8937         optimizations from the x86 port.
8938
8939         * cpu-amd64.md: Ditto.
8940
8941         * basic.cs basic-long.cs: Add tests.
8942
8943 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8944
8945         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8946         Patrik Torstensson's implementation of my exception-handling
8947         optimization idea, when the exception object is not used
8948         (bug #62150).
8949
8950 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8951
8952         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8953         of the mul_imm optimizations from the old jit.
8954
8955 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8956
8957         * mini.c, liveness.c: patch by Patrik Torstensson and
8958         Zoltan Varga to improve performance in methods with
8959         exception clauses.
8960
8961 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8962
8963         * driver.c: Remove 'Globalization' entry from --version.
8964
8965 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8966
8967         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8968         there is a profiler interested in JIT events.
8969
8970         * aot.c: Load profile files produced by the AOT profiling module, and
8971         reorder methods based on the profiling info. Add a 'method_order' table
8972         to the AOT file to make mono_aot_find_jit_info work with the reordered
8973         methods.
8974
8975         * mini.h: Bump AOT file version info.
8976
8977 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8978
8979         * mini-arm.h: work around what looks like a gcc bug when optimizations
8980         are enabled.
8981
8982 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8983
8984         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8985         conditionals.  Use ...
8986         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8987
8988 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8989
8990         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8991         to determine the amount of memory to copy when passing valuetypes.
8992
8993         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8994         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8995
8996 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8997
8998         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8999         information about aot.
9000
9001 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9002
9003         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9004         macros. This will allow a deadlock debugger to easily be plugged
9005         in.
9006
9007 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9008
9009         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9010
9011 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9012
9013         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9014         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9015         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9016         ($(arch_built)) [CROSS_COMPILING]: Error out.
9017
9018 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9019
9020         * aot.c: Add support for the no_special_static flag for classes.
9021
9022 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9023
9024         * Reapply reverted patches.
9025
9026         * *: Revert r50174 as well.
9027
9028         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9029
9030 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9031
9032         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9033
9034 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9035
9036         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9037         part of the SIG_HANDLER_SIGNATURE.  
9038
9039 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9040
9041         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9042         statistics.
9043
9044         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9045         introduced by previous patch.
9046
9047 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9048
9049         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9050         saved registers too.
9051
9052         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9053         upon the information returned by get_call_info ().
9054         
9055         * mini-x86.c (add_float): Fix stack size calculation.
9056         (mono_arch_call_opcode): Rewrite this so it works based up the
9057         information returned by get_call_info ().
9058         (mono_arch_get_this_vret_args): Ditto.
9059
9060 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9061
9062         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9063         in cinfo to determine the registers which need to be used.
9064
9065 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9066
9067         * driver.c (mono_main): Add --server and --desktop flags. 
9068
9069 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9070
9071         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9072         registers as global registers.
9073
9074         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9075         longer needed with the new register allocator.
9076
9077         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9078
9079         * cpu-ia64.md: Remove unused opcodes.
9080         
9081         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9082         
9083 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9084
9085         * cpu-amd64.md: Remove unused opcodes.
9086
9087         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9088         needed with the new register allocator.
9089
9090         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9091         reg-reg moves.
9092
9093 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9094
9095         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9096
9097 2005-09-16  Martin Baulig  <martin@ximian.com>
9098
9099         * exceptions-amd64.c
9100         (throw_exception): Don't call mono_debugger_throw_exception() if
9101         we're a rethrow - see the FIXME in the code.
9102
9103 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9104
9105         * mini.c (mono_init_exceptions): This only works on some architectures.
9106         
9107 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9108
9109         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9110         on ia64.
9111
9112         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9113
9114         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9115         now in mini-exceptions.c.
9116
9117 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9118
9119         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9120         now in mini-exceptions.c.
9121
9122 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9123
9124         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9125         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9126
9127         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9128         code into mini-exceptions.c. Add some assertions to it.
9129
9130 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9131
9132         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9133         (<software@solmersa.com>). Fix as errors on windows.
9134
9135 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9136
9137         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9138         method info into the LMF.
9139
9140 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9141         
9142         * mini-ia64.c: Add proper unwind info for method epilogs.
9143
9144         * exceptions-ia64.c: Add some code to help debugging.
9145         
9146         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9147
9148         * mini-exceptions.c: Fix warning.
9149
9150 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9151
9152         * mini.c: Really fix build.
9153
9154         * mini-x86.c mini-amd64.c: Fix build.
9155
9156 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9157
9158         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9159
9160         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9161         some Interlocked methods as intrinsics.
9162
9163         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9164         for Thread methods as well.
9165
9166         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9167
9168         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9169
9170         * mini-ia64.c mini-x86.c mini-amd64.c 
9171         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9172         OP_MEMORY_BARRIER.
9173         
9174         * mini.c (mono_init_exceptions): Fix build breakage.
9175
9176 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9177
9178         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9179         of instructions. Use the new ia64_unw_op macros for emitting unwind
9180         info.
9181
9182         * mini.c (mono_init_exceptions): Initialize exception handling
9183         related trampolines at startup.
9184
9185 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9186
9187         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9188
9189 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9190
9191         * mini.c: Handle type loading errors gracefully during compilation and
9192         throw the appropriate exception.
9193
9194 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9195
9196         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9197         for the mono binary.
9198
9199 2005-09-09  Martin Baulig  <martin@ximian.com>
9200
9201         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9202         the release.
9203
9204 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9205
9206         * mini-arm.h: use emulation for conv.r.un for the release.
9207
9208 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9209
9210         * mini-arm.c, objects.cs: more fixes and tests for them.
9211
9212 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9213
9214         * mini-arm.c: align structures to at least 4 bytes to be able
9215         to keep our current optimized memcpy.
9216
9217 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9218
9219         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9220
9221 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9222
9223         * mini.c: ignore SIGPIPE.
9224
9225 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9226
9227         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9228
9229         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9230
9231 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9234
9235 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9236
9237         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9238         exception handling support.
9239         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9240         patch by Brian Koropoff <briank@marakicorp.com>).
9241
9242 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9243
9244         * mini.c: revert another 'optimization' which breaks when
9245         items on the eval stack need to be saved at a basic block end
9246         (bug #75940).
9247
9248 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9249
9250         * jit-icalls.c: for arrays, ensure we always provide
9251         lower bounds.
9252
9253 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9254
9255         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9256         
9257         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9258
9259 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9260
9261         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9262         arguments in their original register.
9263
9264 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9265
9266         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9267         memset/memcpy.
9268
9269         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9270         when ssapre is enabled.
9271
9272         * inssel-long.brg: Fix bug in previous patch.
9273
9274         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9275         multiplication by a constant.
9276
9277 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9278
9279         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9280         icc.
9281
9282         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9283         saving registers.
9284
9285 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9286
9287         * inssel-arm.brg: apply changes tested by Brian Koropoff
9288         <briank@marakicorp.com>.
9289
9290 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9291
9292         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9293         
9294 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9295
9296         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9297         to the same register if dreg is just a base register.
9298         (print_ins): Improve printing of membase opcodes.
9299
9300         * inssel-x86.brg: Add optimized ldind(reg) rules.
9301
9302         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9303
9304 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9305
9306         * mini.c: when running under valgrind, set the stack bottom for
9307         the GC at the actual approximate stack for the app (fixes running
9308         mono with valgrind).
9309
9310 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9311
9312         * mini.c: do no break at the first valuetype to init found
9313         (fixes bug #75791).
9314
9315 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9316
9317         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9318
9319 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9320
9321         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9322
9323 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9324
9325         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9326
9327 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9328
9329         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9330
9331         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9332         code.
9333
9334         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9335         code.
9336
9337         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9338         methods.
9339
9340 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9341
9342         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9343
9344 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9345
9346         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9347         in the tail recursion optimization.
9348
9349         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9350         debug info into the assembly file.
9351
9352         * iltests.il: Add test for filter regions.
9353
9354         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9355         initial stack of filter regions. Fixes #75755.
9356
9357 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9358
9359         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9360         stack requirements.
9361
9362 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9363
9364         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9365         the check for an already compiled method on non-ia64 platforms.
9366         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9367         proper domain.
9368
9369         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9370
9371         * inssel-x86.brg: Add some optimized call rules.
9372
9373 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9374
9375         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9376         method here.
9377
9378         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9379         mono_arch_patch_delegate_trampoline.
9380
9381         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9382
9383         * mini-trampolines.c: Fix build.
9384
9385         * mini-amd64.h: Add delegate trampolines.
9386
9387         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9388
9389         * inssel-amd64.brg: Add optimized call rules.
9390         
9391         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9392
9393         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9394
9395 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9396
9397         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9398         change.
9399
9400         * mini-ia64.c: Remove LMF fixmes.
9401
9402         * mini-ia64.h: Remove most fields from LMF.
9403
9404         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9405
9406         * mini-trampolines.c: Add support for IA64 function descriptors.
9407
9408         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9409         for IA64 function descriptors.
9410
9411 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9412
9413         * tramp-arm.c: patch the vtable for virtual calls. Added
9414         support code to register/unregister the LMF.
9415         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9416         more LMF work.
9417
9418 2005-08-19  Dick Porter  <dick@ximian.com>
9419
9420         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9421         bit value if needed.
9422
9423 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9424
9425         * mini.c (mini_get_method): Move handling of wrapper data here.
9426
9427         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9428
9429         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9430         virtual.
9431
9432         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9433         bblock->code does not remain empty.
9434
9435 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9436
9437         * arrays.cs: Add regression test for #75832.
9438
9439         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9440         rules. Fixes #75832.
9441
9442         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9443         instruction scheduling.
9444
9445 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9446
9447         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9448
9449 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9450
9451         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9452
9453         * mini-codegen.c: Fix VC build.
9454
9455         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9456
9457 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9458
9459         * mini.h: fix signature for mono_register_opcode_emulation.
9460
9461 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9462
9463         * mini.c: Get rid of most of the helper_sig_... constants using
9464         mono_create_icall_signature ().
9465
9466 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9467
9468         * jit-icalls.c (helper_ldstr): New helper function.
9469
9470         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9471
9472         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9473         throw, load the string using a helper call instead of creating a string object.
9474
9475         * aot.c: Update after LDSTR changes.
9476
9477         * mini.h: Bump AOT file version.
9478         
9479         * aot.c: Save class size info into the AOT file. Print more statistics during
9480         compilation.
9481
9482         * mini.h: Bump AOT file version.
9483
9484         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9485         ordering of disasm cases. Fixes #74957.
9486
9487 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9490         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9491         the generic code needed for the ARM port.
9492
9493 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9494
9495         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9496         inssel-arm.brg: more ARM features and fixes.
9497
9498 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9499
9500         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9501         ARM port work in progress.
9502
9503 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9504
9505         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9506
9507         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9508
9509         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9510
9511         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9512
9513         * *-ia64.*: Ongoing IA64 work.
9514         
9515         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9516
9517 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9518
9519         * TODO: Remove out-of-data todo stuff.
9520
9521         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9522         dead code.
9523
9524         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9525
9526         * mini.h: Bump corlib version.
9527
9528 2005-07-27  Martin Baulig  <martin@ximian.com>
9529
9530         * mini-codegen.c
9531         (create_copy_ins): Added `const unsigned char *ip' argument; set
9532         `copy->cil_code' from it.
9533
9534 2005-07-27  Martin Baulig  <martin@ximian.com>
9535
9536         * mini-exceptions.c (mono_handle_exception): Don't call
9537         mono_debugger_handle_exception() for filters.
9538
9539 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9540
9541         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9542         as well.
9543
9544 2005-07-26  Martin Baulig  <martin@ximian.com>
9545
9546         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9547
9548         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9549         helper_compile_generic_method() if the method is actually virtual
9550         and non-final.
9551
9552 2005-07-26  Martin Baulig  <martin@ximian.com>
9553
9554         * mini.c
9555         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9556         public; this is now accessed directly by the debugger.
9557         (mono_generic_trampoline_code): Removed.
9558
9559         * debug-mini.c
9560         (mono_debug_init_method): Also add interncalls and wrappers.
9561
9562 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9563
9564         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9565
9566 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9567
9568         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9569
9570 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9573
9574 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9577         getting TLS offsets on AMD64 too.
9578
9579 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9580
9581         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9582
9583 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9584
9585         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9586         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9587
9588 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9591
9592         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9593         to mini.c.
9594
9595         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9596         mono_sparc_is_virtual_call ().
9597         
9598         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9599
9600         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9601         trampoline parameters.
9602
9603         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9604         
9605         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9606         to mono_arch_get_vcall_slot_addr.
9607
9608         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9609         trampoline code.
9610
9611         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9612
9613 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9614
9615         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9616
9617 2005-07-19  Martin Baulig  <martin@ximian.com>
9618
9619         * exceptions-amd64.c (throw_exception): Call
9620         mono_debugger_throw_exception() here like we're doing it on i386.
9621
9622 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9623
9624         * mini-ia64.c: Add optimized TLS access support.
9625
9626 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9627
9628         * mini-exceptions.c: Ongoing IA64 work.
9629
9630         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9631
9632         * mini.c: Use the default optimization set when embedding. Fixes
9633         #75194.
9634
9635 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9636
9637         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9638         of trampolines to a separate file.
9639
9640         * mini-trampolines.c: New file.
9641
9642         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9643         separate file.
9644         
9645         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9646         amd64/ia64 code.
9647
9648         * mini-codegen.c: Fix cygwin build.
9649
9650 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9651
9652         * mini.c: Add some minor changes needed by the IA64 port.
9653
9654         * *-ia64.*: Ongoing IA64 work.
9655
9656 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9657
9658         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9659         trampolines into arch-independent and arch-dependent parts.
9660
9661         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9662
9663 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9664
9665         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9666
9667         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9668         the xp-regalloc-branch for amd64.
9669
9670         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9671         xp-regalloc-branch for x86.
9672
9673 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9674
9675         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9676
9677 2005-07-06  Martin Baulig  <martin@ximian.com>
9678
9679         * mini.c
9680         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9681         (mono_jit_runtime_invoke): Likewise.
9682
9683 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9684
9685         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9686         on x86 too.
9687         
9688         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9689         without loading their metadata. Reorganize the file format so exception handling+
9690         debug info is kept separate from normal method info. Create MonoJitInfo 
9691         structures for methods lazily.
9692
9693         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9694         loading metadata.
9695         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9696
9697         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9698
9699         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9700         in AOT code.
9701
9702         * mini.h: Bump AOT file version.
9703
9704 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9705
9706         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9707
9708 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9709
9710         * Makefile.am (check-local): Call semdel-wrapper.
9711
9712 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9713
9714         * mini-x86.c: Revert the last change as it seems to break the build..
9715
9716 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9717
9718         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9719         
9720         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9721
9722 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9723
9724         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9725         outside of the macro, so strange stuff doesn't happen with gcc4
9726         (NEW_AOTCONST_TOKEN): Likewise.
9727
9728 2005-06-28  Martin Baulig  <martin@ximian.com>
9729
9730         * mini.c (mini_class_is_system_array): New static method; use this
9731         instead of `klass->parent == mono_defaults.array_class' everywhere
9732         since this also works for the new generic array class.
9733
9734 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9735
9736         * inssel.brg: Remove warnings.
9737
9738 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9739
9740         * mini-ia64.c: Ongoing IA64 work.
9741
9742         * basic-float.cs: Add float->i1 conversion test.
9743
9744         * iltests.il: Add conv.u4 test.
9745
9746 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9747
9748         * inssel-long.brg: Fix bug caused by last change.
9749
9750 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9751
9752         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9753         BSDs.  Allows the x86 JIT to work on OSX86
9754
9755 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9758         u4->i8 conversion.
9759
9760         * mini-ia64.c: Ongoing IA64 work.
9761
9762 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9763
9764         * mini-ia64.c: Ongoing IA64 work.
9765
9766         * driver.c: Clean up jit_code_hash as well when using --regression.
9767
9768         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9769
9770         * basic-long.cs: Add tests for long->u4 conversion.
9771
9772 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9773
9774         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9775         that we do not depend on undefined C behavior: the order stuff
9776         gets evaluated within an expression. Fixes mono when compiled on
9777         GCC 4.
9778
9779 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9780
9781         * *-ia64.*: Ongoing IA64 work.
9782
9783         * aot.c: Lower memory usage while loading AOT methods.
9784
9785         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9786
9787         * mini.h: Bump AOT file format version.
9788
9789 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9790
9791         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9792
9793 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9794
9795         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9796         not on callee assembly). Fixed some comments.
9797
9798 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9799
9800         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9801         it gets proper disassembly.
9802         (emit_method_info): Remove some dead code.
9803
9804         * mini.c (mini_method_compile): Allways allocate the GOT var in
9805         mono_method_to_ir for emulating opcodes.
9806
9807 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9808
9809         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9810         before freeing the code memory. Fixes #74990.
9811
9812         * objects.cs: Add regression test for #74992.
9813
9814         * liveness.c: Extend live ranges of arguments to the beginning of the
9815         method. Fixes #74992.
9816
9817         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9818         so it points into the faulting instruction.
9819
9820 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9821
9822         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9823
9824         * *-ia64.*: Ongoing IA64 work.
9825
9826         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9827
9828 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9829
9830         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9831
9832         * *-ia64.*: Ongoing IA64 work.
9833
9834 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9835
9836         * basic-long.cs: Add tests for add/sub.ovf.
9837
9838         * basic.cs: Add tests for sub.ovf.
9839
9840         * *-ia64.*: Ongoing IA64 work.
9841
9842 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9843
9844         * *-ia64.*: Ongoing IA64 work.
9845
9846         * basic.cs: Add conv.ovf.i4.un test.
9847
9848 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9849
9850         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9851         
9852 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9853
9854         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9855
9856 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9857
9858         * *-ia64.*: Ongoing IA64 work.
9859
9860 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9861
9862         * trace.[ch]:
9863         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9864
9865 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9866
9867         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9868
9869 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9870
9871         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9872
9873         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9874         of a call is callable by a near call.
9875
9876 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9877
9878         * mini-ia64.c: Ongoing IA64 work.
9879
9880 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9881
9882         * genmdesc.c: Make the generated array non-static.
9883
9884         * inssel-long.brg: Fix LSHR_IMM rule.
9885
9886         * *-ia64.*: Ongoing IA64 work.
9887
9888         * *-ia64.*: Ongoing IA64 work.
9889
9890 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9891
9892         * *-ia64.*: Ongoing IA64 work.
9893
9894         * *-ia64.*: Ongoing IA64 work.
9895         
9896         * mini-ia64.c: Ongoing IA64 work.
9897
9898         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9899
9900 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9901
9902         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9903         
9904         * objects.cs basic-long.cs: Move some tests to objects.cs.
9905
9906 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9907
9908         * *-ia64.*: Ongoing IA64 work.
9909
9910         * iltests.il: Add a new test.
9911
9912         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9913         newobj. Fixes #75042.
9914
9915 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9916
9917         * *-ia64.*: Ongoing IA64 work.
9918         
9919         * *-ia64.*: Ongoing IA64 work.
9920         
9921         * *-ia64.*: Ongoing IA64 work.
9922
9923         * basic.cs objects.cs: Move tests accessing static variables as well.
9924
9925         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9926
9927 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9930
9931         * driver.c: Always print failed tests.
9932
9933         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9934         frame pointer.
9935
9936         * *ia64*: Ongoing IA64 work.
9937
9938 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9939
9940         * basic.cs: Add tests for add.ovf. Fix warnings.
9941
9942 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9943
9944         * driver.c (mono_main): Avoid crash if no argument is passed to
9945         --break;  Do not use g_error, but f_printf.   And fix all other
9946         ocurrences of the same crash.
9947
9948 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9949
9950         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9951         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9952         Fixes #74742.
9953
9954 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9955
9956         * *-ia64.*: Add beginnings of IA64 backend.
9957
9958         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9959
9960 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9961
9962         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9963         Fixes #74925.
9964
9965         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9966
9967         * mini-amd64.c: Fix a warning.
9968
9969 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9970
9971         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9972         in float_neg. Fixes #74897.
9973
9974         * mini-amd64.c (emit_call): Fix another near call bug.
9975
9976 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9977
9978         * declsec.c: Keep the appdomain information in the structure. Added a 
9979         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9980         value gets overwritten).
9981         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9982         an MonoAppDomain member to MonoSecurityFrame.
9983         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9984         used in the stack walk. Now use a MonoArray which grow (double) when
9985         it gets full.
9986
9987 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9988
9989         * mini.c: Re-enabled runtime cleanup, since running threads should
9990         now properly stop when exiting.
9991
9992 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9993
9994         * mini-codegen.c: New file contaning the arch-independent local
9995         register allocator. Not used by any architectures yet.
9996
9997         * mini.h linear-scan.c: Merge some changes from the 
9998         mini-xp-local-regalloc branch.
9999
10000 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10001
10002         * mini-amd64.c (emit_call): Fix calls to native functions when the
10003         runtime is compiled as a shared library. Fixes #74756.
10004
10005         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10006         on a literal field. Fixes #74751.
10007
10008 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10009
10010         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10011
10012 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10013
10014         * objects.cs: Add missing null casting test.
10015
10016 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10017
10018         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10019         in wrapper methods. Also rename 'address' variable to 'offset'.
10020
10021 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10022
10023         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10024         warnings.
10025         
10026         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10027
10028         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10029         work on windows.
10030
10031 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10032
10033         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10034
10035 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10038         just the last bytes.
10039
10040 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10041
10042         * aot.c (mono_compile_assembly): Fix warning.
10043
10044         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10045         by the _MSC_VER stuff.
10046
10047 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10048
10049         * inssel-long.brg: Fix #74588.
10050
10051         * cpu-amd64.md: Fix #74591.
10052
10053         * iltests.il: Add new regression tests.
10054
10055 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10056
10057         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10058         valuetype.
10059
10060 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10061
10062         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10063
10064         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10065         from Bill Middleton <flashdict@gmail.com>.
10066
10067 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * arrays.cs: Add new regression test. Fix warnings.
10070
10071 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10072
10073         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10074         and leakage in CKFINITE.
10075
10076         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10077         this to a null op since it is called on amd64 too.
10078
10079         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10080
10081         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10082         body since this is not used on amd64.
10083         
10084         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10085
10086         * mini-amd64.c: Remove obsolete fixmes.
10087
10088         * mini.c (print_method_from_ip): Fix debugging support.
10089
10090 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10091
10092         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10093         so that expressions that don't give much gain are not reduced.
10094         * ssapre.h: Likewise.
10095
10096 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10097
10098         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10099
10100         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10101
10102         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10103
10104 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10105
10106         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10107
10108         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10109
10110 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10111
10112         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10113         stack touching.
10114
10115         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10116
10117         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10118
10119         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10120
10121         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10122         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10123
10124         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10125
10126         * mini-x86.c: Fix up stack overflow handling.   
10127
10128         * exceptions.cs: Add new regression test.
10129
10130 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10131
10132         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10133         mono_jit_thread_attach.
10134
10135         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10136
10137 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10138
10139         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10140         avoid calling constructors using callvirt.
10141
10142         * inssel.brg: Fix #74073.
10143
10144 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10145
10146         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10147         compilation with non-GCC compilers.
10148         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10149         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10150
10151 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10152
10153         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10154         klass->interface_offsets (will likely fix bug#74073).
10155
10156 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10159
10160 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10161
10162         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10163         to amd64_div_reg_size ().
10164         
10165         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10166
10167 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10168
10169         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10170
10171 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10172
10173         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10174
10175 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10176
10177         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10178         
10179         * mini.c (mono_precompile_assembly): Load and precompile referenced
10180         assemblies as well. Fixes #74015.
10181
10182 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10183
10184         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10185
10186 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10187
10188         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10189         a lot of checks and (anyway) permissions cannot work until corlib is 
10190         loaded.
10191
10192 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10193
10194         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10195
10196 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10197
10198         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10199         calls (fixes bug#72824).
10200
10201 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10202
10203         * mini.c: fix tail recursion elimination (see test in bug#73936).
10204
10205 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10206
10207         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10208         some fp functions in sse2 mode.
10209
10210 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10211
10212         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10213
10214 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10215
10216         * mini.h mini.c: Add mono_get_jit_tls_key ().
10217
10218         * mini-x86.c: Enable fast TLS support on windows.
10219
10220 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10221
10222         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10223         * mini.c: Check for p/invoke method when generating code. If a
10224         p/invoke method, or it's class, isn't decorated with [Suppress
10225         UnmanagedCodeSecurity] then generate code to call System.Security.
10226         UnmanagedDemand (only if the security manager is active).
10227
10228 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10229
10230         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10231         last change as it seems to cause strange crashes.
10232         
10233 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10234
10235         * *.c: handle unsafe function pointers where needed.
10236
10237 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10238
10239         * mini.c (mono_jit_free_method): Remove the fixme too.
10240
10241 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10242
10243         * mini.c: As discussed, make the code actually free the delegate
10244         thunk now, to enable the debugging of delegate problems, use
10245         MONO_DEBUG=1 when running Mono. 
10246
10247         This takes also care of parts of the leaks as seen by Joe.
10248
10249 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10250
10251         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10252         thread_tls_offset calculation.
10253
10254 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10255
10256         * declsec.c: Reworked linkdemand checks for icall. The previous code
10257         was using the declaration code (untrusted) and didn't work as expected
10258         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10259         specific case.
10260
10261 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10262
10263         * iltests.il: Add new localloc test.
10264
10265         * mini-amd64.c: Handle large stack allocations the same way as on
10266         windows if stack overflow handling is working.
10267         
10268         * mini-amd64.c: Allocate the signal stack using mmap.
10269
10270         * mini.c (sigsegv_signal_handler): Fix reading of context.
10271
10272         * mini-exceptions.c: Fix up stack overflow handling.
10273
10274         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10275
10276         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10277
10278         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10279
10280         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10281
10282         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10283         tramp_init functions as they are no longer needed.
10284
10285 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10286
10287         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10288         
10289         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10290
10291         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10292         
10293         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10294         support that now.
10295
10296         * mini-ops.h: Add OP_LMUL_IMM.
10297
10298         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10299         long mul/div opcodes as intrinsic.
10300
10301         * mini-amd64.c (emit_call): Handle the case when the callee might be
10302         an AOT method.
10303
10304 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10307         extra safe.
10308         
10309         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10310
10311         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10312
10313 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10314
10315         * mini.c (mono_codegen): Don't leak here, to help people running
10316         monogrind.
10317
10318 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10321         conversions in sse2 mode.
10322
10323         * basic-float.cs: Add regression test.
10324         
10325         * mini-amd64.c: Reenable sse2.
10326
10327 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10328
10329         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10330
10331 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10332
10333         * driver.c: Copyright text should include 2005.
10334         
10335 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10336
10337         * cpu-amd64.md (load_membase): Fix more max lengths.
10338
10339 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10340
10341         * cpu-amd64.md (load_membase): Fix max length.
10342
10343         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10344
10345         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10346
10347         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10348         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10349
10350         * basic-float.cs: Add rounding regression test.
10351
10352         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10353
10354 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10355
10356         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10357         structures in registers for pinvoke wrappers.
10358
10359 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10360
10361         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10362
10363 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10364
10365         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10366         wrapper to mono_jit_thread_attach.
10367
10368         * mini.c (mini_jit_thread_attach): New jit icall.
10369
10370         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10371         native->managed wrappers.
10372
10373         * exceptions.cs: Add new regression test.
10374
10375         * mini.c (optimize_branches): Check regions in the cbranch to throw
10376         block case as well. Fixes #73242.
10377
10378 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10379
10380         * mini.c: thread safety fixes.
10381
10382 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10383
10384         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10385         patching stuff, since delegates use jump trampolines so there is
10386         no caller.
10387
10388         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10389         jump trampolines.
10390         
10391         * tramp-amd64.c: Fix build.
10392
10393         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10394         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10395
10396         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10397         Rename this to mono_arch....
10398         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10399
10400         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10401
10402         * mini-amd64.c (emit_call): If both the caller and the callee is
10403         guaranteed to have 32 bit addresses, emit a normal call.
10404
10405         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10406
10407         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10408         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10409         method_ptr inside delegates.
10410
10411 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10412
10413         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10414         invalidated. Fixes #73001.
10415
10416         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10417
10418         * mini-x86.c: Only use stdcall for pinvokes on windows.
10419
10420 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10421
10422         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10423         * mini-x86.c: remove unreliable __thread var offset detection,
10424         use the correct accessors and enable by default.
10425
10426 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10427
10428         * mini.c (mono_jit_free_method): Fix memory leak.
10429
10430 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10431
10432         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10433
10434 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10435
10436         * cpu-amd64.md: Fix lengths of atomic opcodes.
10437
10438 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10439
10440         * driver.c: try to not imply using ICU is any good.
10441
10442 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10443
10444         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10445         functions as inline ops.
10446
10447         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10448         some Interlocked functions as inline ops.
10449
10450         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10451
10452         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10453
10454         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10455
10456         * mini.c: Add support for OP_NOT_TAKEN.
10457
10458         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10459         structures in registers for pinvoke wrappers.
10460
10461         * mini-amd64.c: Fix warnings.
10462
10463 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10464
10465         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10466
10467         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10468
10469         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10470         address instead of loading the address from it.
10471
10472         * mini-x86.c: Add support for returning small structs in registers
10473         on Win32. Fixes part of #70864.
10474         
10475 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10476
10477         * trace.c (get_token): Improve error checking.
10478
10479 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10480
10481         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10482
10483 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10484  
10485         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10486         it can be reused for MonoClass.
10487         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10488         _LINKDEMAND.
10489
10490 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10491
10492         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10493         instead of a MonoReflectionMethod. The method information wasn't used
10494         when displaying SecurityException details (but will be now).
10495
10496 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10497
10498         * Makefile.am : windows build fix.
10499
10500 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10501
10502         * iltests.il: Add new regression test.
10503
10504         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10505         #72522.
10506
10507 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10508  
10509         * mini.c: Moved linkdemand check into helper function check_linkdemand
10510         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10511         LDFTN, LDVIRTFTN).
10512
10513 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10514
10515         * declsec.c: Added statistics counter for different kinds of 
10516         LinkDemands.
10517         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10518         (and commented) declaration.
10519         * mini.c: Added statistics counter for security Demand code 
10520         generation. Added display of security statistics.
10521
10522 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10523
10524         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10525         Fix compilation errors under gcc-2.95.
10526
10527 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10528
10529         * mini.c, driver.c: Use the new jit trampoline hashtable
10530
10531 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10532
10533         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10534
10535 2005-02-11  Martin Baulig  <martin@ximian.com>
10536
10537         * debug-mini.c (mono_debug_close_method): Free the line number array.
10538
10539 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10540
10541         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10542         icalls.
10543
10544         * mini.h: Bump AOT file format version. 
10545
10546 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10547
10548         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10549         APTC and P/Invoke.
10550         * declsec.h: Added macros to get/set lazyly initialized security 
10551         informations about assemblies. Added new enum for different type of
10552         possible LinkDemand violation. Added function to check LinkDemands.
10553         * mini.h: Added a field to MonoCompile to hold any security violation
10554         detected when JITting a method (so it can be thrown later).
10555         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10556         and CEE_CALLVIRT. Added code to throw exception at the end of
10557         mini_method_compile (note: the exception is unhandled right now).
10558
10559 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10560
10561         * mini.c, jit-icalls.c: use the managed implementation of
10562         memset for initobj and memset, to avoid managed <-> unmanaged
10563         transitions.
10564
10565 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10566
10567         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10568         optimization if it would need a GOT var.
10569
10570         * basic.cs: Add tests for constant propagation and switch statements.
10571
10572         * ssa.c: Fix out-of-range constant propagation and switch statements.
10573
10574 2005-02-09    <vargaz@freemail.hu>
10575
10576         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10577
10578 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10579
10580         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10581
10582 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10583
10584         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10585
10586 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10587
10588         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10589         arithmetic operations.
10590
10591 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10592
10593         * mini-ppc.c: add a workaround for broken user code that
10594         DllImports vararg functions with non-vararg signatures.
10595
10596 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10597
10598         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10599         meaningfull error message for assemblies written in Managed C++.
10600
10601         * tramp-amd64.c mini-amd64.h: Add support for 
10602         create_trampoline_from_token ().
10603
10604         * aot.c mini-x86.c abcremoval.c: Applied patch from
10605         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10606
10607 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10608
10609         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10610         which takes a MonoImage/token as parameter instead of a MonoMethod.
10611
10612         * aot.c: Use the new trampoline for initializing vtables.
10613
10614         * aot.c: Add support for ldfld/stfld_remote wrappers.
10615
10616         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10617         rules for compare <MEM>, IMM.
10618
10619         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10620
10621         * aot.c: Handle inherited finalizers correctly.
10622
10623 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10624
10625         * inssel.brg (stmt): Add a missing _setup_... ().
10626
10627         * aot.c: Save some parts of the class state to the AOT file and use it
10628         to recompute that state when a class is initialized.
10629
10630         * mini.c: Install AOT hooks into the runtime.
10631
10632         * mini.h: Bump AOT file format version.
10633         
10634         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10635         Fixes #72148.
10636
10637         * iltests.il: Add new test.
10638
10639 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10640
10641         * mini.c: fix typo.
10642
10643 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10644
10645         * mini.c: setup the statistical profiler in the thread attach
10646         callback to cope with the new single thread code.
10647
10648 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10649
10650         * mini-ppc.c: ensure we have enough room for the profiler
10651         calls (fixed bug#72084).
10652
10653 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10654
10655         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10656         it.
10657
10658 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10659
10660         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10661
10662 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10663
10664         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10665         to succesfully execute parrotbench).
10666         * ssapre.h: Likewise.
10667
10668 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10669
10670         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10671         variable for stores to method arguments (fixes a SSAPRE issue).
10672
10673 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10674
10675         * mini.c: handle value types in dup, fixes gen-112.cs.
10676
10677 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10678
10679         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10680         sequence for calls in dynamic methods to avoid thunks.
10681
10682 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10683
10684         * mini.c: correctly remove dynamic methods from the hashtable.
10685
10686 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10687
10688         * driver.c: Disabled SSAPRE until fix the bug that appears
10689         in IronPython's parrotbench.
10690
10691 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10694
10695         * mini.c (mono_method_to_ir): Revert the previous change.
10696         
10697         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10698         when AOT compiling.
10699
10700         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10701         mono_jit_info_table_find () etc. when running under valgrind.
10702
10703         * inssel.brg: Fix warnings.
10704
10705         * mini-exceptions.c: Fix warnings.
10706
10707 2005-01-31  Martin Baulig  <martin@ximian.com>
10708
10709         * driver.c (compile_all_methods_thread_main): Don't try to compile
10710         generic methods or anything which has type parameters.
10711
10712 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10713
10714         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10715
10716         * TestDriver.cs: Add --verbose flags.
10717
10718         * graph.c ssa.c: Fix 64 bit warnings.
10719         
10720         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10721         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10722         Fix 64 bit warnings.
10723
10724         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10725         variable not spotted by gcc.
10726         
10727         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10728         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10729         X86_COMPARE_MEMBASE opcodes.
10730
10731         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10732
10733 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10734
10735         * *: MonoMethod->signature might be NULL now. You *MUST* use
10736         mono_method_signature.
10737
10738 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10739
10740         * driver.c (compile_all_methods_thread_main): Compile the methods
10741         without invoking cctors.
10742
10743 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10744
10745         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10746         * basic-calls.cs: test for the above.
10747
10748 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10749
10750         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10751         MonoJitInfo changes.
10752
10753 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10754
10755         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10756         eagerly if it contains dynamic methods.
10757         
10758         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10759
10760         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10761         trace, it is now computed by an icall from trace_ips.
10762         
10763         * mini-exceptions.c: Fix a warning.
10764
10765 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10766
10767         * mini-exceptions.c: don't bother getting stack trace info if
10768         it's not going to be used.
10769
10770 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10771
10772         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10773         ssapre-mini-ops.h.
10774
10775 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10776
10777         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10778
10779         * aot.c: Avoid calling mono_method_get_header () if not needed.
10780
10781         * mini.h: Bump AOT file format version.
10782         
10783         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10784
10785         * mini.c (mono_print_tree): Print more info for calls.
10786
10787 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10788
10789         * declsec.h: Remove warning by adding missing include for marshal.h
10790
10791 2005-01-26  Martin Baulig  <martin@ximian.com>
10792
10793         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10794         `ip' twice.
10795
10796 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10797
10798         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10799         flags.
10800
10801         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10802
10803         * aot.c (mono_compile_assembly): Fix a warning.
10804
10805 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10806
10807         * declsec.c: Look for security attributes on the original MonoMethod 
10808         (and not the wrapped one). This fix permissions on icalls.
10809
10810 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10811
10812         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10813
10814         * mini.c (mono_allocate_stack_slots): Add a fixme.
10815
10816         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10817
10818 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10819
10820         * inssel.brg: optimize casts of sealed types (more
10821         optimizations waiting for fixes in remoting).
10822
10823 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10824
10825         * inssel.brg (stmt): Add another dummy rule.
10826
10827         * driver.c: Fix warnings.
10828
10829         * driver.c (mono_main): If running under valgrind, instruct glib to use
10830         the system allocation functions so valgrind can track the memory
10831         allocated by the g_... functions.
10832
10833         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10834
10835         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10836
10837         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10838
10839         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10840         variables in try regions.
10841
10842         * mini.c (mini_method_compile): Don't disable optimizations on large
10843         methods when AOT compiling.
10844
10845         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10846         allocate stack slots. Not yet used.
10847
10848 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10849
10850         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10851
10852 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10853
10854         * mini-ppc.c: make the branch info relative as the code
10855         buffer can be reallocated.
10856
10857 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10858
10859         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10860         * driver.c: Removed the AOT/security restriction. Now initialize the
10861         security manager (in metadata) if --security is used.
10862         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10863         rather than the pointer to declarative security, when AOT is used.
10864
10865 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10866
10867         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10868         basic blocks, reduced intrinsic exception throwing code size.
10869
10870 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10871
10872         * driver.c (mini_usage): Reorder the usage screen.
10873
10874 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10875
10876         * mini.c (mono_resolve_patch_target): Fix warning.
10877
10878 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10879
10880         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10881         previous patch.
10882
10883         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10884
10885         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10886         breaks the amd64 build.
10887
10888         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10889         register allocation. Fixes #71454.
10890
10891         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10892
10893         * arrays.cs: Add new regression test.   
10894
10895 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10896
10897         * ssapre.c: Turned usage of snprintf to GString.
10898         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10899         (I left it on by mistake in my previous commit).
10900
10901 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10902
10903         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10904         on cond branch optimization (fixes bug# 71515).
10905
10906 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10907
10908         * abcremoval.c: Fixed bug 71062.
10909         * abcremoval.h: Likewise.
10910
10911 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10912
10913         * mini.c: Added a new functionality to optimize_branches, the removal
10914         of useless basic blocks, and fixed some problem in the removal of
10915         critical edges; some utility functions added for both purposes.
10916         * ssapre.c: Added complex expression support, and fixed bug 70637.
10917         * ssapre.h: Likewise.
10918         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10919         enabled in SSAPRE.
10920         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10921         * driver.c: Re-enabled SSAPRE.
10922
10923 2005-01-19  Martin Baulig  <martin@ximian.com>
10924
10925         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10926         the result of mono_get_method_constrained().
10927
10928 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10929
10930         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10931         manager.
10932
10933 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10934
10935         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10936         be detected.  Fixes #59296.
10937
10938 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10939
10940         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10941         which can happen. Fixes #71361.
10942
10943 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10944
10945         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10946         manager.
10947
10948 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10949
10950         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10951         appdomain-unload.exe to fail.
10952         
10953         * mini.c: Fix some memory leaks.
10954
10955 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10956
10957         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10958         Fixed bug and sped up some codepaths.
10959
10960 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10961
10962         * mini.c: Fix some memory leaks.
10963
10964         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10965         conversion.
10966
10967         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10968
10969         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10970         #71320.
10971
10972         * iltests.il: Add regression test for #71320.
10973
10974 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10975
10976         * mini.c (mono_codegen): Fix installation of profiler hooks.
10977
10978         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10979
10980 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10981
10982         * mini.h, mini.c, cfold.c: optimize access to enum
10983         readonly fields, too. Eval conditional branches if possible
10984         to perform unreachable code removal in more cases.
10985
10986 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10987
10988         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10989
10990         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10991         code manager.
10992
10993         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10994         WinXP DEP. Fixes #71244.
10995
10996 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10997
10998         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10999
11000 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11001
11002         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11003
11004 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11005
11006         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11007         changes.
11008
11009         * mini.h: Bump AOT version.
11010
11011         * mini.h (MonoCompile): Change exvar to a hash table.
11012
11013         * mini.c: Allocate a separate exvar for each handler block.
11014
11015         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11016
11017         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11018         ex var with the pending exception and only throw if the two are equal.
11019         Fixes #68552.
11020         
11021         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11022
11023         * mini-x86.c: Fix warnings.
11024
11025         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11026         used by all the ports now.
11027
11028         * aot.c: Add write-symbols and save-temps options.
11029
11030 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11033
11034 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11035
11036         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11037         operations.
11038
11039         * tramp-s390.c: Check vtable slot belongs to the domain.
11040
11041         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11042         as per other platforms.
11043
11044         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11045
11046 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11047
11048         * driver.c: we don't run the Main() code in a subthread anymore.
11049
11050 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11051
11052         * mini.c: added experimental rtc support in the statistical
11053         profiler: if the user has the permission, more accurate statistics
11054         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11055         The MONO_RTC value must be restricted to what the linux rtc allows:
11056         power of two from 64 to 8192 Hz.
11057
11058 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11059
11060         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11061
11062 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11063
11064         * mini-ppc.c: better icache flush for smp.
11065
11066 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11067
11068         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11069
11070         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11071         amd64 port, not yet used.
11072
11073 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11074
11075         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11076         a struct type.
11077
11078 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11079
11080         * driver.c: Added --security option to activate the security manager.
11081         Right now this will allow code generation for declarative demands and
11082         is disabled when AOT is specified.
11083         * mini.c: Add code generation for declarative security demands.
11084         * mini.h: Add mono_use_security_manager as an extern gboolean.
11085
11086 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11087
11088         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11089         emitting more dense assembly code.
11090
11091         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11092         exception throwing stuff.
11093
11094 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11095
11096         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11097         dead code.
11098
11099         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11100         left in by mistake.
11101
11102         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11103         fixed.
11104
11105         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11106
11107         * tramp-*.c: Only patch vtable slots if the object is in the current
11108         domain. Fixes appdomain-unload.exe.
11109
11110         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11111         
11112         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11113         x86 branch.
11114
11115 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11116
11117         * mini.c (reverse_branch_op): New helper function.
11118
11119         * mini.c (optimize_branches): Run the new optimization only on 
11120         platforms which support it. Also reverse all kinds of branches.
11121
11122         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11123
11124         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11125         a throw statement.
11126
11127         * mini.c (optimize_branches): Reverse not-equals branches if the false
11128         bblock is a throw. This happens a lot of time with argument checking in
11129         corlib.
11130
11131         * mini.c (mono_codegen): Add support for placing basic blocks after
11132         the function epilogue.
11133
11134         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11135         function epilogue.
11136         
11137 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11138
11139         * mini.c (setup_stat_profiler): Only set this up if the platform
11140         supports ITIMER_PROF.
11141
11142 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11143
11144         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11145         previous patch.
11146
11147         * inssel.brg: Fix a warning.
11148
11149 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11150
11151         * mini.c: added support for statistical profiler 
11152         (run with: --profile=default:stat).
11153
11154 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11155
11156         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11157
11158         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11159
11160         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11161         related to global registers from the amd64 port.
11162
11163 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11164
11165         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11166
11167         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11168         with global registers.
11169         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11170
11171         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11172
11173 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11174
11175         * debug-mini.c (encode_value): Fix off-by-one.
11176
11177         * aot.c (encode_value): Likewise.
11178
11179         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11180
11181 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11182
11183         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11184         AOT.
11185
11186         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11187         
11188         * aot.c (emit_method_info): Increase size of temp buffer.
11189
11190         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11191         the AOT case.
11192
11193 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11194
11195         * aot.c (emit_method_info): Fix build.
11196         
11197         * aot.c: Further rework of the AOT file format to reduce the size of
11198         the method info data.
11199
11200         * mini.h: Bump AOT file format version.
11201
11202 2004-12-27  Martin Baulig  <martin@ximian.com>
11203
11204         * mini.c (mini_get_method): New static method; call
11205         mono_get_method_full() and mono_get_inflated_method().
11206         (mono_method_to_ir): Use mini_get_method() instead of
11207         mono_get_method_full(). 
11208
11209 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11210
11211         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11212
11213 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11214
11215         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11216
11217         * inssel-amd64.brg: Add some optimization rules.
11218
11219 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11220
11221         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11222         standard not GC'd stuff is fine.
11223
11224 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11225
11226         * aot.c: Rework the AOT file format to get rid of most of the global
11227         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11228
11229         * mini.h: Bump AOT file format version.
11230         
11231 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11232
11233         * mini.h: Bump AOT file format version.
11234
11235         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11236         address is inside a GOT.
11237
11238         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11239
11240         * cpu-pentium.md: Increase the maximum size of some instructions which
11241         might involve a got access.
11242         
11243         * mini.c (get_method_from_ip): Another debug helper function.
11244
11245         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11246         when got var accesses are created during the decompose phase.
11247
11248         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11249
11250         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11251         argument mini_compile_method and to MonoCompile, and use this to
11252         determine whenever a given method is compiled for AOT. This allows the
11253         other methods compiled during AOT compilation to be free of AOT stuff,
11254         so the backends does not need to add special support for them by
11255         creating a fake GOT etc.
11256
11257         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11258         longer needed.
11259
11260 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11261
11262         * mini.c (mono_method_to_ir): It turns out that some of the
11263         x-appdomain wrappers are lax with types, so just ignore this for
11264         all wrappers.
11265
11266         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11267         at the vtable->klass. If it is non-shared code we can just use the
11268         vtable.
11269
11270 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11271
11272         * mini-ppc.c: access MonoDomain from tls, too.
11273
11274 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11275
11276         * declsec.c: Removed unused variable (and related warning ;-)
11277
11278 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11279
11280         * iltests.il: New test for LDELEMA on an array of ref types.
11281
11282         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11283         all ldelema's on reftypes.
11284         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11285         it was the wrong place to put it.
11286
11287         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11288         register to pop to make this cleaner, at the request of Paolo.
11289
11290 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11291
11292         * mini-ops.h (OP_GETHASHCODE): New op.
11293
11294         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11295
11296         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11297         operation.
11298
11299         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11300         by 25%.
11301         
11302         * mini-x86.c (mono_arch_output_basic_block): Rather than
11303
11304         add ebp, 4
11305
11306         Emit
11307
11308         pop edx
11309
11310         The first is 3 bytes while the second is 1. This saves 36 kb on
11311         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11312         see a small boost because of icache locality.
11313
11314         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11315
11316 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11317
11318         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11319         started code sharing with the generic code.
11320
11321 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11322
11323         * mini-ppc.c, cpu-g4.md: added code for direct access to
11324         tls data slots.
11325
11326 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11327
11328         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11329          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11330         to OP_TLS_GET.
11331
11332 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11333
11334         * declsec.c|h: Added functions to cache the declarative stack modifiers
11335         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11336         structure.
11337         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11338         created. Register internal calls for System.Security.SecurityFrame::
11339         _GetSecurityFrame and _GetSecurityStack.
11340         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11341         the definitions for the new stack walk/callback mechanism.
11342         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11343         first security frame for LinkDemands and InheritanceDemands) and
11344         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11345         from lupus.
11346         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11347         walk initialization (lupus).
11348
11349 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11350
11351         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11352         idiom.
11353         (handle_loaded_temps): Do not create a temporary variable for
11354         things that we know are temps. They will never be modified.
11355         (mono_spill_call): Set MONO_INST_IS_TEMP
11356         (mono_emulate_opcode): ditto
11357         (emit_tree): ditto
11358         (mono_method_to_ir.CEE_DUP): ditto
11359
11360 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11361
11362         * mini.c (type_to_eval_stack_type): Make this handle the void type
11363         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11364         (emit_tree): use ip_in_bb to special case some common idioms
11365         Update all callers to pass in the IP.
11366         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11367
11368         This gives us a nice 2% speedup in mcs bootstrap.
11369
11370         * mini-x86.c (peephole_pass): Peephole pass to make
11371         mov  [foo], eax
11372         push [foo]
11373
11374         into
11375
11376         mov [foo], eax
11377         push eax
11378
11379         * mini.c (ip_in_bb): new method.
11380         (mono_method_to_ir): use this method rather than doing the hash
11381         lookup ourselves.
11382
11383         * linear-scan.c (mono_linear_scan): When expiring actives, you
11384         don't need to keep around variables that expire on this
11385         instruction. This makes it so that:
11386              a = b + 1
11387         will turn into:
11388              store (ebx add (ebx, 1))
11389         which will become
11390              add ebx, 1
11391
11392 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11393
11394         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11395         combination to avoid doing two copies. Fix up problems with previous
11396         patch.
11397
11398         * mini.c: Fix 64 bit warnings.
11399
11400         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11401
11402 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11403
11404         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11405         changes from the x86 code.
11406
11407         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11408
11409 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11410
11411         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11412         throwing code to reduce its size, unify the AOT and non-aot code and 
11413         get rid of relocations in the AOT case.
11414
11415         * mini-x86.h mini.c exceptions-x86.c 
11416         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11417         raise corlib exceptions which doesn't require relocations in the 
11418         caller.
11419
11420         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11421
11422 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11425         needed.
11426
11427         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11428         in the AOT case.
11429
11430 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11431
11432         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11433         with add function when used from Inc/dec atomic 
11434         functions. Re-enabled optimization on x86.
11435         * mini-ops.h: renamed atomic_add functions to
11436         allow _add to match the Interlocked::Add and
11437         _add_next to match Interlocked::Inc/Dec.
11438
11439 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11440
11441         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11442         linking of BBs to the end BB, and enabled SSAPRE also with
11443         consprop and copyprop (which was prevented by that bug).
11444
11445 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11446
11447         * mini-x86.c: disabling the Interlocked optimizing code. 
11448
11449 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11450
11451         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11452         file version check.
11453         
11454 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11455
11456         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11457         interlocked optimization due lack of support on x86, rewrote 
11458         exchange to take into account that base may be in eax.
11459         
11460         xsp works again; activated Interlocked optimizing code.
11461         
11462 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11463
11464         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11465
11466 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * mini-ops.h: Add new opcodes.
11469
11470         * mini.h: Add new patch types. Add got_var to MonoCompile.
11471
11472         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11473         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11474         make it work with all kinds of patchable code.
11475
11476         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11477         address of the GOT, and referencing entries in the GOT.
11478
11479         * mini.c: Add code to load the GOT address if needed by an opcode.
11480
11481         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11482         independent AOT code on the x86 using an elf-style Global Offset Table.
11483
11484 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11485
11486         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11487
11488 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11489
11490         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11491         when running xsp.
11492
11493 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11494
11495         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11496         of Interlocked:Increment/Decrement/Add as inline ops.
11497         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11498
11499 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11500
11501         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11502         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11503
11504 2004-12-12  Duncan Mak  <duncan@ximian.com>
11505
11506         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11507         again. `patch_info->table_size' is no longer valid after Zoltan's
11508         commit #37636.
11509
11510 2004-12-12  Martin Baulig  <martin@ximian.com>
11511
11512         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11513         if we are the "real" method, ie. not an inlined method inside it.
11514
11515 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11516
11517         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11518         before we look in the special fields table. This fixes
11519         ../tests/thread-static-init.cs.
11520
11521 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11522
11523         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11524         for Array get_Rank and get_Length. Fixes bug #70465.
11525
11526 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11527
11528         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11529         separate structure to reduce the size of MonoJumpInfo.
11530
11531 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11532
11533         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11534
11535 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11536
11537         * mini.c (mini_get_inst_for_method): Changed to allow ports
11538         to return a MonoInst instead of opcode 
11539         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11540         
11541         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11542         Allow ports to return a created MonoInst instead of op-code, will enable
11543         new optimizations.
11544         (renamed mini_get_opcode_for_method to better reflected the functionality)
11545
11546 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11547
11548         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11549
11550 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11551
11552         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11553         Fixes #69985.
11554
11555 2004-12-08  Martin Baulig  <martin@ximian.com>
11556
11557         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11558         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11559
11560 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11561
11562         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11563         correctly.
11564
11565         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11566         arithmetic.
11567
11568 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11569
11570         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11571
11572 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11575         bug introduced by the previous patch.
11576
11577 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11578
11579         * mini-ppc.c, objectc.cs: handle large structs passed by value
11580         (fixes bug #69972).
11581
11582 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11583
11584         * mini-ppc.c: OP_ARGLIST implementation from
11585         Geoff Norton  <gnorton@customerdna.com>.
11586
11587 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11588
11589         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11590         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11591
11592 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11593
11594         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11595
11596 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11597
11598         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11599         support.
11600
11601 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11602
11603         * mini-sparc.c: Zero out localled-ed memory.
11604
11605         * iltests.il: Add tests for zeroing out localloc-ed memory.
11606
11607 2004-12-04  Martin Baulig  <martin@ximian.com>
11608
11609         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11610         mono_method_get_signature_full().       
11611
11612 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11613
11614         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11615         and some utility functions (always for SSAPRE), integrated SSAPRE.
11616         * mini.h: Likewise.
11617         * driver.c: Added ssapre option.
11618         * ssa.c: Small fix on OP_ARG handling.
11619         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11620         * Makefile.am: Likewise.
11621
11622 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11623
11624         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11625         now in the xp code.
11626
11627         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11628         icall.
11629
11630 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11631
11632         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11633         
11634         * cpu-s390.md : Increase instruction length of oparglist.
11635
11636         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11637
11638 2004-11-30  Martin Baulig  <martin@ximian.com>
11639
11640         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11641         virtual generic methods.  We call a special helper_compile_generic_method()
11642         icall to retrieve the method from the vtable, inflate and compile
11643         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11644
11645         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11646
11647 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11648
11649         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11650
11651 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11652
11653         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11654         Fixes #69929.
11655
11656 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11657
11658         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11659         platforms with PIC aot.
11660
11661 2004-11-28  Martin Baulig  <martin@ximian.com>
11662
11663         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11664         Fixes gen-112.cs.
11665
11666 2004-11-28  Martin Baulig  <martin@ximian.com>
11667
11668         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11669         the result of mono_type_get_underlying_type() to check whether
11670         we're byref.
11671
11672 2004-11-26  Martin Baulig  <martin@ximian.com>
11673
11674         * mini.c
11675         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11676         in the g_assert().
11677
11678 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11679
11680         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11681         the same way as the other arguments so they won't get clobbered.
11682
11683         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11684         calls through R11 since it is clobbered by the trampoline code.
11685
11686 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11687
11688         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11689         pick up in-tree mscorlib.dll.
11690
11691 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11692
11693         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11694
11695         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11696         runtime data/code are now stored in a table similar to the GOT in ELF. 
11697         This allows the code itself to be position independent.
11698
11699         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11700         loading changes.
11701
11702         * aot.c: Attach ELF type (object/function) directives to all global
11703         symbols.
11704
11705         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11706
11707         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11708
11709         * mini-amd64.h: Turn on PIC AOT code.
11710
11711         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11712         returning the offset within an OP_AOTCONST instruction where the GOT
11713         offset needs to be added.
11714
11715         * mini.h: Bump AOT file format version.
11716
11717 2004-11-25  Martin Baulig  <martin@ximian.com>
11718
11719         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11720         uninflated generic methods.
11721
11722 2004-11-25  Martin Baulig  <martin@ximian.com>
11723
11724         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11725
11726 2004-11-24  Martin Baulig  <martin@ximian.com>
11727
11728         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11729         original klass (this only applies for generic instances).
11730
11731 2004-11-24  Martin Baulig  <martin@ximian.com>
11732
11733         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11734         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11735         that array).
11736
11737 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11738
11739         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11740         localloc. Fixes #69678.
11741
11742         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11743         
11744 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11745
11746         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11747         used SSE registers on pinvoke calls. Fixes #69774.
11748
11749 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11750
11751         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11752         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11753
11754 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11755
11756         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11757         Refer directly to the mcs/ tree.
11758
11759 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11760
11761         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11762         Check if a trampoline for a synchronized method is required. 
11763
11764 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11765
11766         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11767         with localloc if needed. Throe arithmetric exception in
11768         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11769         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11770
11771 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11772
11773         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11774         types before switching on type.  Fixes #69622.
11775
11776 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11777
11778         * Makefile.am (check-local): New.  Integrate into 'make check'.
11779         (MCS,RUNTIME): Define using in-tree mono and mcs.
11780         (ILASM): New.
11781         (%.exe): Use $(ILASM).
11782
11783 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11784
11785         * mini-ppc.c: adjust initial prolog size (bug #69691).
11786
11787 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11788
11789         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11790         #69664.
11791
11792 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11793
11794         * Makefile.am (clean-local): Rename from 'clean'.
11795
11796 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11797
11798         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11799         to mono_arch_is_int_overflow. 
11800         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11801         SIGFPE events.
11802
11803 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11804
11805         * declsec.c|h: New files to support declarative security attributes.
11806         Added function to check if a method has (applicable) security.
11807         * mini.c|h: Add check for declarative security attributes in
11808         mono_method_check_inlining.
11809         * Makefile.am: Added declsec.c and declsec.h to the build.
11810
11811 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11812
11813         * mini.c, mini.h: update to keep dynamic code info per-domain.
11814
11815 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11816
11817         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11818         (mini_init): Get rid of it from here too.
11819
11820 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11821
11822         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11823         implemented OP_RETHROW (patch by Geoff Norton
11824         <gnorton@customerdna.com>).
11825
11826 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11827
11828         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11829         between appdomains.  Fixes appdomain-unload on PPC.
11830
11831 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11832
11833         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11834         mini-exceptions.c: handle the new wrapper types.
11835         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11836         token value as a MonoClass* when compiling a wrapper.
11837         mono_jit_create_remoting_trampoline now takes an additional
11838         MonoRemotingTarget parameter.
11839         
11840 2004-11-10  Martin Baulig  <martin@localhost>
11841
11842         * mini.c (mono_method_to_ir): Use `generic_container->context'
11843         rather than creating a new one.
11844
11845 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11846
11847         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11848
11849         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11850
11851 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11854         the experimental aot cache stuff.
11855
11856 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11857
11858         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11859         mini-exceptions.c: update to exception clause structure changes.
11860
11861 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11862
11863         * exceptions-x86.c (throw_exception): Fix warnings.
11864
11865         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11866         for OP_RETHROW.
11867
11868 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11869
11870         * exceptions-sparc.c (get_throw_exception): Really fix this.
11871
11872 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11873
11874         * tramp-*.c: we no longer support icalls without wrappers, so
11875         a bit of code can be removed here
11876
11877 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11878
11879         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11880         patch.
11881
11882         * cpu-sparc.md: Add op_rethrow.
11883
11884         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11885
11886         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11887
11888         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11889         * mini-ops.h: Add OP_RETHROW.
11890
11891         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11892
11893         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11894
11895 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11896         
11897         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11898         Makes the output much easier to read
11899
11900 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11901
11902         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11903         prevents another huge leak when compiling with ssa. Secondly, the
11904         performance of doing this rather than freeing the lists is much
11905         better. GList does a lock every time you allocate a list link,
11906         so that it can use a memory pool. So, it is better to just use
11907         a memory pool of our own.
11908         
11909         * ssa.c, linear-scan.c: replace g_list_remove_link with
11910         g_list_delete.  The remove one does not free the GList, so we were
11911         leaking memory. On -O=all --compile-all with corlib, this cut down
11912         3 MB of allocations.
11913
11914 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11915
11916         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11917
11918         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11919
11920         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11921         into a new function mono_create_jit_trampoline ().
11922
11923 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11924
11925         * trace.c (get_spec): Allow tracing of classes without a namespace.
11926
11927 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11928
11929         * mini.c: Fix pointer overwrite in mini_method_compile.
11930
11931 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11932
11933         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11934         The darwin ABI needs some special handling for 1 and 2 byte structs
11935         Lets use lbz/lhz instead of lwz everywhere.
11936         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11937         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11938         Use stb/sth for the former, and put the latter always on stack instead of in
11939         argument registers.
11940
11941 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * trace.c (is_filenamechar): Add '_'.
11944
11945 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11946
11947         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11948
11949         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11950
11951 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11952
11953         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11954         depends on libmonogc. Fixes #68805.
11955
11956 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11957
11958         * mini.c (mono_jit_free_method): Provide extra information for
11959         this error.  Currently this leaks, but will be turned into a
11960         developer option in the future.
11961
11962 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11963
11964         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11965
11966 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11967
11968         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11969         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11970         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11971
11972 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11973
11974         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11975         trampolines for AOT code.
11976
11977 2004-10-22    <vargaz@freemail.hu>
11978
11979         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11980         constructed types. Fixes #68136.
11981
11982 2004-10-21  Martin Baulig  <martin@ximian.com>
11983
11984         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11985         if it returns true, unwind the stack to the call instruction.
11986
11987 2004-10-21    <vargaz@freemail.hu>
11988
11989         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11990
11991         * mini.h: Bump AOT version number.
11992
11993         * objects.cs: Add another test for unbox trampolines.
11994
11995         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11996         valuetype methods.
11997
11998 2004-10-20    <vargaz@freemail.hu>
11999
12000         * driver.c: Add SHARED to the set of optimizations tested.
12001
12002         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12003
12004         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12005         used by CEE_NEWARR.
12006
12007         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12008
12009 2004-10-20  Martin Baulig  <martin@ximian.com>
12010
12011         * mini-exceptions.c (mono_handle_exception): Call
12012         mono_debugger_handle_exception() to tell the debugger about
12013         catch/finally clauses.
12014
12015 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12016
12017         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12018
12019         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12020         #68447.
12021
12022 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12023
12024         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12025         methods as their native size, fixed bug #57543, #57545.
12026         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12027         This saves a temporary register and mullw call down into 1 (minor perf
12028         increase for cases like sum = sum * 5;  This use to translate into:
12029             li r11,5
12030             mullw r28,r28,r11
12031         It now translates to
12032             mulli r28,r28,5
12033
12034 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12035
12036         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12037         #68388.
12038
12039 2004-10-11  Martin Baulig  <martin@ximian.com>
12040
12041         * mini.c (mono_method_to_ir): If we're a generic method, get the
12042         MonoGenericContainer from our MonoMethodNormal and create a
12043         MonoGenericContext from it.
12044
12045 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12046
12047         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12048
12049         * basic-long.cs: Add test for checked i8->i2 cast.
12050
12051 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12052
12053         * inssel-ppc.brg: added a couple of speedup rules.
12054
12055 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12056
12057         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12058         to speed up rebuilds.
12059
12060 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12061
12062         * mini-s390.c: Minor fix to OP_OR_IMM.
12063
12064 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12065
12066         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12067         better. Fixes appdomain-unload.exe on sparc.
12068
12069 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12070
12071         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12072         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12073         see bug 67324.
12074
12075 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12076
12077         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12078
12079 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12080
12081         * mini.c: Always generate a field read/write wrapper for members
12082         of the class MarshalByRefObject since the actual instance could
12083         be a CBO.
12084
12085 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12086
12087         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12088
12089 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12090
12091         * driver.c mini.h trace.c: Move the setting of the main assembly into
12092         a separate function called mono_trace_set_assembly () and call it after
12093         actually loading the main assembly. Fixes #66872.
12094
12095 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12096
12097         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12098         using the code manager.
12099
12100 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12101
12102         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12103
12104 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12105
12106         * cpu-amd64.md: Fix bug in previous patch.
12107         
12108         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12109         #66650.
12110
12111 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12112
12113         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12114         mini-exceptions.c: updates for changed stack walk interface.
12115
12116 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12117
12118         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12119
12120 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12121
12122         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12123
12124 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12125
12126         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12127         since assemblies can't be unloaded.
12128         
12129 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12130
12131         * cpu-amd64.md: Fix more instruction lengths.
12132
12133         * cpu-amd64.md: Fix lengths of some instructions.
12134
12135 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12136
12137         * inssel.brg: Make the array ldelema check aot friendly.
12138
12139 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12140
12141         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12142
12143         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12144
12145 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12146
12147         * mini-x86.c: Fix build.
12148
12149         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12150         mono_type_get_underlying_type () helper function to simplify code.
12151         
12152 2004-09-09  Martin Baulig  <martin@ximian.com>
12153
12154         * mini-amd64.c: Don't access `type->data.klass' directly, call
12155         mono_class_from_mono_type() instead since the type may be a
12156         generic instance.
12157
12158 2004-09-09  Martin Baulig  <martin@ximian.com>
12159
12160         * mini-amd64.c (get_call_info): Fix support for generic instances.
12161         (add_valuetype): Use mono_class_from_mono_type() to get the class
12162         since we can be a generic instance.
12163
12164 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12165
12166         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12167
12168 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12169
12170         * liveness.c: reset spill costs on each scan: bug 62107
12171
12172 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12173
12174         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12175         unnecessary line that doesn't compile
12176
12177 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12178
12179         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12180         trampolines, make them call an error function so people can fix their
12181         code.
12182
12183 2004-09-06  Martin Baulig  <martin@ximian.com>
12184
12185         * mini.c (mono_method_to_ir): When initializing locals, handle a
12186         generic instances like a valuetype if it's a valuetype and like a
12187         class if it's a class.
12188
12189 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12190
12191         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12192         stack. Fixes #64674.
12193
12194         * exceptions.cs: Add test for unwinding of call arguments.
12195
12196 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12197
12198         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12199         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12200         set the carry/borrow flag). The sparc and s390 implementations
12201         can now use optimized versions (and simplify the code). ppc bugfixes.
12202
12203 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12204
12205         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12206
12207 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12208
12209         * inssel-amd64.brg: Remove leftover 32 bit rule.
12210
12211         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12212
12213 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12214
12215         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12216         mono_arch_find_jit_info functions into a new function. Fix a memory
12217         leak.
12218
12219         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12220         refactored code.
12221         
12222 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12223
12224         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12225         as well.
12226         
12227         * exceptions.cs: Add array size tests.
12228
12229         * mini.c: Allocate a separate icall wrapper for each arity of 
12230         mono_array_new_va. Fixes #59509.
12231
12232         * exceptions.cs: Add testcase for 64578.
12233
12234         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12235
12236         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12237         
12238 2004-09-02  Martin Baulig  <martin@ximian.com>
12239
12240         * mini.c (mono_method_to_ir): When initializing the locals, call
12241         handle_initobj() on the generic instance itself, not its
12242         underlying type.
12243
12244 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12245
12246         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12247         MonoJitInfo for dynamic methods.
12248
12249         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12250
12251         * mini.c: Add support for freeing JIT data for dynamic methods.
12252         
12253 2004-09-01  Martin Baulig  <martin@ximian.com>
12254
12255         * mini-x86.c (is_regsize_var): Added support for generic
12256         instances.
12257         (mono_arch_emit_prolog): Make this compile again, use
12258         `x86_push_imm_template (code)'.
12259
12260 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12261
12262         * mini-x86.c: make all push_imm instructions that get
12263         patched always emit the long form
12264
12265 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12266
12267         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12268         in a per-domain hash.
12269
12270         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12271         types.
12272
12273 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12274
12275         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12276         work.
12277         
12278         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12279         work.
12280
12281         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12282         Beginnings of SSE2 support.
12283
12284         * exceptions.cs: Add more tests for checked int<->uint casts.
12285
12286 2004-08-28  Martin Baulig  <martin@ximian.com>
12287
12288         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12289         generic instances.
12290
12291         * mini.c
12292         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12293         Handle generic instances recursively.
12294
12295 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12296
12297         * iltests.il: test for conv.u8 on a constant
12298
12299 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12300
12301         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12302         LCONV_x4 (shrun_32 (membase)).
12303
12304 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12305
12306         * inssel-x86.brg: c&p rules for push/setret of long
12307
12308 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12309
12310         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12311         compare (regvar, base)
12312
12313         * inssel-x86.brg: more burg love
12314
12315         * inssel.brg: more cleanup
12316
12317         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12318
12319 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12320
12321         * basic-long.cs, basic-calls.cs: new tests for optimization.
12322
12323 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12324
12325         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12326         patch.
12327
12328 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12329
12330         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12331         
12332 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12333
12334         * inssel.brg (mini_emit_memcpy): use 
12335         NO_UNALIGNED_ACCESS to disable memcpy optimization
12336
12337 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12338
12339         * mini-amd64.c: Handle generic types in various places.
12340
12341         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12342
12343 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * mini.c (handle_box): Fix warning.
12346
12347         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12348
12349         * mini-amd64.h: Enable the emit_state optimization.
12350
12351         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12352
12353         * mini-amd64.c: Add some new 64 bit peephole opts.
12354
12355         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12356
12357         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12358
12359         * mini-amd64.c: Register allocator fixes.
12360
12361         * mini.c: Add an optimization to emit_state to avoid allocation of new
12362         registers on some platforms.
12363
12364 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12365
12366         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12367
12368         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12369         allocation. Fixes #63085.
12370
12371         * basic-long.cs: Add new regression test.
12372
12373         * mini-amd64.c: Register allocator improvements.
12374
12375 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12376
12377         * mini-amd64.c (read_tls_offset_from_method): Add another code
12378         sequence.
12379
12380         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12381         instruction sequence for nullifying class init trampolines.
12382
12383         * objects.cs: Add new regalloc test.
12384
12385         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12386
12387 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12388
12389         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12390         
12391         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12392         arguments.
12393
12394         * driver.c: Fix profiling after TLS changes.
12395         
12396         * driver.c (mono_main): Set mono_stats.enabled if needed.
12397
12398         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12399         CEE_BOX.
12400
12401 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12402
12403         * mini-x86.c: use a 1 op rather than a 2 op tls access
12404         instruction -> faster.
12405
12406 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12407
12408         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12409         x86 backend.
12410
12411 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12412
12413         * exceptions-sparc.c (throw_exception): fix typo
12414
12415 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12416
12417         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12418         set tree->dreg correctly with tls. Allow any
12419         register to be used.
12420
12421         * mini-x86.c (read_tls_offset_from_method): add new code
12422         generation pattern seen with GCC.
12423
12424
12425 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12426
12427         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12428         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12429         exceptions-sparc.c: fix some performance issues in exception
12430         handling and setting of the stack trace for exceptions that were
12431         already thrown.
12432
12433 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12434
12435         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12436         x86 backend.
12437         
12438         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12439         registers.
12440
12441 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12442
12443         This patch inlines tls access, when possible.
12444         
12445         * mini.h: new arch functions for TLS intrinsics.
12446         All platforms updated with a stub.
12447
12448         * mini.c: use the new intrinsics
12449
12450         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12451         arch specific intrinsic for tls variables
12452
12453 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12454
12455         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12456         under windows.
12457
12458 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12459
12460         * mini.c: thread local allocation
12461
12462 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12463
12464         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12465
12466         * Makefile.am: Link against the static version of libmonogc.
12467         
12468         * Makefile.am: Link the static versions of the convenience libraries
12469         into the mono executable.
12470
12471         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12472
12473 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12474
12475         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12476         on integer overflow.
12477
12478         * mini-amd64.c: Reorganize function call code.
12479
12480         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12481
12482 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12483
12484         * inssel-x86.brg: use xor eax,eax.
12485         
12486         * basic.cs: new tests
12487
12488 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12489
12490         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12491         in exception throwing code.
12492         
12493 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12494
12495         * inssel-x86.brg: use xor esi,esi.
12496
12497 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12498
12499         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12500         can trace methods compiled during mini_init () too.
12501
12502         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12503         CEE_CONV_U4.
12504
12505 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12506
12507         * Makefile.am: static link on x86 (r=zoltan)
12508
12509 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12510
12511         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12512         code since it causes some programs to fail.
12513
12514 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12515
12516         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12517
12518 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12519
12520         * mini.c: ovfops_op_map - add STACK_OBJ case for
12521         CONV_I 
12522         * basic.cs: add test_0_pin_string as test
12523         case for above.
12524
12525 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12526
12527         * Makefile.am: build C# if srcdir != builddir
12528
12529 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12530
12531         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12532         fall-through blocks.
12533
12534 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12535
12536         * driver.c: enable loop by default again and include abcrem in -O=all.
12537
12538 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12539
12540         * iltests.il: Add some localloc tests.
12541
12542         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12543
12544         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12545         Fixes #62574.
12546
12547         * inssel-amd64.brg: Add some optimizations.
12548
12549         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12550         for gcc-3.4.
12551
12552         * Makefile.am: Statically link mono against libmono on AMD64.
12553         
12554         * mini-amd64.c inssel-amd64.brg: Optimizations.
12555
12556 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12557
12558         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12559
12560         * tramp-amd64.c: Patch calling code in trampolines.
12561
12562 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12563
12564         * mini-amd64.c: pinvoke struct passing fixes.
12565
12566 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12567
12568         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12569         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12570
12571 2004-08-05  Duncan Mak  <duncan@ximian.com>
12572
12573         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12574         CEE_LDELEM_ANY.
12575
12576 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12577
12578         * mini-amd64.c (emit_move_return_value): Move return value for normal
12579         calls too.
12580
12581 2004-08-05  Martin Baulig  <martin@ximian.com>
12582
12583         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12584         `type->type'; just modify `type' itself when dealing with enums
12585         and generic instances.
12586         (check_call_signature): Make `simple_type' a `MonoType *'.
12587
12588 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12589
12590         * mini.c: Use OP_PADD to add offsets to addresses.
12591
12592         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12593
12594 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12595
12596         * mini-sparc.c (mono_arch_emit_epilog): fix check
12597         for folding last op into restore instruction
12598
12599 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12600
12601         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12602         helper methods using the code manager.
12603         
12604         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12605
12606         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12607
12608 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12609         
12610         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12611           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12612
12613         * mini-s390.c: fix tail processing
12614
12615 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12616
12617         * mini-ppc.c: mul.ovf.un exception name fix.
12618
12619 2004-08-03  Martin Baulig  <martin@ximian.com>
12620
12621         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12622         instances; before jumping to `handle_enum', also modify `ptype'.
12623
12624 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12625
12626         * cpu-sparc.md: fcall maximal length too small.
12627
12628 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12629
12630         * mini-amd64.c mini.h: Add initial support for passing/returning 
12631         structures to/from pinvoked methods.
12632
12633 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12634
12635         * mini-ppc.c: reg allocator fix.
12636
12637 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12640
12641         * inssel.brg: Optimize memset on 64 bit machines.
12642
12643         * mini-amd64.c: Fix some vararg cases.
12644
12645 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12646
12647         * mini-s390.c: Corrected macro in emit_float_to_int
12648
12649         * s390-abi.cs: Tests to exercise the s390 ABI
12650
12651 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12652
12653         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12654         caller saved regs.
12655
12656         * basic.cs: Add a test for add.ovf.un.
12657
12658 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12659
12660         * mini-sparc.c: add case for OP_IDIV_UN
12661
12662 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12665         
12666         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12667
12668 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12669
12670         * basic.cs: regression tests.
12671
12672         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12673         regressions.
12674
12675 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12676
12677         * basic.cs: Add a new test.
12678
12679         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12680         and AOT. Various fixes and optimizations.
12681
12682         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12683
12684 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12685
12686         * mini-ppc.c: make sure temp regs are not used for global reg
12687         allocation.
12688
12689 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12690
12691         * cpu-sparc.md: conv_i8 fix for 64bits
12692
12693         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12694
12695 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12696         
12697         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12698         add opcode for cmp BYTE PTR [eax], imm.
12699
12700         * inssel.brg: Make memcpy and memset takes bases.
12701
12702 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12703
12704         * *-amd64.*: More AMD64 work.
12705         
12706 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12707
12708         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12709         add a compare-not-equal opcode.
12710         
12711 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12712
12713         * mini.c: Use mono_init_from_assembly instead of mono_init.
12714         
12715 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12716
12717         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12718
12719         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12720
12721         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12722
12723         * inssel.brg: 64 bit fixes.
12724
12725         * mini.h (MonoCallInst): Add some AMD64 specific data.
12726
12727         * mini.h: Add some OP_P opcodes.
12728
12729 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12730
12731         * basic.cs: tests for 61797 and 61740
12732
12733 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12734
12735         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12736         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12737
12738 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12739
12740         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12741
12742         * *-amd64*.*: Ongoing AMD64 work.
12743
12744 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12745
12746         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12747
12748         * *-amd64*: Ongoing AMD64 work.
12749
12750         * mini-arch.h: Add AMD64 support.
12751
12752         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12753
12754         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12755
12756         * mini-ops.h: Add new opcodes.
12757
12758         * Makefile.am: Add AMD64 support.
12759
12760         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12761         rules into the inssel-long*.brg files.
12762
12763         * *-amd64.*: Add beginnings of AMD64 backend.
12764
12765 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12766
12767         * mini.c (print_dfn): commenting out the code that prints
12768         the cil. With -O=deadce, this makes -v -v crash.
12769         
12770         * cpu-pentium.md: make checkthis have a length of 2
12771
12772 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12773
12774         * mini-sparc.h: fix implementations of __builtin
12775         functions for Sun compiler for V9.
12776
12777 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12778
12779         * mini.c: use the new stelem.ref wrapper
12780         * exceptions.cs, arrays.cs: new stelem.ref tests
12781
12782 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12783
12784         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12785         new XSP should work with these changes).
12786
12787 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12788         
12789         * inssel-{long32,x86,}.brg: trivial optimizations.
12790         
12791 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12792
12793         * mini.c: load value when emitting box operation in
12794         constrained calls.
12795
12796 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12797
12798         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12799         is one byte shorter than cmp DWORD PTR [eax], 0.
12800
12801 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12802
12803         * inssel-ppc.brg: arguments on the stack are always
12804         relative to the stack pointer (spotted by Neale Ferguson).
12805
12806 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12807
12808         * exceptions-x86.c: delay appending the method name to the trace until
12809         after mono_jit_info_table_find is called, as this gets the real
12810         MonoMethod.
12811
12812 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12813
12814         * aot.c: register roots
12815
12816 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12817
12818         * aot.c : I could just use PLATFORM_WIN32 flag.
12819
12820 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12821
12822         * aot.c : Reverting the previous fix. This time it broke linux build.
12823
12824 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12825
12826         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12827
12828 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12829
12830         * mini.c (handle_stack_args): Remove some more debugging code.
12831         
12832         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12833
12834         * driver.c mini.h aot.c: Allow additional options to be specified with
12835         --aot and pass them to mono_compile_assembly.
12836
12837         * aot.c: Add experimental code to AOT compile all loaded assemblies
12838         on demand and save the code into a cache in the filesystem.
12839
12840         * aot.c: Add support for more wrapper methods.
12841         
12842         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12843         58863.
12844
12845         * cpu-*.md: Remove removed opcodes.
12846
12847         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12848         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12849         related icalls to marshal.c.
12850
12851 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12852
12853         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12854
12855         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12856
12857         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12858
12859 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12860         * liveness.c: If liveness is recomputated we need to reset the information
12861         for each variable. This way, if the liveness range has been narrowed
12862         by optimizations that happened after the last computation, we can return
12863         a smaller range.
12864         
12865         For example, if you have
12866         
12867         {
12868                 int i = 0;
12869                 
12870                 // Tons of code that does not affect i
12871                 
12872                 i = foo ();
12873                 ...
12874         }
12875         
12876         i = 0 is dead code and will be removed by SSA. However, when
12877         linear scan gets to the code, i will still appear to be live
12878         throughout the entire block. This prevents good register allocation.
12879
12880 2004-07-06  Martin Baulig  <martin@ximian.com>
12881
12882         * debug-mini.c (mono_debug_init_method): Allow
12883         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12884         (mono_debug_add_icall_wrapper): New method.
12885
12886         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12887
12888 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12889
12890         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12891         optimization.
12892
12893 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12894
12895         * aot.c (mono_aot_load_method): Fix loading of debug info.
12896
12897 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12898
12899         * aot.c: Add logging support.
12900
12901 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12902
12903         * mini.h: Add prototype for mono_print_method_from_ip.
12904
12905         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12906
12907         * inssel.brg: 64 bit fixes.
12908
12909         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12910         inssel-long32.brg.
12911
12912         * Makefile.am: Add SPARC64 support.
12913
12914 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12915
12916         * aot.c: Fix alignment problems on 32 bit platforms.
12917
12918 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12919
12920         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12921         SPARC64.
12922
12923         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12924         problems.
12925
12926         * mini.h: Bump AOT file version. Some 64 bit fixes.
12927
12928 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12929
12930         * inssel-sparc.brg: Add new rule to avoid register moves.
12931
12932         * inssel.brg: Add ldind_to_load_membase helper function.
12933
12934 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12935
12936         * mini.c: OffsetToStringData intrinsic.
12937         
12938 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12939
12940         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12941
12942         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12943         regression tests.
12944
12945         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12946 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12947
12948         * mini.c: reinstated mono_compile_get_interface_var()
12949         on x86, too, since the change breaks the Gtk# build there as well.
12950
12951 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12952
12953         * driver.c: remove loop from the default optimizations: it seems to
12954         interact badly with some of the other options (see bug #60613).
12955
12956 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12957
12958         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12959         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12960
12961 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12962
12963         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12964         vararg-using methods.
12965
12966 2004-06-21  Martin Baulig  <martin@ximian.com>
12967
12968         * mini/mini-exceptions.c
12969         (mono_handle_exception): Added `gpointer original_ip' argument.
12970         After calling mono_unhandled_exception(), call
12971         mono_debugger_unhandled_exception() and if that returns true,
12972         restore the context and return.
12973
12974 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12975
12976         * mini-ppc.c: prefer the use of relative branches so
12977         they won't need to be patched in aot code (patch from Patrick Beard).
12978
12979 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12980
12981         * aot.c: patch from Patrick Beard to make the output assembly
12982         more correct for the MacOSX assembler. Small tweak to
12983         generate sane images on Linux/PPC, too.
12984
12985 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12986
12987         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12988         case until bug #59509 is fixed (shows up in #60332).
12989
12990 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12991
12992         * mini.c: make sure the needed wrappers are compiled, too, with
12993         precomp.
12994
12995 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12996
12997         * driver.c: remove NPTL reference in --version output.
12998
12999 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13000
13001         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13002         generate valid assembly for the Mach-O assembler.
13003
13004 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13005
13006         * driver.c: don't include abcrem in the all optimization specifier
13007         since it slows down jit compilation too much for now.
13008
13009 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13010
13011         * mini.c: use BIGMUL only if both operands have the same signage.
13012         * iltests.il: Test for bug 60056. (errors related to signage in
13013         BIGMUL).
13014
13015         r=lupus.
13016
13017 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13018
13019         * mini.c, aot.c: memory leak fixes.
13020
13021 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13022
13023         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13024
13025 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13026
13027         * Makefile.am: remove the -static hack completely, it links in
13028         statically glib as well.
13029
13030 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13031
13032         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13033         * exceptions.cs: make it compile with new mcs/csc.
13034
13035 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13036         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13037         and added relevant test case.
13038
13039 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13040
13041         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13042         regressions in gtk-sharp.
13043
13044 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13045
13046         * exceptions.cs: New regression tests.
13047
13048         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13049
13050 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13051
13052         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13053
13054 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13057
13058         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13059
13060 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13061
13062         * mini.c (mono_jit_runtime_invoke): Init class in this
13063         method instead of trusting mono_jit_compile_method to
13064         do the work (because wrappers can be in object class)
13065
13066 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13067
13068         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13069
13070         * basic-long.cs: New regression test.
13071
13072 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13073
13074         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13075         and div/rem checks.
13076
13077 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13078
13079         * Makefile.am: fix miguel's change to build mono statically against
13080         libmono (track build dependencies).
13081
13082 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13083
13084         * cfold.c: Some glib versions do not have G_MININT32.
13085
13086 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13087
13088         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13089         with precision of tan, atan, sin and cos, and implemented related
13090         regressions tests (fixes bug 54467, but one new problem appeared and
13091         is not fixed yet).
13092
13093 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13094
13095         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13096
13097         * exceptions.cs: Add test for constant folding && division by zero.
13098
13099         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13100         since driver.c is in libmono too, so the optimization was useless.
13101
13102         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13103         variable to driver.c so the compiler can emit more efficient code to
13104         access them.
13105
13106 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13107
13108         * Makefile.am: don't distribute generated inssel.[ch] files.
13109
13110 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13111
13112         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13113         into the default appdomain. Fixes #58707.
13114
13115         * jit-icalls.c: Remove the broken approximation for truncl, doing
13116         no conversion is better.
13117
13118         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13119         Fixes #58863.
13120
13121 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13122
13123         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13124         of the mcrxr instruction which is not available on some processors
13125         even if it's documented to be. Implement add and sub overflow correctly
13126         (still not complete for long unsigned). Speed up icalls a bit.
13127
13128 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13129
13130         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13131         we run .cctor in the current domain instead of target_domain.
13132         
13133         Fixes bug #58558, .cctor not being called in -O=shared.
13134
13135 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13136
13137         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13138
13139 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13140
13141         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13142         which can be done with an imm8, do it that way.
13143         (mono_arch_output_basic_block): ditto for a jmp
13144         (mono_arch_emit_prolog): Computate maximum offset of a label.
13145
13146 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13147
13148         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13149         now tries to allocate prefered physical reg's for virtual
13150         regs. This reduces the number of emited spills/loads with
13151         20-30% on our core assemblies.
13152
13153 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13154
13155         * jit-icalls.c: truncl() is not needed and trunc() is
13156         the correct thing to do anyway (bug #58287).
13157
13158 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13159
13160         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13161         if available.
13162
13163 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13164
13165         * driver.c: enable loop optimizations by default.
13166
13167 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13168
13169         * mini-x86.c: fix calc of max loop size when aligning loops start.
13170
13171 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13172
13173         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13174         the stack.
13175
13176 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13179         should set carry.
13180
13181         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13182
13183         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13184         
13185         * mini.c (inline_method): Allways inline some wrappers even if the cost
13186         is too large. Fixes #58785.
13187
13188         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13189         
13190 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13191
13192         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13193         (crichton@gimp.org). Beginning of support for sparc/linux.
13194
13195         * mini-sparc.c: Optimize retrieval of LMF address.
13196
13197 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13198
13199         * exceptions-ppc.c:  handle alloca in methods with clauses.
13200
13201 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13202
13203         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13204
13205 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13206
13207         * mini.c: Delegate most of the abort signal work to 
13208           mono_thread_request_interruption, which also handles Stop and Suspend
13209           states.
13210
13211 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13212
13213         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13214         supports the save/restore lmf opcodes.
13215
13216 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13217
13218         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13219         by gcc-3.4 as well.
13220
13221         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13222
13223 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13224
13225         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13226         methods which contain array accesses.
13227
13228         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13229         boundaries. Fixes #58537.
13230
13231         * iltests.il: Add regression test for #58537.
13232
13233 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13234
13235         * mini-x86.c (mono_arch_local_regalloc): Last part of
13236         fix for bug #58633 (releasing register to early).
13237
13238 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13239
13240         * basic-long.cs: Add new regression test.
13241
13242 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13243
13244         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13245         register too early on the chain.
13246
13247 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13248
13249         * mini.c (create_helper_signature): Use a helper function to reduce
13250         the code which needs to be written. Also set the calling convention of
13251         icalls on windows. Fixes #57840.
13252
13253 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13254
13255         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13256         exceptions-ppc.c: added helper function to get the instruction address
13257         from a signal handler context.
13258
13259 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13260
13261         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13262         from gonzalo.
13263
13264 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13265
13266         * helpers.c: Add new env variable to pass args to objdump.
13267         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13268
13269 2004-05-17  Radek Doulik  <rodo@ximian.com>
13270
13271         * Makefile.am (common_sources): added abcremoval.h so it get
13272         disted and daily mono packages on go-mono.com will build again
13273
13274 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13275
13276         * abcremoval.c: Fixed coding style, added copyright header.
13277
13278         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13279
13280         * mini.h: Added prototype for abc removal main function.
13281
13282         * build_relations_propagation_table.pl: Added copyright header.
13283
13284 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13285
13286         * basic-long.cs: reg test for complex ceq_long bug.
13287
13288 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13289
13290         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13291         reg in long and clob case (bug #58343). Fixed/added comments.
13292
13293 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13294
13295         * mini.c (mono_jit_runtime_invoke): Follow new convention
13296         of calling the invoke method with an function pointer.
13297
13298 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13299
13300         * ChangeLog: Fix author of memory leak patch.
13301
13302 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13303
13304         * Makefile.am: fix make dist as well...
13305
13306
13307 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13308
13309         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13310         on archs where pointers are 4 bytes long.
13311
13312         * Makefile.am: Added abcremoval.c source file.
13313
13314         * abcremoval.c: Added abcremoval.c.
13315
13316         * abcremoval.h: Added abcremoval.h.
13317
13318         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13319
13320         * inssel.brg: Enabled bounds check removal.
13321
13322         * mini.c: Added support for abcrem optimization.
13323
13324         * mini.h: Added abcrem optimization label.
13325
13326         * driver.c: Added support for abcrem optimization.
13327
13328         * propagated_relations_table.def: Added propagated_relations_table.def.
13329
13330 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13331
13332         * mini.c, cfold.c: fix style.
13333
13334 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13335
13336         * mini.c: handle issue with the low-level implementation of
13337         some long opcodes (bug #54209).
13338
13339 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13340
13341         * basic.cs: test for my new cmov stuff.
13342
13343 2004-05-13      Patrik Torstensson
13344
13345         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13346         opt and added peephole documentation.
13347
13348 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13349
13350         * tramp-ppc.c: rewrote the generic trampoline code.
13351
13352 2004-05-11      Patrik Torstensson
13353
13354         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13355
13356 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13357
13358         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13359
13360         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13361         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13362
13363         * mini.c: Add new icalls for AsAny marshalling.
13364
13365 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13366
13367         * tramp-ppc.c, mini-ppc.c: more cleanups.
13368
13369 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13370
13371         * mini.c: no warnings.
13372
13373 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13374
13375         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13376
13377 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13378
13379         * mini.c: In the thread abort signal handler, if the thread is in the
13380         process of being stoped, don't throw the Abort exception, just stop the
13381         thread.
13382
13383 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13384
13385         * tramp-ppc.c: removed old code.
13386
13387 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13388
13389         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13390         do some simple speed optimizations on ppc.
13391
13392 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13393
13394         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13395         and large offsets in load/store.
13396
13397 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13398
13399         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13400         it causes regressions.
13401
13402 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13403
13404         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13405         support.
13406
13407 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13408
13409         * jit-icalls.c: remove warnings.
13410         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13411         speedups for unsafe code.
13412
13413 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13414
13415         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13416
13417 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13418
13419         * basic-calls.cs: Add new regression test.
13420
13421         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13422         more portable.
13423
13424         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13425
13426         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13427         is no longer used.
13428
13429 2004-05-06      Patrik Torstensson
13430
13431         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13432         long reg allocation in any reg (not only eax:edx) and implemented 
13433         long shl/shr ops in asm instead of helpers.
13434
13435 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13436
13437         * mini-sparc.h: Fix warnings.
13438
13439         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13440         stack.
13441
13442         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13443         separate statement for clarity.
13444
13445         * mini-sparc.c: Update status.
13446
13447 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13450         here.
13451
13452 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13453
13454         * inssel-ppc.brg: another small pre-release workaround:
13455         we don't do overflow detection for long_sub_un.
13456
13457 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13458
13459         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13460         (also works around a weird ppc bug: 57957).
13461
13462 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13463
13464         * tramp-ppc.c: trampoline fixes.
13465
13466 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13467
13468         * mini-ppc.c: fixed typos.
13469
13470 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13471
13472         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13473         at the top of the stack. Fixed typos. Use a frame registers
13474         for all the methods with exception clauses.
13475
13476 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13477
13478         * exceptions-ppc.c: restore fp registers.
13479
13480 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13481
13482         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13483         order from the stack top (moved the stack room to save the
13484         return value for trace after the param area). Fixed corruption
13485         in restoring registers on unwind.
13486
13487 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13488
13489         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13490
13491 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13492
13493         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13494         and prolog/epilog for methods that use it. Allow
13495         enough param area room for varargs methods. Fix miguel's
13496         breakage in exception handling.
13497
13498 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13499
13500         * Makefile.am: run genmdesc only on current arch.
13501
13502 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13503
13504         * exceptions-x86.c:
13505         * mini-x86.h: fix the build on windows.
13506
13507 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13508
13509         * 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.
13510
13511         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13512
13513         * mini-exceptions.c: New file.
13514         
13515         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13516         Move some parts of the x86 exception handling code to an 
13517         arch-independent file so it can be shared with other ports.
13518
13519 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13520
13521         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13522
13523 2004-04-26  David Waite  <mass@akuma.org>
13524
13525         * driver.c: remove comma from end of enumeration declaration
13526
13527 2004-04-26  Jackson Harper  <jackson@ximian.com>
13528
13529         * driver.c: parse config file before loading first assembly. This
13530         allows the user gac to be enabled/disabled. 
13531         
13532 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13533
13534         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13535         simpler mechanism: we do not care what is encoded initially
13536         (branch absolute or relative), we care about the code and its
13537         target.  I kept the old code for reference for now.
13538
13539         The new code tries first to determine if the jump is anywhere in
13540         the -/+32 absolute meg range, if it succeeds, it encodes using the
13541         absolute branch;  If not, it tried to find something in the
13542         relative range, if not, it uses the handle_thunk code. 
13543
13544 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13545
13546         * exceptions-ppc.c: use the correct ip register on macosx.
13547
13548 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13549
13550         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13551
13552 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13553
13554         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13555         Raise exception on integer divide by zero by hand since the hw
13556         doesn't support it. Handle NaNs in FP compares.
13557
13558 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13559
13560         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13561         code reducing duplication between the platforms and enabled
13562         signal exception handling (on linux for now).
13563
13564 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13565
13566         * exceptions-ppc.c: more macosx support.
13567
13568 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13569
13570         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13571
13572 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13573
13574         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13575
13576 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13577
13578         * iltests.il: more tests.
13579
13580 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13581
13582         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13583         vars as well.
13584
13585 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13586
13587         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13588
13589 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13590
13591         * liveness.c: Mark variables as volatile in all basic blocks reachable
13592         from exception clauses.
13593
13594 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13595
13596         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13597         inlining.
13598
13599 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13600
13601         * iltests.il, basic.cs: more tests for regalloc.
13602
13603 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13604
13605         * iltests.il: Some tests for register allocation modifications
13606         I have locally.
13607
13608 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * exceptions.cs: Add regression test for bug #56782.
13611
13612         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13613         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13614         the beauty of fixing the same thing in 5 different files...
13615
13616 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13617
13618         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13619         methods.
13620
13621 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13622
13623         * mini.c: Add support for STRWLPARRAY marshalling convention.
13624
13625 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13626
13627         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13628         to init the context to setup the regs pointer).
13629
13630 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13631
13632         * exceptions-ppc.c: more exceptions work.
13633
13634 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13635
13636         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13637         not allowed.
13638
13639 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13640
13641         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13642         can use the memory directly.
13643
13644         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13645
13646         add x86_add_membase, x86_sub_membase, x86_mul_membase
13647
13648 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13649
13650         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13651         GENERAL_REGS they were also hardcoded for all PPC ports.
13652
13653         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13654
13655         Remove hard-coded limit for floating point registers, use
13656         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13657
13658         Notice that in MacOS X calling conventions you can fit a lot more
13659         floating point values in registers, so I should update the PInvoke
13660         test to excercise the passing of floating point values on the
13661         stack (currently broken).
13662         
13663 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13664
13665         * tramp-ppc.c (create_trampoline_code): Added
13666         JUMP_TRAMPOLINE_SIZE. 
13667         (ppc_magic_trampoline): Follow the pattern from
13668         x86_magic_trampoline: if code is set to zero, return. 
13669         (create_trampoline_code): Always pass MonoMethod to the jump
13670         trampoline, before it was passing a null.
13671         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13672         share the code with mono_arch_create_jit_trampoline. 
13673
13674         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13675         implemented.
13676         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13677         implemented.  
13678
13679         * cpu-g4.md: Added length for jmp instruction, the worst case
13680         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13681         for save_lmf).
13682
13683 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13684
13685         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13686
13687 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13688
13689         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13690         before each IL instruction.
13691
13692         * mini.c (CEE_BOX): Fix warnings.
13693
13694 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13695
13696         * mini.c: removed a few unused vars and extra whitespace.
13697
13698 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13699
13700         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13701         checks.
13702         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13703         index.
13704         (OP_GETCHR): use the above
13705         (CEE_LDELEMA): use the above.
13706
13707         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13708         version of the generic impl.
13709         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13710         (CEE_LDELEMA): use the above.
13711
13712 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13713
13714         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13715         Fixes #56317.
13716
13717         * iltests.il: Added new regression test for #56317.
13718
13719 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13720
13721         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13722         under NetBSD. Fixes #56450.
13723
13724         * liveness.c (update_gen_kill_set): Fix previous patch.
13725
13726 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13727
13728         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13729
13730 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13731
13732         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13733         ldsfld and ldsflda.
13734
13735         * inssel-sparc.brg: Add more optimizations.
13736
13737         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13738
13739 2004-04-01  Martin Baulig  <martin@ximian.com>
13740
13741         * mini.c (handle_box): New static function; moved the
13742         implementation of CEE_BOX here.
13743         (mono_method_to_ir): Added `constrained_call' variable.
13744         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13745         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13746         mono_method_get_constrained() to get the method.
13747
13748 2004-04-01  Martin Baulig  <martin@ximian.com>
13749
13750         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13751         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13752         (mono_method_to_ir): We don't need these macros anymore since
13753         mono_class_get_full() already takes care of it. 
13754
13755 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13756
13757         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13758         use @function (as doesn't accept #function here) and check the return
13759         value of system and stop if fails.
13760
13761 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13762
13763         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13764
13765 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13766
13767         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13768
13769         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13770
13771         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13772         #56223.
13773
13774         * basic-long.cs: Add test for negation of Int64.MinValue.
13775
13776 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13777
13778         * mini-sparc.c: Update status.
13779
13780         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13781
13782         * exceptions-sparc.c: Fix return value in filters.
13783
13784         * inssel-sparc.brg: Fix register allocation in some rules.
13785
13786 2004-03-28  Martin Baulig  <martin@ximian.com>
13787
13788         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13789         if neccessary.  
13790
13791 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13792
13793         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13794         
13795         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13796         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13797         remove unused conv_u4 opcode.
13798
13799         * mini-x86.c: Remove valgrind workaround since it slows down things
13800         even when mono is not run under valgrind.
13801
13802 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13803
13804         * mini-sparc.c: Update status.
13805
13806         * inssel-sparc.brg: Add some optimizations.
13807
13808         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13809         future delay slot filling. Add support for varargs, tail calls and JMP.
13810
13811         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13812         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13813
13814         * inssel.brg: Fix register allocation in OP_ARGLIST.
13815
13816         * inssel.brg: Fix warnings.
13817
13818 2004-03-25  Martin Baulig  <martin@ximian.com>
13819
13820         * mini.c (inflate_generic_field): Removed.
13821         (mini_get_method): Removed, use mono_get_method_full(),
13822         (mini_get_class): Removed, use mono_class_get_full().
13823         (mono_method_to_ir): Pass our generic context to
13824         mono_field_from_token().        
13825
13826 2004-03-25  Martin Baulig  <martin@ximian.com>
13827
13828         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13829         of a `MonoMethod *'.
13830         (mini_get_method): Take a `MonoGenericContext *' instead
13831         of a `MonoMethod *'.
13832         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13833         a new local variable called `generic_context' which holds the
13834         current `MonoGenericContext *'; use it to lookup things.
13835
13836 2004-03-24  Martin Baulig  <martin@ximian.com>
13837
13838         * mini.c (mini_get_class): New static method; if we're inside a
13839         generic instance, inflate the class if neccessary.
13840         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13841
13842 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13843
13844         * iltests.il: New regression test for #55976.
13845
13846         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13847         #55976.
13848
13849 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13850
13851         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13852         output.
13853
13854 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13855
13856         * liveness.c: Consider SSA stores as well as loads when making vars
13857         volatile.
13858
13859         * exceptions.cs: New regression tests for register allocation.
13860         
13861 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13862
13863         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13864         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13865           domain lock only to protect puntual access to data structures.
13866           Added access lock for sighash, jit_icall_hash_name, 
13867           jit_icall_hash_addr and domain->code_mp.
13868
13869 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13870
13871         * driver.c: Print SIGSEGV handling method.
13872
13873         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13874
13875         * mini.c (setup_jit_tls_data): Handle case when this is called
13876         multiple times for a thread.
13877
13878         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13879         is different from fbxx_un. Fixes #54303. Also use constants instead of
13880         magic numbers in a lot of places.
13881
13882 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13883
13884         * exceptions.cs: Fix cctor test when --regression is used.
13885
13886 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13887
13888         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13889         for Linux/ppc.
13890
13891 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13892
13893         * inssel-ppc.brg: fixed register assignments for some rules.
13894
13895 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * exceptions.cs: Add test for exceptions in static constructors.
13898
13899         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13900         static constructors outside the domain lock. Fixes #55720.
13901
13902 2004-03-17  Martin Baulig  <martin@ximian.com>
13903
13904         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13905         (inflate_generic_field): Take the `MonoMethod *' instead of the
13906         `MonoClass *' and added support for generic method.
13907         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13908         have a `field->parent->gen_params', only inflate the field if it's
13909         an open constructed type.
13910
13911 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13912
13913         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13914         exception object instead of the preconstructed ones.
13915
13916 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13917
13918         * mini.c: reverted changed to sigsegv_signal_handler commited
13919         accidentally in the previous patch.
13920
13921 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13922
13923         * mini.c:
13924         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13925         running --aot with an old assembly.
13926
13927 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13928
13929         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13930         point values.
13931
13932         * mini-sparc.c: Add support for v9 branches with prediction.
13933
13934 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13935
13936         * mini.c (mini_init): #warning is GNUC only
13937
13938         * mini-sparc.h: implement __builtin_frame_address
13939         and __builtin_return_address for Sun C compiler
13940
13941 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13942
13943         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13944
13945 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13946
13947         * basic-calls.cs: Add test for unaligned byref long argument passing.
13948
13949         * mini-ops.h: Add sparcv9 compare and branch instructions.
13950
13951         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13952         v9 instructions if we have a v9 cpu.
13953
13954         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13955         registers for global allocation.
13956
13957         * exceptions-sparc.c: Fixes.
13958         
13959 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13960
13961         * liveness.c (mono_analyze_liveness): Optimized version.
13962
13963         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13964
13965         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13966         sparc work.
13967
13968         * basic-float.cs basic-calls.cs: New regression tests.
13969
13970 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13971
13972         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13973         sigaltstack implementation.
13974
13975         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13976         
13977         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13978         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13979
13980 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13981
13982         * mini.c: Fix warnings.
13983         
13984         * mini.c (mono_resolve_patch_target): New function which contains the
13985         arch independent part of the patching process.
13986
13987         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13988         patching code to a separate function.
13989
13990 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13991
13992         * mini.c (add_signal_handler): ifdef out on Windows
13993
13994 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13995
13996         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13997         cpu-sparc.md: Add exception handling support + other fixes.
13998
13999         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14000         typed GC detection in --version.
14001
14002         * basic.cs exceptions.cs: New regression tests.
14003
14004         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14005         the arch specific code can store data during a compilation.
14006
14007         * mini-ops.h: Add OP_SETFRET.
14008
14009         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14010         function, register a separate icall for each arity, so the icalls can
14011         get a wrapper.
14012         
14013         * mini.c (mono_print_tree): Print negative offsets in a more readable
14014         form.
14015         
14016         * mini.c: Make signal handling work on sparc.
14017         
14018         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14019
14020         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14021
14022         * jit-icalls.c: Emulate truncl by aintl on solaris.
14023
14024         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14025
14026 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14027
14028         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14029
14030 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14031
14032         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14033         a MarshalByRef type, inline a method that performs the check, taking into
14034         account that the object can be a proxy. Also implemented tow new opcodes:
14035         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14036         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14037         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14038
14039 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14040
14041         * mini-ppc.c: if a relative branch displacement is too big
14042         but it points to and area reachable with an absolute branch, 
14043         avoid the thunks.
14044
14045 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14046
14047         * mini.c: optimize small copies in cpblk.
14048
14049 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14050
14051         * basic-calls.cs basic-float.cs: New regression tests.
14052
14053         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14054         negative offsets from %fp. Implement localloc. Fix local register 
14055         allocation. Fix the case when the this argument needs to be saved to
14056         the stack. Implement some missing opcodes.
14057
14058 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14059
14060         * mini.c (mini_method_compile): Reenable global regalloc in methods
14061         with exception handlers.
14062
14063         * linear-scan.c (mono_varlist_sort): Fix warning.
14064
14065         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14066
14067         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14068         regalloc costs.
14069
14070         * liveness.c: Make all variables uses in exception clauses volatile, to
14071         prevent them from being allocated to registers. Fixes #42136.
14072
14073 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14074
14075         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14076         causes regressions.
14077
14078         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14079         argument to mono_arch_regalloc_cost.
14080
14081         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14082         precisely.
14083
14084 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14085
14086         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14087         Make the cost of allocating a variable to a register arch dependent.
14088
14089         * basic-calls.cs: Fix compilation of tests.
14090         
14091         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14092         helper function to cut back on the number of #ifdefs needed.
14093
14094         * mini-ppc.c: Fix compilation.
14095
14096         * basic-calls.cs: New regression tests.
14097
14098         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14099
14100         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14101         of l0 since that is callee saved.
14102
14103         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14104         to virtual calls.
14105
14106         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14107         of delay instruction.
14108
14109         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14110
14111         * mini.h (MonoCallInst): Add 'virtual' flag.
14112
14113         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14114
14115 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14116
14117         * *.cs: New regression tests.
14118
14119         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14120         work.
14121
14122         * mini.c (mono_runtime_install_handlers): Fix build.
14123
14124         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14125         'signal_stack_size' members.
14126
14127         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14128         alternate signal stack.
14129
14130         * exceptions-x86.c: Add stack overflow handling.
14131
14132         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14133         functions to arch independent code.
14134
14135         * mini.c (mono_print_tree): Print more detailed info for load_membase
14136         opcodes.
14137         
14138 2004-02-23  Martin Baulig  <martin@ximian.com>
14139
14140         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14141
14142 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14143
14144         * mini-x86.c: fixed reg allocation for div/rem.
14145
14146 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14147
14148         * driver.c (mono_main): Report some configuratio options on --version.
14149
14150 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14151
14152         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14153         low in the address space. Correctly flush memory in thunks where we
14154         output native code.
14155
14156 2004-02-20  Martin Baulig  <martin@ximian.com>
14157
14158         * mini.c (mini_get_method): New static method; inflate all generic
14159         methods and methods in open generic instances.
14160         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14161         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14162
14163 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14164
14165         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14166
14167         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14168
14169 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14170
14171         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14172
14173         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14174         it compile using Sun's compiler.
14175
14176 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14177
14178         * 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.
14179
14180         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14181
14182 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14183
14184         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14185         code.
14186         * mini-ppc.c: handle calls outside of the allowed range with thunks
14187         allocated using the code manager.
14188         * tramp-ppc.c: use the code manager to hold generated native code.
14189         Fixed the magic trampoline to just patch vtable entries.
14190
14191 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14192
14193         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14194         independent file.
14195
14196 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14197
14198         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14199         PPC.
14200
14201         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14202         if we have a working __thread implementation.
14203
14204         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14205         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14206
14207 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14208
14209         * mini-x86.c: Fix compilation under gcc 2.
14210         
14211 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14212
14213         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14214         contains a call to the wrapped function.
14215
14216         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14217         OP_<CALL>_IMM opcodes, and use them under X86.
14218         
14219         * mini.c (mono_jit_find_compiled_method): Fix warning.
14220
14221         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14222
14223         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14224
14225         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14226         functionality to mini.c.
14227
14228         * mini.c (mono_create_jump_trampoline): New function to create a jump
14229         trampoline. Return a compiled method instead of a trampoline if it
14230         exists. Add a cache for jump trampolines.
14231
14232         * mini.c (mono_jit_find_compiled_method): New function to return a
14233         compiled method if it exists.
14234
14235         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14236         mono_arch_create_jit_trampoline.
14237
14238         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14239         a jump trampoline. Fixes #52092.
14240         
14241 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14242
14243         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14244         which is not up-to-date. Add check_corlib_version () instead.
14245
14246         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14247         have to call it.
14248         
14249         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14250         since newer valgrind versions do not need it.
14251
14252         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14253         compile a method with a given set of optimizations.
14254
14255         * mini.c: Compile icall wrappers on-demand instead of at startup.
14256
14257         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14258         wrapper for an icall.
14259
14260 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14261
14262         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14263         #54063.
14264
14265         * iltests.il: Add test for non-empty stack before switch instruction.
14266
14267 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14268
14269         * mini.c: Add support for new stringbuilder marshalling conventions.
14270
14271         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14272
14273 2004-02-01  Martin Baulig  <martin@ximian.com>
14274
14275         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14276         in `ginst->mtype_argv'.
14277
14278 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14279
14280         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14281         facilitate grepping.
14282
14283 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14284
14285         * mini.c: fixed buglet in initobj generic implementation for references.
14286
14287 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14288
14289         * Makefile.am: make the version script conditional.
14290         * jit-icalls.c: handle missing truncl().
14291
14292 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14293
14294         * exceptions.cs: Add more tests for double->int conversion.
14295
14296         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14297         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14298
14299 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14300
14301         * driver.c: make --verbose --version emit an error
14302         if the loaded corlib doesn't match the runtime version.
14303
14304 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14305
14306         * mini-ppc.h: export ppc_patch().
14307         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14308         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14309         on par or better than on MacOSX.
14310
14311 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14312
14313         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14314         mono_lookup_pinvoke_call.
14315
14316         * mini-x86.c: Under windows, the default pinvoke calling convention is
14317         stdcall. Fixes #52834.
14318
14319         * mini.c (optimize_branches): Add an upper bound to the number of
14320         iterations to prevent infinite loops on strange loops. Fixes #53003.
14321
14322 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14325         and ISINST. Fixes #52093.
14326
14327         * objects.cs (test_0_vector_array_cast): New tests.
14328         
14329 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14332         checking in Array.Set ().
14333
14334         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14335         #52590.
14336
14337         * object.cs (test_0_multi_array_cast): New regression test.
14338
14339 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14340
14341         * exceptions-ppc.c: fix build on Linux/PPC.
14342
14343 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14344
14345         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14346         running under valgrind.
14347         (x86_magic_trampoline): Fix build bustage.
14348
14349         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14350         negative values as well. This is needed for the encoding of the line number
14351         info, since sometimes the line numbers are not in increasing order.
14352
14353 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14354
14355         * cpu-pentium.md (localloc): Increase the size of the localloc 
14356         instruction since it is a loop under Win32.
14357
14358         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14359         allocation.
14360
14361 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14362
14363         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14364         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14365         Max Horn (max@quendi.de). Fix file names in comments.
14366
14367 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14368
14369         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14370         avoid stack overflow.
14371         (replace_usage): Avoid uninitialized variable warnings.
14372
14373         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14374         and taking the address of valuetype variables.
14375
14376 2004-01-03  Patrik Torstensson
14377
14378         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14379         for other purposes than FP later on.
14380
14381 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14382
14383         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14384         of tail calls.
14385
14386 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14387
14388         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14389
14390 2003-12-30  Patrik Torstensson <p@rxc.se>
14391
14392         * mini-x86.h: Decreased number of availiable fp regs.
14393         Solves corner cases with FP spilling.
14394
14395 2003-12-23  Patrik Torstensson <p@rxc.se>
14396
14397         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14398         for floating point stack tracking / spilling on x86. 
14399         Fixes bug #49012.
14400         
14401         * basic-float.cs: added float mul overflow test.
14402
14403 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14404
14405         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14406
14407 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14408
14409         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14410         supports for cond branches that overflow the immediate
14411         overflow offset. mcs can compile simple programs.
14412
14413 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14414
14415         * exceptions-ppc.c: exception handling support wip:
14416         finally handlers get run on exception.
14417
14418 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14419
14420         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14421         profiling.
14422
14423 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14424
14425         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14426         initial support for stack walking and unwinding.
14427
14428 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14429
14430         * driver.c (mono_main): Make corlib-out-of-sync message more 
14431         descriptive. Also remove verify_corlib call.
14432
14433 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14434
14435         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14436         not overlap with other call's arguments, too.
14437
14438 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14439
14440         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14441         move to arch-specific code the choice of arch-specific
14442         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14443         * mini.c: ensure emulation calls will not interleave
14444         with other calls.
14445
14446 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14447
14448         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14449         the magic trampoline stack frame is dropped before executing
14450         the new method.
14451
14452 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14453
14454         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14455         and integer to fp conversions. Added support for overflowing
14456         arguments on the stack. Reserve a couple more registers as temps.
14457         Added support for aot compilation (as output still needs to be
14458         tweaked, though).
14459
14460 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14461
14462         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14463         Don't overwrite return register in some corner cases.
14464
14465 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14466
14467         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14468         static constructors when AOT compiling.
14469
14470         * driver.c (mono_main): Call mono_check_corlib_version.
14471
14472 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14473
14474         * cpu-g4.md, basic.cs: fixed div target register.
14475
14476 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14477
14478         * mini-ppc.c, basic.cs: shl_imm fix with test.
14479
14480 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14481
14482         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14483         structures by value. Misc fixes.
14484         * objects.cs: more tests.
14485
14486 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14487
14488         * mini-ppc.c: lconv.ovf.i implemented.
14489
14490 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14491
14492         * mini.c:
14493         (mini_init): don't error out if someone already called g_thread_init.
14494
14495 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14496
14497         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14498         to be any type per the spec. Fix abnormal memory usage when
14499         the same object is repeatedly thrown.
14500
14501 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14502
14503         * mini.c: check for overruns in IL code.
14504
14505 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14506
14507         * TODO: Add/remove some todo entries.
14508
14509 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14510
14511         * driver.c (mono_main): Call mono_verify_corlib.
14512
14513 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14514
14515         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14516         This has been moved to mini.c
14517         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14518         type being casted is marshalbyref it could be a proxy, so instead of
14519         emitting the type check code, emit a call to a runtime method that will
14520         perform the check by calling CanCastTo if needed.
14521
14522 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14523
14524         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14525         methods with large stack frames under Win32.
14526
14527 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14528
14529         * Makefile.am: Distribute regression tests.
14530
14531         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14532         at the end instead of inserting each variable into the sorted list.
14533
14534         * linear-scan.c (mono_varlist_sort): New helper function.
14535         
14536 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14537
14538         * mini.c: ensure arguments and locals are within bounds.
14539
14540 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14541
14542         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14543         related fixes.
14544
14545 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14546
14547         * mini.c (mono_cprop_copy_values): Fix crash.
14548
14549         * aot.c: Set verbosity back to 0.
14550         
14551 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14552
14553         * regalloc.c: complete memory leak fix by Laurent Morichetti
14554         (l_m@pacbell.net).
14555
14556 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14557
14558         * driver.c (main_thread_handler): Revert the previous patch.
14559
14560         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14561         under valgrind.
14562
14563         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14564         memory from the memory pool.
14565
14566         * driver.c (main_thread_handler): Turn on all optimizations when
14567         --aot is used.
14568
14569         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14570         an array for better performance.
14571
14572         * regalloc.c (mono_regstate_assign): Fix memory leak.
14573
14574         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14575         serialize the debug info.
14576
14577         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14578         debug info from the serialized representation.
14579
14580         * aot.c: Save debug info into the generated file and load it when 
14581         loading a method.
14582
14583         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14584
14585 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14586
14587         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14588         More FP-related fixes.
14589
14590 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14591
14592         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14593         and register allocation buglet. Hello world now runs.
14594
14595 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14596
14597         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14598         * tramp-ppc.c: fixed class init trampoline.
14599         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14600
14601 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14602
14603         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14604         mini.c: more ppc changes/fixes.
14605
14606 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14607
14608         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14609         Also optimize the case when the arguments are the same in the caller 
14610         and in the callee.
14611
14612         * iltests.il: Add tests for tail calls with valuetype arguments.
14613
14614 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14615
14616         * mini-ppc.c: fixes for struct return type.
14617
14618 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14619
14620         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14621         mono_spillvar_offset() to arch-specific code.
14622
14623 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14624
14625         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14626
14627 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14628
14629         * exceptions-x86.c: Fix stack space leaks.
14630         
14631         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14632         registers from the lmf if the method has save_lmf set.
14633
14634 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14635
14636         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14637         of icall wrappers into InvokeInDomain, since these are now per-domain.
14638
14639 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14640
14641         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14642         make some opcode emulation and intrinsic ops enabled/disabled 
14643         according to the architecture. More fixes.
14644
14645 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14646
14647         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14648
14649 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14650
14651         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14652         arch-specific handling for 'this' and struct return type to
14653         arch-specific code.
14654
14655 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14656
14657         * aot.c: prevent divide by zero error when reporting (it happened with
14658         Accessibility.dll).
14659
14660 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14661
14662         * mini.h (inst_switch): Remove unused macro.
14663
14664 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14665
14666         * aot.c:
14667         (load_aot_module): free 'info->methods' and 'info' properly. No more
14668         "free(): invalid pointer blah" messages when you have an old aot
14669         compiled assembly.
14670
14671 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14672
14673         * jit-icalls.c, mini.c: Added support for context static fields.
14674
14675 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14676
14677         * mini.c (mono_method_blittable): Methods which set LastError are not 
14678         blittable either. Fixes #51108.
14679         
14680 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14681
14682         * mini.c: flush icache.
14683         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14684
14685 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14686
14687         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14688
14689 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14690
14691         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14692         safe on IA32.
14693
14694         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14695         vararg calls.
14696
14697         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14698
14699 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14700
14701         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14702         instruction when the result is discarded.
14703
14704         * iltests.il (test_0_div_regalloc): New regression test.
14705
14706         * arrays.cs: Fix compilation error.
14707
14708 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14709
14710         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14711         float rules to inssel-x86.brg: sane architectures with FP registers
14712         don't need to implement these rules.
14713
14714 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14715
14716         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14717
14718 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14719
14720         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14721         implementation of 32 bit systems.
14722
14723 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14724
14725         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14726         (Jeroen Zwartepoorte).
14727
14728 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14729
14730         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14731         the caller and the callee matches.
14732         
14733         * mini.c (mono_method_to_ir): Add comment.
14734
14735         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14736         signbit is missing on some platforms.
14737
14738 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14739
14740         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14741
14742         * mini.c (setup_jit_tls_data): Call the new function.
14743         
14744         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14745
14746         * mini-x86.c: Add experimental support for fast access to the lmf
14747         structure under NPTL/Linux 2.6.x.
14748
14749 2003-11-06  Martin Baulig  <martin@ximian.com>
14750
14751         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14752         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14753         the debugger.
14754
14755 2003-11-02  Martin Baulig  <martin@ximian.com>
14756
14757         * mini.c (inflate_generic_field): New static method.
14758         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14759         generic instance and the field is declared in a generic type, call
14760         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14761
14762 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14763
14764         * mini.h mini.c (mono_method_same_domain): New function to return
14765         whenever the caller and the callee are in the same domain.
14766
14767         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14768
14769 2003-10-30  Martin Baulig  <martin@ximian.com>
14770
14771         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14772         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14773         method parameters.
14774         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14775         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14776
14777 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14780         propagation.
14781
14782         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14783         object here, so it is in the correct appdomain etc.
14784
14785 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14786
14787         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14788         already done.
14789         (mono_method_to_ir): Avoid freeing the type created returned from
14790         mono_type_create_from_typespec, since it is put into an internal cache
14791         by the function. Fixes pointer.exe.
14792
14793         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14794         trampolines for icalls and pinvokes as well. Fixes #33569.
14795
14796 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14797
14798         * mini.c: Update after appdomain changes.
14799
14800         * mini.c (mono_jit_compile_method_inner): Allways compile native
14801         method wrappers in the root domain, since there can only be one
14802         instance of them, whose address is stored in method->info.
14803
14804 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14805
14806         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14807         environment variable. Instead detect automatically whenever running
14808         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14809         valgrind.h.
14810
14811 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14812
14813         * trace.c, trace.h: New files that implement the new trace option
14814         parsing. 
14815
14816         * driver.c: Document new --trace options.
14817
14818         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14819         mini-x86.c: Apply:
14820
14821         -       if (mono_jit_trace_calls)
14822         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14823
14824         * mini.h: prototypes.
14825         
14826 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14827
14828         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14829
14830         * mini.c inssel.brg: Implement typedefbyref opcodes.
14831
14832         * mini.c (mono_jit_compile_method): Remove unused local variable.
14833
14834         * mini.c (mono_jit_compile_method_inner): Ditto.
14835         
14836 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14837
14838         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14839         
14840         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14841
14842 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14843
14844         * mini.c (mono_no_aot): Remove unused global variable.
14845
14846         * mini.c: Thread safety fixes.
14847
14848 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14849
14850         * mini.c (mono_create_class_init_trampoline): Add a lock around
14851         class_init_hash_addr.
14852
14853         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14854         #30073.
14855
14856         * mini.c: Decompose the NEWARR instruction before decomposing its
14857         arguments. Fixes #30073.
14858
14859 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14860
14861         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14862         convention.
14863
14864 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14865
14866         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14867
14868         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14869
14870         * driver.c: Add support for compiling icall wrappers to --compile.
14871
14872 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14873
14874         * inssel.brg: The empty value in class->interface_offsets is -1, not
14875         0. Fixes #49287.
14876
14877 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * objects.cs: New test for 'is' operator on an array of interfaces.
14880
14881 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14882
14883         * tramp-ppc.c: update trampoline code to support jumps
14884         and class initialization.
14885
14886 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14887
14888         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14889
14890         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14891
14892         * inssel.brg (OP_UNBOX): Remove unused rule.
14893
14894         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14895         region instead of one for each method. Fixes #47813.
14896
14897 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14898
14899         * exceptions.cs (test_0_nested_finally): New regression test for
14900         nested exception handlers.
14901
14902         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14903
14904         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14905
14906         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14907         inlining.
14908
14909         * mini.c (mono_method_check_inlining): Make the inlining limit 
14910         configurable by an environment variable.
14911         
14912         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14913
14914         * mini.h: Bump AOT file version.
14915
14916         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14917         token, store the image along with the token, since the token might not 
14918         refer to the same image as the method containing the relocation, 
14919         because of inlining.
14920
14921 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14922
14923         * mini.c (mono_precompile_assemblies): New function to compile
14924         all methods in all loaded assemblies.
14925
14926         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14927
14928         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14929         iassign and fassign to int*, since they can contain large negative
14930         values if the register is spilled. Also added some comments. Fixes
14931         #45817.
14932
14933         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14934         under Win32. Fixes #42964.
14935
14936 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14937
14938         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14939
14940         * aot.c: Added support for AOT compiling methods which contain calls
14941         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14942         handled.
14943         
14944         * driver.c (compile_all_methods): Run the compilation in a thread
14945         managed by mono. Fixes #44023.
14946
14947         * mini.c (mono_codegen): Print full method name in verbose output.
14948
14949         * mini-x86.c (mono_arch_patch_code): Fix warning.
14950         
14951         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14952         jumps, since the method we are jumping to might be domain-specific.
14953
14954         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14955
14956 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14957
14958         * inssel.brg: string chars are unsigned.
14959
14960 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14961
14962         * TODO: New todo item.
14963
14964         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14965         which calls mono_runtime_class_init and patches the call site to
14966         avoid further calls.
14967         (mono_arch_create_class_init_trampoline): New arch specific function 
14968         to create a class init trampoline.
14969         (create_trampoline_code): Generalized so it can create
14970         class init trampolines as well.
14971
14972         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14973         (mono_create_class_init_trampoline): New function to create and cache
14974         class init trampolines.
14975         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14976         vtable given the address of a class init trampoline. Used by the
14977         patching process.
14978         (mono_codegen): Generate a call to a trampoline instead of
14979         mono_runtime_class_init in LDSFLD[A].
14980         (mono_codegen): Add relocations for the new trampoline.
14981         
14982         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14983         MONO_PATCH_INFO_CLASS_INIT.
14984
14985         * mini.h: Bump AOT version number.
14986
14987         * aot.c: Create a copy of the loaded code instead of using the original
14988         so methods which call each other will be close in memory, improving
14989         cache behaviour.
14990         
14991         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14992         patch since it breaks the regression tests.
14993         
14994         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14995         for the register saving instruction sequence since the 
14996         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14997
14998 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * TODO: Fix todo item && remove another.
15001
15002 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15003
15004         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15005         previous checkin.
15006
15007         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15008         function of the module.
15009
15010         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15011         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15012         --no-aot command line option.
15013
15014 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15015
15016         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15017         by Bernie Solomon (bernard@ugsolutions.com).
15018
15019         * inssel.brg: Refactor the interface offset table related code into
15020         its separate functions and add support for the AOT case.
15021
15022 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15023
15024         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15025         
15026         * aot.c: Added mono_aot_verbose variable and made all debugging
15027         output depend on the value of this variable.
15028
15029         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15030         method_label and info_label.
15031
15032         * mini.h mini-x86.c aot.c: Added a new relocation type 
15033         MONO_PATCH_INFO_IID for klass->interface_id.
15034
15035         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15036         the MonoJitInfo structure.
15037
15038         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15039         a non-root appdomain in shared mode.
15040
15041 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15042
15043         * aot.c: make aot loader less verbose. Remove free of unused variable.
15044
15045 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15046
15047         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15048
15049         * .cvsignore: Added *.dll.
15050
15051         * mini.c (mono_print_tree_nl): New function callable while debugging.
15052
15053         * mini.c (mono_print_code): Export this.
15054
15055         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15056         patched code.
15057
15058 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15059
15060         * mini.h (MonoCompile): Added 'jit_info' field.
15061
15062         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15063         the cfg structure, since it is needed by the AOT compiler.
15064
15065         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15066
15067         * aot.c: A major rewrite. Changes include:
15068         - save exception tables for methods which have them.
15069         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15070         to g_module_symbol.
15071         - reworked the file format so it is now much smaller and needs
15072         fewer relocation entries.
15073         
15074 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15075
15076         * aot.c (load_aot_module): Fix build bustage on platforms without
15077         Boehm GC.
15078
15079 2003-09-04  Martin Baulig  <martin@ximian.com>
15080
15081         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15082
15083 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15084
15085         * TODO: Some new optimization ideas.
15086
15087         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15088
15089         * aot.c: Save the optimization flags used to compile the code into
15090         the AOT module.
15091
15092         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15093         support emitting domain specific code.
15094         
15095         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15096         no longer domain neutral. It can be made domain neutral by compiling 
15097         with --optimize=shared.
15098
15099         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15100         between appdomains.
15101
15102         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15103         loading of AOT code.
15104
15105         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15106         
15107         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15108         if there is no domain neutrality information.
15109
15110 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15111
15112         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15113         format version into the generated library.
15114
15115         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15116         callee method into the caller since one of them could be shared.
15117
15118         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15119         system exceptions from AOT code now works.
15120
15121         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15122         method if it is domain neutral and the callee is not.
15123
15124         * graph.c (cfg_emit_one_loop_level): Fix warning.
15125
15126 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15127
15128         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15129         last checkin.
15130
15131 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15132
15133         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15134         is needed  by code which is executed before mono_runtime_init ().
15135         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15136         
15137         * mini.c (mono_thread_abort): Fix warning.
15138         (mono_jit_compile_method): Call static constructor in the AOT case too.
15139
15140         * aot.c (mono_compile_assembly): Fix warning.
15141
15142 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15143
15144         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15145
15146 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15147
15148         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15149
15150         * cpu-pentium.md: Fix the length of call opcodes so they include the
15151         ESP restoring instruction. Fixes #47968.
15152
15153 2003-08-28  Martin Baulig  <martin@ximian.com>
15154
15155         * mini-x86.c (mono_arch_call_opcode): Added support for
15156         MONO_TYPE_GENERICINST.
15157
15158         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15159
15160 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15161
15162         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15163         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15164
15165         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15166         metadata_section.
15167
15168 2003-08-26  Martin Baulig  <martin@ximian.com>
15169
15170         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15171         when reporting an error, set this to the actual error location.
15172         (mono_method_to_ir): Report the correct error location if
15173         get_basic_blocks() returned an error.
15174
15175 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15176
15177         * mini.c (mono_type_blittable): OBJECT is not blittable.
15178         (mono_method_blittable): Methods which have marshalling descriptors
15179         are not blittable either. Fixes #47842.
15180
15181 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15182
15183         * driver.c mini.c: Use an environment variable instead of a global 
15184         variable. Also fix the build.
15185
15186         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15187         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15188         reporting this. 
15189
15190         * driver.c mini.c: Added --with-valgrind option to turn off some
15191         code which prevents mono from running under valgrind.
15192
15193         * mini.c (mono_emit_call_args): Fixed warning.
15194
15195         * mini.c (mono_emulate_opcode): Fixed warning.
15196
15197 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15198
15199         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15200         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15201         regalloc.c, regalloc.h: specify available registers in arch-specific
15202         code and support floats in the regallocator (patch by Laurent Morichetti 
15203         <l_m@pacbell.net>)
15204
15205 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15206
15207         * mini.c: mono_thread_current() can be called only after
15208         mono_runtime_init(): rearrange code to not call it early on.
15209
15210 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15211
15212         * mini.c: allocate jump tables in the code mempools.
15213
15214 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15215
15216         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15217         freed.
15218
15219 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15220
15221         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15222         12 to 16.  This fixes bug #47453.
15223
15224
15225 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15226
15227         * mini-ppc.c: fixed indexed load and unsigned compares.
15228
15229 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15230
15231         * mini.c: reenabled installation of handler for
15232           thread abort signal.
15233
15234 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15235
15236         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15237         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15238         until it's fixed and actually useful.
15239
15240 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15241
15242         * inssel-long32.brg: couple more opcodes implemented.
15243
15244 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15245         
15246         * mini-sparc.c: Even more opcodes implemeted.
15247
15248 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15249
15250         * mini-sparc.c: More opcodes implemented.
15251
15252 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15253
15254         * mini-sparc.c: More opcodes implemented.
15255
15256 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15257
15258         * inssel-sparc.brg: Add some needed rules.  Direct
15259         copy from PPC.
15260         * Makefile.am: Use inssel-sparc.brg
15261         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15262         an assert happy for now.
15263
15264 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15265
15266         * mini-sparc.c: Fixed compile errors.
15267         * exceptions-sparc.c: Same.  We now produce a mono binary 
15268         on sparc-linux.  Yea.
15269
15270 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15271
15272         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15273         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15274         They compile, but do not work.
15275
15276 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15277
15278         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15279         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15280         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15281         (ct@gentoo.org).
15282
15283 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15284
15285         * mini.c: more opcodes implemented and better support for generics.
15286
15287 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15288
15289         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15290         * mini.c, mini.h: first cut at generics support: some new instructions 
15291         added and changed the behaviour of some of the existing ones.
15292
15293 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15294
15295         * mini.c: Removed definition of metadata_shared mutex here.
15296
15297 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15298
15299         * mini-x86.c: make vararg calls work for instance methods.
15300
15301 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15302
15303         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15304         returns the arguments in a separte list, now.
15305
15306 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15307
15308         * aot.c, mini.c: updates for array type representation changes.
15309
15310 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15311
15312         * mini.c: register function to perform jit shutdown.
15313
15314 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15315
15316         * mini.c: use a faster allocator if possible.
15317
15318 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15319
15320         * aot.c: some cleanups and portability changes.
15321
15322 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15323
15324         * mini.c: use faster allocation for CEE_BOX if possible.
15325
15326 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15327
15328         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15329         Moved inlined mempcy code to its own function so that is can be
15330         reused. Added an inline memset function as well (optimized initobj).
15331         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15332
15333 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15334
15335         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15336
15337 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15338
15339         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15340         arch code can setup the cpu for CLR execution, if needed.
15341         We use it on x86 to set the precision of FP operations.
15342
15343 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15344
15345         * mini.c: disable some optimizations if we can guess they'll cost too
15346         much for a given method.
15347
15348 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15349
15350         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15351         
15352 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15353         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15354         info collection support.
15355
15356 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15357
15358         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15359         is now implemented in the profiling API. Get rid of a couple of
15360         unnecessary global variables.
15361
15362 2003-06-15  Nick Drochak <ndrochak@gol.com>
15363
15364         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15365         * cpu-g4.md: add op_bigmul and op_bigmul_un
15366         * cpu_pentium.md: add op_bigmul_un
15367         * inssel-long32.brg: add rule for unsigned bigmul
15368         * mini-ops.h: define OP_BIGMUL_UN
15369         * mini-x86.c: THE BUG: handle (un)signed properly
15370         * mini.c: choose unsigned opcode if needed.
15371         This set of patches fixes bug #44291
15372
15373 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15374
15375         * mini.c (optimize_branches): improved to handle all kinds of
15376         conditional branches.
15377
15378 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15379
15380         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15381         don't raise exceptions.
15382
15383 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15384
15385         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15386         to arch-specific files.
15387
15388 2003-06-09  Martin Baulig  <martin@ximian.com>
15389
15390         * Makefile.am (libs): Added $(LIBGC_LIBS).
15391
15392 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15393
15394         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15395         and OP_ATAN (fixes bug#44293).
15396
15397 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15398
15399         * Makefile.am, mini-x86.c: rename cpu description array to
15400         pentium_desc, since some compilers define the 'pentium' preprocessor
15401         symbol.
15402
15403 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15404
15405         * mini.c (mini_select_instructions): add explicit branch if the
15406         following block is not the false target of a conditional branch -
15407         we need this with any optimization that reorder or remove bblocks
15408
15409         * mini.c (optimize_branches): bug fixes
15410
15411 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15412
15413         * mini.c (mono_method_to_ir): inline static readonly fields
15414
15415         * ssa.c (fold_tree): start cfold support for long (very simple
15416         cases only)
15417
15418         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15419
15420 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15421
15422         * inssel.brg: fixed memcpy (bug #44219).
15423
15424 2003-06-05  Dick Porter  <dick@ximian.com>
15425
15426         * driver.c: Set the glib log levels to not abort if g_message
15427         recurses.
15428
15429         g_set_prgname() has to happen before mini_init() so that the
15430         process handle gets the info.
15431         
15432 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15433
15434         * driver.c: add intrins to the default optimizations to get wider
15435         exposure.
15436
15437 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15438
15439         * mini.h: some large basic blocks will overflow a 16-bit
15440         integers for symbolic registers.
15441
15442 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15443
15444         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15445         (mono_arch_output_basic_block): fix bug 43499 
15446
15447 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15448
15449         * mini.c: kill duplicated definition of mono_debug_format.
15450
15451 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15452
15453         * mini-x86.c, arrays.cs: fixed register allocation bug.
15454
15455 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15456
15457         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15458
15459         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15460
15461 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15462
15463         * mini.c:
15464         (print_method_from_ip): also print source location information if
15465         available.
15466
15467 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15468
15469         * mini.c (mono_find_block_region): bug fix in region code
15470         (mini_method_compile): enable removing unreachable code again, but
15471         only in methods without exception clauses.
15472
15473 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15474
15475         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15476         Implemented arglist opcode and handling of TypedReference type.
15477         Fixed x86 call convention when a structure is returned.
15478         Minimal support for calling static vararg methods.
15479
15480 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15481
15482         * mini.c (mini_method_compile):  always remove unreachable code,
15483         because the code in them may be inconsistent  (access to dead
15484         variables for example).
15485
15486 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15487
15488         * driver.c, debug-mini.c: warning fixes.
15489
15490 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15491
15492         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15493
15494 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15495
15496         * mini.c: thread-static fields are registered in mono_class_vtable(),
15497         so ensure the function is called before checking for them.
15498
15499 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15500
15501         * mini.c (optimize_branches): fix for bug 43586
15502
15503         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15504         overflow (fixes Bug #43639)
15505
15506 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15507
15508         * mini.c, objects.cs: allow the use of stobj for primitive types.
15509
15510 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15511
15512         * mini.c: be less strict about argument checking until we support
15513         running the verifier.
15514
15515 2003-05-27  Nick Drochak <ndrochak@gol.com>
15516
15517         * basic-long.cs: tests for (ulong)int * (ulong)int also
15518         * mini.c: use the same trick for (ulong)int * (ulong)int
15519
15520 2003-05-27  Nick Drochak <ndrochak@gol.com>
15521
15522         * basic-long.cs: add regression test for (long)int * (long)int
15523         * cpu-pentium.md: add op_bigmul specification
15524         * inssel-long32.brg: add OP_BIGMUL rule
15525         * mini-ops.h: add OP_BIGMUL
15526         * mini-x86.c: register allocator: handle case where src1 needs to be
15527         in EAX.
15528         * mini.c: substitute special BIGMUL opcode in the tree for 
15529         (long)int * (long)int
15530
15531 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15532
15533         * jit-icalls.c: call the type ctor on field access if needed.
15534
15535 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15536
15537         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15538         to a method (including results of ldelema, bug#43207).
15539
15540 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15541
15542         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15543         colors to show exception handler blocks.
15544
15545         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15546         (fix for pinvoke7.cs).
15547
15548 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15549
15550         * mini.h, mini.c: ensure correct initialization order for types that
15551         require it. Prepare for lazy compilation of jit icall wrappers.
15552         Provide a name for opcode emulation to reduce unneeded mallocing.
15553
15554 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15555
15556         * mini-x86.c: better register restoring code and profiling
15557         support for tail calls.
15558
15559 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15560
15561         * mini.h, driver.c: prepare for leaf methods optimization.
15562
15563 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15564
15565         * mini.c: get targets of branches before converting a method.
15566
15567 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15568
15569         * mini.c (optimize_branches): added some experimental code (disbaled) 
15570
15571 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15572
15573         * mini.c (optimize_branches): fix branch to branch optimization 
15574
15575         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15576
15577         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15578
15579         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15580
15581         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15582         if needed.
15583
15584 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15585
15586         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15587         enable use of interface variables again.
15588
15589         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15590         I1 to registers because there is no simply way to sign extend 8bit
15591         quantities in caller saved registers on x86.
15592
15593         * inssel-float.brg: set costs of some rules to 2 so
15594         that monobure always select the arch. specific ones if supplied,
15595         regardless of the order we pass the files to monoburg.
15596
15597 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15598
15599         * mini.c, mini-x86.c: since the magic trampoline for jumps
15600         can't patch the code directly, we do it as soon as the
15601         method gets compiled.
15602
15603 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15604
15605         * mini-x86.c, mini.h: introduce a new patching method
15606         to support CEE_JMP and tail calls.
15607         * mini.c: obey tail.call. Don't precompile methods target
15608         of CEE_JMP.
15609         * tramp-x86.c: new trampoline code to handle methods
15610         reached through a jump.
15611
15612 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15613
15614         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15615         bit values to registers
15616
15617 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15618
15619         * mini.c (mono_compile_get_interface_var): share interface
15620         variables if possible.
15621
15622 2003-05-16  Martin Baulig  <martin@ximian.com>
15623
15624         * debug-mini.c (mono_init_debugger): New function to initialize
15625         the debugger.  This is not in the debugger since it needs to
15626         access some of mini's internals.
15627
15628 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15629
15630         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15631
15632 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15633
15634         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15635         for value type handling.
15636
15637 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15638
15639         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15640         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15641
15642 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15643
15644         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15645           the constructor through a proxy.
15646
15647 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15648
15649         * jit-icalls.c, inssel.brg: fixes to array element address
15650         calculations.
15651
15652 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15653
15654         * mini-x86.c (is_regsize_var): allocate pointer to registers
15655
15656 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15657
15658         * driver.c: fixed typo, added intrins to the set of optimizations
15659         tested with regressions.
15660
15661 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15662
15663         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15664         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15665         test case.
15666
15667 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15668
15669         * inssel.brg: remove some common pop instructions without side effects
15670
15671 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15672
15673         * inssel-x86.brg: fixed thinko in int to double conversions.
15674
15675 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15676
15677         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15678
15679 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15680
15681         * inssel-long32.brg: two more missing instructions.
15682
15683 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15684
15685         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15686         if not already set.
15687
15688 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15689
15690         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15691         correctly.
15692
15693         * basic-float.cs: Added tests for negative zero.
15694
15695 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15696
15697         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15698         a couple of missing operations for long casts, with test cases.
15699
15700 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15701
15702         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15703
15704 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15705
15706         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15707         code size estimation.
15708
15709 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15710
15711         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15712         abstract methods (fix bug 42542)
15713
15714         * aot.c: add ability to handle array types
15715         
15716 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15717
15718         * mini.c: Call the _specific versions of the object allocation
15719         functions if possible.
15720
15721 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15722
15723         * driver.c: call setlocale ().
15724
15725 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15726
15727         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15728         windows build.
15729
15730 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15731
15732         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15733
15734         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15735         wrappers (fix bug 42122)
15736
15737 2003-05-04  Martin Baulig  <martin@ximian.com>
15738
15739         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15740
15741         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15742         s/mini_set_defaults/mono_set_defaults/g.
15743
15744 2003-05-04  Martin Baulig  <martin@ximian.com>
15745
15746         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15747
15748 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15749
15750         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15751         (reported by Don Roberts).
15752
15753 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754
15755         * mini.c: temporarily work around two bugs for this release.
15756
15757 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15758
15759         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15760         that contains -export-dynamic and it makes using the ld script
15761         useless.
15762         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15763
15764 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15765
15766         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15767         specific cpu.
15768
15769 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15770
15771         * mini.c: make sure leave calls all the needed finally blocks,
15772         even when the target jumps out of multiple exception clauses.
15773
15774 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15775
15776         * ldscript, Makefile.am: add linker script to reduce the number of
15777         exported symbols (should also fix the issues with libwine defining
15778         some of the same symbols in io-layer).
15779
15780 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15781
15782         * driver.c (mini_main): Avoid assertion when no file name is given on 
15783         the command line.
15784
15785 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15786
15787         * driver.c: added --version/-V command line option.
15788         Added the inline optimization in the regression tests.
15789
15790 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15791
15792         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15793         to the type in the method signature (fixes bug#42134).
15794
15795 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15796
15797         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15798
15799 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15800
15801         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15802
15803 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15804
15805         * driver.c: fixed bug #42100.
15806
15807 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15808
15809         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15810
15811 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15812
15813         * mini.c: moved most of the code required to do inlining to its own
15814         function so it can be reused. Inline also ctors if appropriate.
15815
15816 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15817
15818         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15819         the runtime can call mono API functions.
15820
15821 2003-04-27  Martin Baulig  <martin@ximian.com>
15822
15823         * debug-mini.c (mono_debug_init_method): Added
15824         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15825         send a notification to the debugger.
15826
15827         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15828         running in the Mono Debugger, just pass the breakpoint number to
15829         mono_debug_init_method().
15830
15831         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15832
15833 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15834
15835         * mini.c: allow some more unsafe compares.
15836
15837 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15838
15839         * mini-x86.c, Makefile.am: make distcheck works (partially from
15840         a patch by Richard Lee <r.h.lee@attbi.com>).
15841         * regset.c, regset.h: removed, they are unused.
15842
15843 2003-04-25  Dick Porter  <dick@ximian.com>
15844
15845         * driver.c: Usage reports the name as 'mono' not 'mini'
15846         * exceptions-x86.c: Build and run on freebsd
15847
15848 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15849
15850         * Makefile.am: install the program with the 'mono' name and
15851         the library as libmono instead of mini and libmini.
15852
15853 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15854
15855         * driver.c: provide the APIs for the embedding interface of the old jit.
15856
15857 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15858
15859         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15860
15861 2003-04-23  Martin Baulig  <martin@ximian.com>
15862
15863         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15864
15865         * driver.c: Added `--debug' command line argument to enable
15866         debugging support.
15867
15868 2003-04-23  Martin Baulig  <martin@ximian.com>
15869
15870         * debug.[ch]: Removed.  The code is now in
15871         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15872
15873         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15874         last six months.
15875
15876 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15877
15878         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15879
15880 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15881
15882         * mini.c:
15883         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15884         mono_domain_finalize.
15885         (mini_method_compile): use mono_method_profile* if the the option is
15886         enabled.
15887
15888 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15889
15890         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15891         methods with their wrapper.
15892
15893         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15894         methods with their wrapper.
15895
15896         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15897         their wrapper.
15898
15899         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15900         wrapper.
15901
15902         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15903         methods.
15904
15905 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15906
15907         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15908
15909 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15910
15911         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15912         of the mempool. This is slightly faster and uses less memory
15913
15914 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15915
15916         * mini.c: avoid O(n) allocation for variables.
15917
15918 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15919
15920         * mini.c: handle items on the stack after inlining methods.
15921
15922 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15923
15924         * mini.c: make the method->opcode optimization dependent
15925         on MONO_OPT_INSTRINS and do it lazily.
15926
15927 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15928
15929         * driver.c: print overall results at the end of regression run.
15930
15931 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15932
15933         * inssel.brg: don't overwrite symbolic registers.
15934
15935 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15936
15937         * inssel-x86.brg: fix conversion from long to float.
15938
15939 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15940
15941         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15942
15943 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15944
15945         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15946
15947         * driver.c: Added --print-vtable option as in the old JIT.
15948
15949 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15950
15951         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15952
15953 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15954
15955         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15956
15957 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15958
15959         * mini.c regalloc.c regalloc.h: Fix memory leak.
15960
15961 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15962
15963         * aot.c (mono_aot_get_method): register all used strings
15964
15965 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15966
15967         * mini.c: always intern strings references with ldstr at compile time.
15968
15969 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15970
15971         * Makefile.am: add BUILT_SOURCES.
15972
15973 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15974
15975         * driver.c: give a better error message when the assembly to execute
15976         doesn't have an entry point.
15977
15978 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15979
15980         * Makefile.am: added hack for automake
15981
15982         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15983         correct sematics.
15984
15985         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15986
15987 22003-04-07  Martin Baulig  <martin@ximian.com>
15988
15989         * Makefile.am: Added Makefile.am.
15990
15991         * debugger-main.c: Removed, this is now in the debugger where it
15992         belongs.
15993
15994         * mini.pc.in: Call this package `mini' for the moment.
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008