Author: Rodrigo Kumpera <kumpera@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * basic-simd.cs: Added tests for Vector8u and Vector16u.
4
5         * basic-simd.cs: Fixed test naming.
6
7 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8
9         * mini-ops.h: Added ops for packed and saturated math, shifts
10         and packing/unpacking.
11
12         * cpu-x86.md: Added descriptors for the above ops.
13
14         * mini-x86.c: Added code to emmit the above ops.
15
16         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
17
18 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
19
20         * aot-compiler.c (compile_method): Enable AOT for generic code.
21
22         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
23
24 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
25
26         * mini.c: add a workaround for a common screwup that ends up blamed
27         to mono (other processes blocking signal delivery).
28
29 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
30
31         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
32         in the LDFLD/STFLD opcodes. Fixes #432673.
33
34         * iltests.il.in: Add a new test.
35
36 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
37
38         * mini-arm.c: attach the thread in unmanaged->managed transitions
39         using delegates (bug #433148).
40
41 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
42
43        * basic-simd.cs: Use new ShuffleSel constants.
44
45 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
46
47         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
48
49         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
50         only disable simd intrinsics if no sse2 is detected.
51
52         * optflags-def.h: Added sse3.
53
54         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
55         is disabled.
56
57 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
58
59         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
60         when adding delegate-invoke wrappers.
61
62 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
63
64         * Makefile.am: Reenable the simd tests.
65
66 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
67
68         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
69           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
70           other vreg is allocated to that hreg.
71
72         Contributed under MIT/X11 license.
73
74 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
75
76         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
77         yet checked in.
78
79 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
80
81         * basic-simd.cs: New test suite for SIMD intrinsics.
82
83         * Makefile.am: Added new tests.
84
85 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
86
87         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
88
89         * mini-ops.h: Same.
90
91         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
92
93         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
94         using SSE2 aware opcodes.
95
96         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
97         is enabled, this code path is only reachable if conversion ops are emmited after
98         mono_method_to_ir.
99
100         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
101
102         This optimization saves 6 bytes per conversion against the old version.
103
104 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
105
106         * aot-compiler.c (compile_method): Don't skip methods referencing 
107         generic methods without a corresponding entry in token_info_hash, since
108         encode_method_ref () can handle all generic methods now.
109
110         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
111         generic context is set.
112         
113         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
114         generic sharing of LDTOKEN.
115
116 2008-10-06  Mark Probst  <mark.probst@gmail.com>
117
118         * mini-amd64.h: Temporarily disabled fast virtual generic method
119         calls because it breaks the System.Runtime.Remoting tests.
120
121 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
122
123         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
124
125         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
126         so inlining actually works.
127         (check_inline_caller_method_name_limit): Ditto.
128
129 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
130
131         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
132         64 bit safety (from Olaf Hering and Andreas Färber).
133
134 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
135         
136         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
137         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
138         unused virtual call support code.
139
140         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
141         
142         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
143         which can't use aot trampolines.
144         (decode_patch): Don't create aot trampolines for methods which can't use
145         them.
146
147         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
148         use aot trampolines.
149
150         * mini.h: Bump AOT image format version.
151         
152 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
153
154         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
155         to save_token_info () since cmethod is inflated for constrained calls.
156
157         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
158
159 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
160
161         * Makefile.am: Add build rules for ppc64.
162         This avoids the build failing at pedump with unresolved symbols
163         due to lack of arch_sources. Instead it will now fail earlier
164         due to lack of cpu-ppc64.md.
165
166         Contributed under MIT/X11 license.
167
168 2008-10-04  Mark Probst  <mark.probst@gmail.com>
169
170         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
171         tail calls.
172
173         * iltests.il.in: Add test case for tail call with many arguments.
174
175 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
176
177         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
178         to the fast virtual generic method code until the aot case is fixed.
179
180 2008-10-03  Mark Probst  <mark.probst@gmail.com>
181
182         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
183
184 2008-10-03  Mark Probst  <mark.probst@gmail.com>
185
186         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
187         thunks.
188
189 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
190         
191         * simd-intrinsics.c: Forgot to add this one.
192
193         * mini-codegen.c: Fix macro in case SIMD is not supported.
194
195 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
196         
197         This patch land initial JIT support for simd intrinsics.
198
199         * mini-x86.h: Added new define to make --enable_minimal work on x86.
200
201         * Makefile.am: Added simd-intrinsics.c
202
203         * simd-intrinsics.c: New file with simd instrinsic related
204         code.
205
206         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
207
208         * cpu-x86.md: Add simd related instructions.
209
210         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
211
212         * driver.c: Added two new --regression variants.
213
214         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
215
216         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
217
218         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
219         extract some complicated logic to helper functions.
220
221         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
222
223         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
224
225         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
226         the specialized simplification pass.
227
228         * method-to-ir.c (mono_spill_global_vars): Use new macro.
229
230         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
231
232         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
233         table.
234
235         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
236         if MONO_ARCH_NEED_SIMD_BANK is defined.
237
238         * mini-ops.h: Added the new simd ops.
239
240         * mini-x86.c: Added mono_arch_xregname.
241
242         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
243
244         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
245
246         * mini-x86.h: Define simd related MONO_ARCH macros.
247
248         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
249
250         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
251
252         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
253         MONO_CLASS_IS_SIMD to deal with simd related IR.
254
255         * mini.h (MonoInst): Added spill_var to the backend union.
256
257         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
258
259         * mini.h: Added forward declarations of the new simd fuctions.
260
261         * optflags-def.h: Added new optimization names SIMD.
262
263         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
264
265         * regalloc.h: Added support for working with 3 register banks.
266
267         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
268
269         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
270
271 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
272
273         * mini-exceptions.c: remove 64 bit related ifdef clutter.
274
275 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
276
277         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
278         instead of one on 64 bit systems.
279
280         * method-to-ir.c: Remove unused includes.
281
282 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
283
284         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
285         cfg->used_int_regs, since the two are different on arm.
286
287 2008-10-02  Mark Probst  <mark.probst@gmail.com>
288
289         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
290         mono_method_get_vtable_index() to get the vtable index.
291
292 2008-10-02  Mark Probst  <mark.probst@gmail.com>
293
294         * method-to-ir.c (mono_method_to_ir2): Don't create native
295         wrappers for array methods, because they're never called (and if
296         they were called they wouldn't work).
297
298 2008-10-02  Mark Probst  <mark.probst@gmail.com>
299
300         * method-to-ir.c (mono_method_to_ir2): Array methods are
301         special-cased and must not be invoked indirectly via the (M)RGCTX
302         when generic sharing is turned on.  Fixes #431413.
303
304 2008-10-01  Mark Probst  <mark.probst@gmail.com>
305
306         * method-to-ir.c: When generic sharing is active, call
307         non-interface virtual generic methods via the standard trampoline.
308
309         * mini-trampolines.c: Handle virtual generic shared methods.
310
311         * mini.h, mini-x86.c, mini-x86.h: New argument for
312         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
313         method thunks and which is the trampoline to call if the lookup
314         fails.  Enable the virtual generic method thunk for x86.
315
316         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
317         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
318         argument but assert that it's NULL, because these archs don't yet
319         implement the virtual generic method thunk.  Changes in the IMT
320         thunk data structures.
321
322 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
323
324         * aot-compiler.c (emit_globals): Avoid invalid characters in
325         the static linking symbol.
326
327         * objects.cs: Add a test for the range check optimization. Fix warnings.
328
329         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
330         optimization from the current JIT.
331
332         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
333         later in decompose_array_access_opts () to allow more optimizations.
334
335         * method-to-ir.c (mono_handle_soft_float): Rename this to 
336         mono_decompose_soft_float () for consistency.
337
338         * mini-ops.h: Fix arguments of OP_STRLEN.
339
340         * method-to-ir.c (save_cast_details): Extract the cast details saving code
341         into a separate function.
342         (reset_cast_details): Ditto.
343         (handle_unbox): Save cast details. Fixes #431254.
344
345         * method-to-ir.c: Remove some obsolete FIXMEs.
346
347 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
348
349         * ir-emit.h (alloc_dreg): Write a warning before crashing.
350
351 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
352
353         * mini-codegen.c: More work on macros to make them
354         ready for multiple regbanks.
355
356 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
357
358         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
359
360         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
361
362 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
363
364         * mini-codegen.c (mono_spillvar_offset): Proper support for
365         multiple regbanks.
366
367 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
368
369         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
370         the stack overflow changes.
371
372 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
373
374         * mini-codegen.c: Make all bank macros depend on reg_bank.
375
376         * mini-codegen.c (mono_local_regalloc): Make free mask
377         initialization regbank aware.
378
379 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
380
381         * mini-codegen.c (mono_local_regalloc): Extract callee
382         mask selection to a function and make it regbank aware.
383
384 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
385
386         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
387         code to deal with many regbanks.
388
389 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
390
391         * mini-codegen.c: More fp->regbank changes.
392
393 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
394
395         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
396         of a hardcoded constant.
397
398 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
399
400         * method-to-ir.c (type_from_stack_type): Fix typo.
401
402 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
403
404         * mini-ia64.c (emit_move_return_value): Convert float return values to
405         double.
406
407         * objects.cs: Add a new test.
408         
409         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
410         VARARG methods to fix an assert later.
411
412         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
413         end so it at least compiles.
414
415 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
416
417         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
418
419 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
420
421         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
422         optimization to a new function (emit_optimized_ldloca_ir) and enable
423         it for both ldloca and ldloca_s.
424
425 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
426
427         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
428         gshared CASTCLASS code.
429
430         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
431         amd64, where the libc stack unwinder encounters stack frames referring to
432         native code in unmapped memory.
433
434         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
435         sharing.
436
437         * generics.cs: Add new test.
438
439 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
440
441         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
442         add a check that one of the ARM_FPU_ constants is defined.
443
444         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
445         
446         * mini-exceptions.c: Fix build on non-altstack platforms.
447
448         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
449         sharing of vtypes.
450
451         * ir-emit.h: Add a comment to NEW_PCONST.
452
453         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
454
455         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
456
457         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
458         after the changes to MonoJitDomainInfo.
459
460 2008-09-27  Mark Probst  <mark.probst@gmail.com>
461
462         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
463
464 2008-09-27  Mark Probst  <mark.probst@gmail.com>
465
466         * mini-ppc.c: Compiler warning fixes.
467
468 2008-09-27  Mark Probst  <mark.probst@gmail.com>
469
470         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
471         for pinvokes.
472
473 2008-09-27  Mark Probst  <mark.probst@gmail.com>
474
475         * exceptions-ppc.c, mini-ppc.h: Compile
476         mono_arch_handle_altstack_exception() on Darwin, too.
477
478 2008-09-27  Mark Probst  <mark.probst@gmail.com>
479
480         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
481         work on archs which don't have generic sharing implemented, only
482         without the vtable_arg.
483
484 2008-09-26  Mark Probst  <mark.probst@gmail.com>
485
486         * mini.c: Added comment explaining why delegate ctor icall
487         wrappers are compiled.
488
489 2008-09-26  Mark Probst  <mark.probst@gmail.com>
490
491         * mini.c: Don't produce trampolines to delegate ctor icall
492         wrappers but compile them upfront.
493
494 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
495
496         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
497         runtime-set function when going back to managed code. Currently this
498         is used to set back the protection on the soft ovf pages and/or to
499         throw the stack overflow exception that happened in unmanaged code.
500
501 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
502
503         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
504         runtime-set function when going back to managed code. Currently this
505         is used to set back the protection on the soft ovf pages and/or to
506         throw the stack overflow exception that happened in unmanaged code.
507
508 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
509
510         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
511         the support code for restoring stack protection after stack overflows
512         that happen in unmanaged code. Don't set the exec permission on the
513         soft overflow area.
514
515 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
516
517         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
518         delegate->method_ptr is set. Fixes #428054.
519
520 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
521
522         * tests.cs: Rename to ratests.cs.
523
524         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
525         emit_get_rgctx_... functions.
526
527 2008-09-25  Mark Probst  <mark.probst@gmail.com>
528
529         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
530
531 2008-09-25  Mark Probst  <mark.probst@gmail.com>
532
533         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
534         before asserting that method is sharable.
535
536 2008-09-25  Mark Probst  <mark.probst@gmail.com>
537
538         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
539         whether method needs a static RGCTX wrapper used instead of
540         complex conditions.
541
542         * generic-sharing.c, mini.h: A few functions moved to
543         metadata/generic-sharing.c.
544
545 2008-09-25  Mark Probst  <mark.probst@gmail.com>
546
547         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
548         Generic code sharing for value types, which essentially means
549         treating value type methods like static methods.  The RGCTX is
550         passed in the same way.
551
552 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
553
554         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
555         opcode when creating multi-dimensional arrays of open types.
556
557         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
558         open generic types.
559
560         * generics.cs: Add a test.
561
562         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
563
564 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
565
566         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
567
568         * mini.c (mini_method_compile): Set it when running under the debugger. 
569
570         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
571         vreg optimization if the flag is set.
572
573         * driver.c (mono_main): Add --attach= option to pass options to
574         the attach agent.
575
576         * mini.c (sigquit_signal_handler): Start the attach agent.
577
578         * ssapre.c: Disable this to save space since it is not yet ported to
579         linear IR.
580
581         * regalloc2.c: Disable this to save space.
582
583         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
584
585 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
586
587         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
588         the -v option useful again.
589
590 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
591
592         * mini-amd64.c (mono_arch_output_basic_block): Add support for
593         --break-at-bb.
594
595         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
596         arrays of arrays. Fixes #428406.
597
598         * method-to-ir.c (mini_emit_castclass): Ditto.
599
600         * objects.cs: Add new test.
601         
602 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
603
604         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
605         was wrong at it choked against target_type_is_incompatible for byref types.
606
607 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
608
609         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
610         places.
611
612 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
613
614         * mini-exceptions.c: update a few more exceptions-related counters.
615
616 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
617
618         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
619         new functions to allocate from persistent mempools.
620
621 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
622
623         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
624         multiple register banks in the future.
625
626         * mini-codegen.c (mono_local_regalloc): Fix a warning.
627
628 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
629
630         * mini.c (type_to_eval_stack_type): Remove duplicated function.
631
632         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
633
634         * mini.h: Export type_to_eval_stack_type.
635
636         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
637         is only ins->klass of byref types.
638
639 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
640
641         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
642         (mini_emit_memcpy2): Ditto.
643
644         * mini-amd64.c: Fix a warning.
645
646 2008-09-21  Mark Probst  <mark.probst@gmail.com>
647
648         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
649         linking.
650
651 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
652
653         * method-to-ir.c: Extract stloc micro-optimization to a
654         function and apply it to all cases.
655
656 2008-09-19  Mark Probst  <mark.probst@gmail.com>
657
658         * method-to-ir.c: Don't fail generic code sharing in cases we
659         already support.
660
661 2008-09-18  Mark Probst  <mark.probst@gmail.com>
662
663         * mini-ppc.c: Handle structs in tailcalls on Darwin.
664
665 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
666
667         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
668         implementation.
669
670 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
671
672         * trace.c: make tracing more useful and correct, with per-thread
673         id and indent info.
674
675 2008-09-15  Mark Probst  <mark.probst@gmail.com>
676
677         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
678         doing a method call and the argument is an R4.
679
680 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
681
682         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
683         generic methods.
684
685 2008-09-13  Mark Probst  <mark.probst@gmail.com>
686
687         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
688
689 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
690
691         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
692         (MONO_JUMP_TABLE_FROM_INS): Ditto.
693
694 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
695
696         * driver.c: Add a --agent argument (not supported yet) to load managed
697         agent assemblies before loading the main assembly, similarly to how the
698         Java VM handles agents.
699
700 2008-09-11  Mark Probst  <mark.probst@gmail.com>
701
702         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
703         function to do stack layout of local variables.
704
705 2008-09-11  Mark Probst  <mark.probst@gmail.com>
706
707         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
708         calculation.
709
710 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
711
712         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
713         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
714         JIT if DISABLE_JIT is defined.
715
716         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
717         defined.
718
719 2008-09-10  Mark Probst  <mark.probst@gmail.com>
720
721         * iltests.il.in: Disable the fconv test on PPC (the result is
722         undefined according to ECMA).
723
724 2008-09-10  Mark Probst  <mark.probst@gmail.com>
725
726         * iltests.il.in: Enable tail call tests for PPC.
727
728         * mini.h: Add variable for storing incoming valuetype argument
729         addresses for tail calls.
730
731         * mini-ppc.c: Implement valuetype arguments and return values for
732         tailcalls on Linux.
733
734 2008-09-09  Mark Probst  <mark.probst@gmail.com>
735
736         * mini-ppc.c: Partially implement tail calls (struct arguments and
737         return values not supported).
738
739         * method-to-ir.c: Enable tail calls on PPC.
740
741 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
742
743         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
744         runtime-invoke wrappers to work around the problem of them getting
745         assigned to a random class.
746
747         * aot-runtime.c (mono_aot_get_method): Ditto.
748         
749 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
750
751         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
752         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
753
754 2008-09-07  Mark Probst  <mark.probst@gmail.com>
755
756         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
757         until they're implemented properly.
758
759         * exceptions-ppc.c: Use arch-independent exception-handling code
760         instead of custom one.
761
762         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
763         for Linear IR.
764
765         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
766
767         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
768         applies when __powerpc__ is defined.
769
770 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
771
772         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
773         methods to their code to avoid computing the full name of wrappers and
774         doing a lookup in a string hash table.
775
776 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
777
778         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
779         we identify bblocks before method_to_ir () is ran.
780
781         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
782         Also avoid optimizing branches pointing to themselves.
783
784         * mini.c (mini_method_compile): Ditto. Fixes #422947.
785
786 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
787
788         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
789
790 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
791
792         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
793         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
794         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
795         'buf'.
796
797         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
798         jumped to the same entry in plt_jump_table.
799
800 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
801
802         * method-to-ir.c (initialize_array_data): Handle field with RVA from
803         dynamic images.
804
805 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
806
807         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
808         other assignment can be if converted. Saves 1.5% on corlib size and fixes
809         #421807.
810
811 2008-08-29  Geoff Norton  <gnorton@novell.com>
812
813         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
814         segment, and doesn't properly handle .space as .text.  Fixes
815         AOT Mach/ARM
816
817 2008-08-29  Geoff Norton  <gnorton@novell.com>
818
819         * mini.c: Disable the mach exception handler when running on 
820         ARM
821
822 2008-08-29  Geoff Norton  <gnorton@novell.com>
823
824         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
825         globals on Darwin/ARM
826
827 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
828
829         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
830         since too many things depend on it. Instead, call 
831         mono_runtime_set_no_exec ().
832         
833         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
834         the new JIT.
835
836         * aot-compiler.c: Add an 'asm-only' AOT option.
837
838         * mini.c: Avoid initializing the runtime when doing AOT compilation.
839                 
840         * aot-compiler.c (compile_method): Disable gshared support for now as it
841         doesn't yet work.
842
843 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
844
845         * mini-amd64.h : Fix a compiler warning.
846
847         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
848           Changed to use a callback function to retrieve the unwind info.
849           This avoids problems observed when code blocks were removed by
850           unloading an app domain.
851
852         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
853           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
854           to work properly.
855
856         Contributed under MIT/X11 license.
857
858 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
859
860         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
861           case to keep the stack aligned to 8.
862
863         Contributed under MIT/X11 license.
864
865 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
866
867         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
868         avoid repeated linear searches.
869
870 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
871
872         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
873         methods it can't handle.
874         
875         * aot-compiler.c (add_method): Avoid adding a method twice.
876         (add_wrappers): Add runtime invoke wrappers for all methods.
877
878         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
879         function to create an aot-compatible version of this trampoline.
880
881         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
882
883 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
884
885         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
886
887         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
888         with a generic sharing failure.
889
890         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
891
892         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
893         CEE_RETHROW. Fixes #419634.
894
895         * mini.c (mono_method_to_ir): Ditto.
896
897         * exceptions.cs: Add a new test.
898         
899         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
900         to mono_type_stack_size_internal () since some callers might not pass in
901         an rgctx.
902
903         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
904         instrument_prolog. Fixes #419878.
905
906         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
907         doubles in soft float mode volatile.
908
909 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
910
911         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
912
913         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
914         to handle soft float correctly.
915
916         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
917         the fast path.
918
919         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
920
921         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
922         to sp, since the generics catch code requires it.
923
924         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
925         copying.
926
927         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
928         mono_arch_emit_imt_argument ().
929
930         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
931
932         * mini-arm.c tramp-arm.c: Generic sharing updates.
933
934 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
935
936         * mini-arm.c: Fix the arm build.
937
938         * generic-sharing.c (mini_type_get_underlying_type): New helper function
939         handling enums, generic instances and generic sharing.
940         (mini_type_stack_size_full): Ditto.
941
942         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
943         
944         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
945
946         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
947
948         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
949         trampolines.
950
951         * mini-arm.c: Various small generic sharing changes.
952
953         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
954         this for x86.
955         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
956         custom code.
957
958         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
959         helper function to return a generic class init trampoline.
960
961         * method-to-ir.c mini.c: Use it.
962         
963         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
964         arch-specfic function to return a generic class init trampoline.
965
966         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
967         the GENERIC_CLASS_INIT custom code.
968
969         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
970         a fatal error, not a sharing failure.
971
972         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
973         needed.
974
975         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
976         trampoline argument from MONO_ARCH_VTABLE_REG.
977
978         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
979         order of the arguments to the C trampoline: pass 'slot' as the trampoline
980         argument, and pass the vtable in VTABLE_REG.
981
982         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
983         order of the arguments to the C trampoline: pass 'slot' as the trampoline
984         argument, and pass the vtable in VTABLE_REG.
985         (mono_arch_create_trampoline_code_full): Remove some special casing for
986         the rgctx fetch trampoline.
987
988         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
989         Fixes #419273.
990
991         * iltests.il: Add a test for it.
992
993 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
994
995         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
996
997         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
998         no longer needed.
999
1000         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1001         use mono_jit_info_table_find () to avoid recursion.
1002         (mono_delegate_trampoline): Add a sync wrapper here.
1003
1004         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1005         here.
1006
1007         * mini.c (mono_method_to_ir): Ditto.
1008         
1009         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1010         add_sync_wrapper argument. Don't add a sync wrapper here.
1011         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1012
1013         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1014         
1015 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1016
1017         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1018           of nonvolatile registers back from MonoContext to CONTEXT.
1019
1020         Contributed under MIT/X11 license.
1021
1022 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1023
1024         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1025           arguments on Winx64 there are only 4 argument registers.  For this
1026           logic to work the last argument must be pulled from the stack.  
1027
1028         Contributed under MIT/X11 license.
1029
1030 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1031
1032         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1033
1034         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1035         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1036         encode/decode_method_ref ().
1037
1038         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1039
1040         * aot-runtime.c (decode_patch): Ditto.  
1041
1042         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1043         MONO_PATCH_INFO_METHOD.
1044
1045         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1046         MonoGenericJitInfo.
1047
1048         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1049         MonoGenericJitInfo.
1050
1051         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1052
1053         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1054         one from the caller.
1055
1056         * aot-runtime.c (decode_generic_inst): New function to decode and
1057         return a interned generic inst.
1058         (decode_klass_ref): Use it.
1059         (decode_method_ref): Ditto.
1060
1061         * aot-compiler.c (emit_exception_debug_info): Save 
1062         jinfo->has_generic_jit_info too.
1063
1064 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1065
1066         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1067
1068         * iltests.il.in: Add a test for fconv_to_i.
1069
1070         * liveness.c: Disable the liveness2 pass for now to save space.
1071
1072         * regalloc2.c: Include mempool-internals.h to fix warnings.
1073
1074         * aot-compiler.c (encode_method_ref): Encode the context of generic
1075         instance methods.
1076
1077         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1078         the context saved in the aot file.
1079
1080         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1081
1082         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1083
1084         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1085         volatile so they won't be optimized away.
1086
1087 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1088
1089         * ssa.c:
1090         * ssa2.c:
1091         * mini.c:
1092         * regalloc2.c:
1093         * dominators.c: Remove duplicated functions that now are in
1094         mempool-internals.h.
1095
1096 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1097
1098         * aot-compiler.c: Fix warnings.
1099
1100         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1101
1102         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1103
1104         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1105         as the patch type.
1106
1107         * mini.c (mono_resolve_patch_target): Ditto.
1108         
1109         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1110         (encode_klass_ref): Add support for encoding VARs/MVARs.
1111
1112         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1113
1114         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1115         the handling of the got entries into a separate 'decode_got_entry' function.
1116         Add support for RGCTX_FETCH.
1117
1118         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1119         clobbered by the trampoline code.
1120
1121         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1122         not clobbered by the indirect calling code.
1123
1124 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1125
1126         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1127         to fix the build.
1128
1129 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1130
1131         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1132         signature using the compilation mempool otherwise we would leak it.
1133
1134 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1135
1136         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1137         mono_emit_abs_call ().
1138
1139         * patch-info.h: Add GENERIC_CLASS_INIT.
1140
1141         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1142
1143         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1144         as their target as a near call.
1145
1146         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1147         ABS handling code.
1148         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1149
1150         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1151         call to a runtime function described by a patch.
1152
1153         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1154         mono_emit_abs_call, this has the advantage that the ABS handling code in
1155         mono_codegen () can handle them both, and can handle other stuff in the
1156         future without additional code.
1157
1158         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1159         entry.
1160         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1161         abs addresses.
1162
1163         * mini.h: Add missing bblock related prototypes.
1164
1165         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1166         reverse_inst_list_len fields.
1167
1168         * mini.c: Refactor this file a bit by moving branch optimizations to 
1169         branch-opts.c.
1170
1171         * method-to-ir.c: Merge generic sharing changes missed earlier.
1172
1173         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1174
1175         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1176         shared patches. Process METHODCONST as a shared patch.
1177
1178         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1179         as it crashes on the 2.0 mscorlib.
1180
1181         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1182         to cause crashes.
1183         
1184         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1185         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1186         by IMT.
1187
1188         * aot-compiler.c: Reorganize the got handling code to be a bit more
1189         understandable.
1190
1191 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1192
1193         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1194         mono_patch_info_equals/hash, and use it to massively simplify
1195         get_plt_index ().
1196
1197         * mini.c (mono_patch_info_hash): Simplify this and add support for
1198         more patch types.
1199
1200         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1201
1202         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1203         handling code, since an offset is not enough to identify a trampoline.
1204
1205         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1206
1207 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1208
1209         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1210
1211         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1212
1213         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1214
1215         * decompose.c: PPC decompositions for various ops.
1216
1217         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1218
1219 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1220
1221         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1222         call the generic trampoline code using a call, instead of a jump, to
1223         remove some special casing from the generic trampoline code.
1224
1225         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1226         (mono_codegen): Ditto.
1227
1228         * aot-compiler.c aot-runtime.c: Ditto.
1229
1230         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1231
1232         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1233         helper function to find the offset corresponding to a lazy fetch trampoline.
1234
1235         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1236         when doing generic sharing.
1237
1238         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1239         places.
1240         
1241         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1242         mini-trampolines.c to be with the other trampoline creation functions.
1243
1244         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1245         as it is equal to method->signature in most cases, add a 
1246         mono_emit_method_call_full variant which takes a signature and an imt
1247         argument as well.
1248
1249 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1250
1251         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1252         to this function, since it could be computed easily from the method 
1253         argument.
1254         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1255         more.
1256
1257         * method-to-ir.c mini.c: Remove references to 
1258         compile_generic_method_wo_context.
1259
1260         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1261         generic method calls.
1262         
1263         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1264         dimensional non-szarrays.
1265
1266         * mini.c (mini_init): Register mono_array_new_1.
1267
1268         * jit-icalls.c (mono_array_new_1): New jit icall.
1269
1270         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1271         pointing to the method.
1272
1273         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1274         method addresses belonging to METHOD_JUMP patches in the 
1275         jump_target_got_slot_hash.
1276         (mono_aot_load_method): Ditto.
1277
1278         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1279         METHOD_JUMP patches.
1280
1281         * mini.c (mini_create_jit_domain_info): New helper function which 
1282         initializes/frees domain->runtime_info.
1283         (mini_free_jit_domain_info): Ditto.
1284         (mini_init): Install the domain hook functions with the runtime.
1285
1286         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1287         information maintained by the JIT.
1288
1289         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1290         insertion into jump_table_hash into mono_codegen (), also implement proper
1291         locking.
1292
1293         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1294         tail calls, it is already done by the aot code.
1295         
1296         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1297         mechanism on amd64.
1298
1299         * iltests.il.in: Make the jmp test a bit more complex.
1300
1301         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1302         generic instances which doesn't have a token.
1303
1304         * aot-runtime.c (decode_method_ref): Ditto.
1305         
1306         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1307         can handle this case now.
1308         (handle_box): Ditto.
1309
1310 2008-08-15  Geoff Norton  <gnorton@novell.com>
1311
1312         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1313         debugging check.
1314
1315 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1316
1317         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1318         calling generic methods.
1319
1320         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1321
1322         * aot-runtime.c (decode_patch_info): Ditto.
1323
1324         * mini.c (mono_resolve_patch_target): Ditto.
1325         
1326         * patch-info.h: Add METHOD_RGCTX.
1327
1328         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1329
1330 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1331
1332         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1333         arguments in registers.
1334
1335         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1336         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1337
1338         * mini.c (mini_method_compile): Abort aot compilation for generic
1339         methods if generic sharing is disabled.
1340         
1341         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1342         an mrgctx.
1343
1344         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1345         requiring an mrgctx.
1346
1347         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1348         store instructions when converting a vcall to a normal call.
1349
1350         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1351         mono_arch_find_jit_info.
1352
1353 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1354
1355         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1356         avoid calling mono_method_full_name () for every method even if the
1357         env var is not set.
1358         (check_inline_caller_method_name_limit): Ditto.
1359
1360 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1361
1362         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1363         assemblies in one run.
1364
1365         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1366         skipped methods if it is not 0.
1367
1368         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1369
1370 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1371
1372         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1373           MONO_ARCH_HAVE_UNWIND_TABLE.
1374
1375         Contributed under MIT/X11 license.
1376
1377 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1378
1379         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1380           from default optimizaton list on Winx64.
1381
1382         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1383
1384         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1385           the LMF from the MonoJitTlsData structure.
1386
1387         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1388
1389         Contributed under MIT/X11 license.
1390
1391 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1392
1393         * mini.c (sigsegv_signal_handler): Fix the build.
1394
1395         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1396         assembly->aot_module.
1397
1398         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1399         hash table. This simplifies and speeds up a lot of code, and fixes support
1400         for .netmodules.
1401
1402         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1403         with the runtime.
1404
1405         * mini-exceptions.c: Ditto.
1406         
1407         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1408         'native_offset' argument, since these are computed in the 
1409         mono_find_jit_info () function.
1410
1411         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1412         is used by exceptions-ppc.c.
1413
1414         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1415         mono_arch_find_jit_info ().
1416         
1417         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1418         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1419         generic code in mini-exceptions.c.
1420
1421 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1422
1423         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1424
1425         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1426         
1427         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1428         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1429         called while holding the loader lock. Fixes #415608.
1430         (mono_aot_get_method_from_token_inner): Ditto.
1431
1432 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1435         to reduce differences between this and the generic implementation in
1436         mini-exceptions.c.
1437         (ves_icall_get_frame_info): Ditto.
1438
1439         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1440
1441         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1442         longer neccesarry.
1443
1444         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1445         mono_arch_get_call_filter () and make it non-static, for consistency with the
1446         other architectures.
1447
1448 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1449
1450         * mini.c:
1451         * local-propagation.c:
1452         * mini-x86.c: Correct the name of arch defines.
1453
1454 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1455
1456         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1457         NO_EMULATE_LONG_SHIFT_OPS define.
1458
1459 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1460
1461         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1462         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1463
1464         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1465         MACH fixes. Merged from the 2.0 branch.
1466
1467         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1468
1469         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1470         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1471
1472         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1473
1474         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1475         mono_marshal_get_native_wrapper () signature changes.
1476
1477 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1478
1479         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1480         conversion bug under arm.
1481
1482 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1483
1484         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1485
1486         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1487         with overflow checking.
1488
1489 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1490
1491         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1492         to the genmdesc.pl file
1493
1494 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1495
1496         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1497         arg_array in the soft-float versions of the LOAD/STORE macros.
1498
1499         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1500         implementation.
1501
1502         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1503
1504 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1505
1506         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1507         a float HFA. Fixes #413621.
1508
1509 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1510
1511         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1512         frame_size to args_size. Fixes build.
1513
1514 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1515
1516         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1517         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1518
1519         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1520         the stack are not unaligned. Fixes #413247.
1521         
1522 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1523
1524         * mini.c: update jitted methods performance counters.
1525
1526 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1527
1528         * mini-exceptions.c: increase the exceptions thrown performance
1529         counter in mono_handle_exception ().
1530
1531 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1532
1533         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1534         can work with netmodules.
1535
1536 2008-07-28  Geoff Norton  <gnorton@novell.com>
1537
1538         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1539         regression tests.
1540
1541 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1544         correct place.
1545
1546 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1547
1548         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1549           The float param registers and other param registers must be the 
1550           same index on Windows x64.
1551
1552         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1553           ArgValuetypeAddrInIReg argument case.  Setting the argument
1554           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1555
1556         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1557           variable computed above as the copy length for arguments of storage
1558           type ArgValuetypeAddrInIReg.
1559
1560         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1561           ArgValuetypeAddrInIReg argument case.  This case will rely on
1562           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1563
1564         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1565           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1566           jump and tail call instructoins as they do not follow the typical call behavior.
1567
1568         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1569           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1570           local variable and pass the local variable by reference to the called method.
1571
1572         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1573           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1574           of a struct is passed in a register it must be saved with the other
1575           volatile argument on the stack.
1576
1577         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1578           frame pointer the stack adjustment value must be saved to the unwind 
1579           info structure.
1580
1581         Contributed under MIT/X11 license.
1582
1583 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1584
1585         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1586         which got lost in the merge.
1587
1588 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1589
1590         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1591         build.
1592
1593         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1594         
1595         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1596         icalls, since they won't be patched.
1597
1598         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1599         different code sequence when running under valgrind to prevent some valgrind
1600         errors.
1601
1602         * iltests.il.in: Add new regression test.
1603
1604         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1605         end with a throw.
1606
1607         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1608         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1609
1610         * iltests.il.in: Add new test.
1611
1612         * aot-compiler.c: Fix some warnings.
1613
1614         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1615         Fixes #412494.
1616
1617 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1618
1619         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1620         (mini_usage_jitdeveloper): Add a missing --wapi option.
1621
1622 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1623
1624         * mini-codegen.c: Simplify the is_fp macros.
1625         (free_up_ireg): Remove, use free_up_reg instead.
1626         (free_up_reg): Fix the fp case.
1627
1628 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1629
1630         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1631         lowered earlier.
1632
1633         * exceptions-x86.c: Merge some changes which seemed to have got lost
1634         in the linear-ir merge.
1635
1636         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1637
1638         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1639         long vreg volatile even if the variable was already created.
1640
1641         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1642         volatile variables.
1643
1644 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1645
1646         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1647
1648         * mini.c (mono_jit_compile_method_inner): Add support for 
1649         MONO_EXCEPTION_BAD_IMAGE.
1650
1651         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1652         mini_method_get_context () returns NULL. Fixes #356531.
1653
1654         * mini.c (mono_method_to_ir): Ditto.
1655         
1656         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1657         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1658
1659 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1662         in the LDFTN implementation.
1663
1664 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1665
1666         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1667         code, patch calls to icalls, too, even if they're not in the
1668         shared generic code hash.  Fixes #411962.
1669
1670 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * cpu-x86.md: Increase the length of the fcall opcodes.
1673
1674         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1675         calls returning floats.
1676
1677         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1678         on NEWARR.
1679         
1680         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1681         missed earlier.
1682
1683         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1684         into the domain->method_code_hash.
1685
1686         * aot-compiler.c: Fix win32 build.
1687
1688         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1689         
1690         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1691         gshared NEWARR implementation.
1692
1693         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1694
1695         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1696         can be used outside of method_to_ir.
1697
1698         * mini.h (MonoCompile): Add arg_types field.
1699
1700         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1701         
1702         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1703         the values of the local arg_array and param_types array.
1704
1705 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1706
1707         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1708         got accesses might only get generated later when NEWOBJ is decomposed.
1709         
1710         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1711         looking up the native code of the target method when a delegate is called
1712         for the first time.
1713
1714         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1715         optimization.
1716
1717         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1718
1719         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1720         AOT work on platforms without a working dlsym implementation.
1721
1722         * mini.h: Bump AOT image format version.
1723         
1724 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1725
1726         * mini-exceptions.c: Free a MonoType with
1727         mono_metadata_free_type() instead of g_free().
1728
1729         * aot-runtime.c: Free a MonoType.
1730
1731 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1732
1733         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1734         optimization.
1735
1736         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1737         fp stack on x86.
1738
1739 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1740         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1741         profiler hook.
1742
1743 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1744
1745         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1746         NEWOBJ calls on valuetypes.
1747
1748         * iltests.il.in: Add new test.
1749
1750         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1751
1752 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1755         is no longer needed.
1756
1757         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1758         non register sized integer arguments.
1759         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1760         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1761         emit_memcpy2 ().
1762
1763         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1764         CEE_MONO_RETOBJ.
1765         
1766         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1767         two a binop with different sized arguments is emitted.
1768
1769         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1770         instruction in the ins==NULL case.
1771
1772 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1773
1774         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1775
1776         * mini-x86.c: Fix osx build.
1777
1778         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1779         opcodes as well.
1780
1781         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1782         instruction for non int sized variables.
1783
1784         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1785         implementation.
1786
1787 2008-07-23  Robert Jordan  <robertj@gmx.net>
1788
1789         * method-to-ir.c: Fix MSVC build.
1790
1791 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1792
1793         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1794         a non int sized type, widen it to an int since newer versions of gcc seem to
1795         generate code which needs this.
1796
1797         * ssa2.c abcremoval2.c: Fix warnings.
1798
1799         * *: Merge the Linear IR branch.
1800
1801         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1802         the ChangeLog file there describes all the changes done over the years. 
1803         Further documentation can be found at www.mono-project.com/Linear_IL.
1804
1805 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1806
1807         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1808           The float param registers and other param registers must be the 
1809           same index on Windows x64.
1810
1811         Contributed under MIT/X11 license.
1812
1813 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1814
1815         * mini.c: Make the previous fix GC safe.
1816
1817 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1818
1819         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1820
1821 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1822
1823         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1824           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1825           ArgValuetypeAddrInIReg instead.
1826
1827         Contributed under MIT/X11 license.
1828
1829 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1830
1831         * mini-codegen.c (get_register_spilling): Fix a warning.
1832
1833 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1834
1835         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1836         for types which the initialization fails. Raises the provided exception
1837         at the right stop after cleanup.
1838
1839 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1840
1841         * aot-compiler.c: Free most of the memory allocated during compilation.
1842
1843         * mini.c (mini_parse_debug_options): Fix a leak.
1844         
1845         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1846         during aot compilation.
1847
1848 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1849
1850         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1851         it has too much register pressure.
1852
1853 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1854
1855         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1856
1857 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1860         on x86.
1861
1862         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1863         on amd64 similar to the way it is done on arm.
1864
1865         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1866
1867         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1868         consistency, normalize error messages, avoid loading aot-only modules in
1869         normal mode.
1870
1871         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1872         for consistency.
1873
1874         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1875
1876 2008-07-11  Martin Baulig  <martin@ximian.com>
1877
1878         * debug-debugger.h
1879         (MonoDebuggerInfo): Add `interruption_request'.
1880
1881 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * aot-compiler.c (emit_plt): Remove some dead code.
1884
1885         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1886
1887         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1888         return the plt info offset belonging to a given plt entry.
1889
1890         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1891         mono_aot_get_plt_info_offset.
1892         
1893         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1894         similar to the amd64 code by makeing jumps through a separate jump table 
1895         instead of embedding the jump addresses into the code.
1896
1897 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1898
1899         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1900         method.
1901
1902 2008-07-10  Martin Baulig  <martin@ximian.com>
1903
1904         * mini.c (mini_method_compile): Disable generics sharing when
1905         running in the debugger.
1906
1907 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1908
1909         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1910
1911         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1912         the local register allocator from running out of registers on x86 when 
1913         using aot.
1914
1915 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1916
1917         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1918         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1919         C4146.
1920
1921         Contributed under MIT/X11 license.
1922
1923 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1924
1925         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1926         speed up the assembler.
1927
1928 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1929
1930         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1931         support.
1932
1933         * mini.c: Move the soft float handling macros a bit earlier, add 
1934         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1935         place.
1936
1937         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1938
1939         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1940         read-only to help catch code allocation requests.
1941         
1942         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1943         and turn it off when using --aot-only or when compiling with --aot=full.
1944
1945         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1946         jump table for switches from the normal domain mempool, not the code
1947         manager.
1948
1949         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1950         unbox trampoline which handles aot-only mode too.
1951
1952         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1953         an AOTed unbox trampoline.
1954
1955         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1956
1957 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1958
1959         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1960         ""
1961
1962         Contributed under MIT/X11 license.
1963
1964 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1965
1966         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1967           the unwind information for the method at the end of the allocated block.
1968           
1969         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1970           MonoCompileArch to hold the unwind info for SEH on Winx64
1971         
1972         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1973           frame pointer info for the method being compiled.
1974           
1975         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1976           the call to mono_exception_from_token.
1977           
1978         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1979           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1980           information is stored a the end of the method block because it is all 32-bit offset based.
1981
1982         Contributed under MIT/X11 license.
1983
1984 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1985
1986         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1987
1988         * wapihandles.c: Fix warnings.
1989
1990         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1991         mode.
1992
1993         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1994         mono_jit_compile_method in aot-only mode since that calls the type 
1995         initializer.
1996         
1997         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1998         get_delegate_invoke_impl in aot-only mode.
1999
2000         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2001
2002 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2003
2004         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2005
2006         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2007         is on by default.
2008
2009         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2010
2011         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2012         init trampoline from the AOT file as well.
2013
2014         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2015         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2016         code.
2017
2018         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2019         mono_init.
2020
2021         * exceptions-amd64.c: Add _full variants for the remaining exception code
2022         creation functions as well, allow emission of relocatable code, remove
2023         caching since that is now done by the caller.
2024
2025         * mini-exceptions.c: Add _full variants for the remaining exception code
2026         creation functions as well, add aot-only support.
2027
2028         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2029         if we can determine a proper token for them.
2030         (add_wrappers): Add a few more wrappers.
2031         (emit_method_code): Remove some dead code.
2032         (emit_trampolines): Emit exception code too.
2033
2034         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2035
2036         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2037         mono_array_new_va which avoids varargs.
2038
2039         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2040
2041         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2042         mono_arch_create_specific_trampoline () in all places.
2043
2044         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2045         a bit so it can be used for other things as well.
2046         
2047         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2048         on demand as well.
2049
2050         * exceptions-amd64.c: Rename the caching from the exception code creation
2051         functions, it is done by the caller instead.
2052         
2053         * exceptions-amd64.c: Change the signature of the exception code creation 
2054         functions to allow the creation of relocatable code later.
2055
2056         * mini-exceptions.c: Add a set of functions to query the various 
2057         runtime-generated exception functions.
2058
2059         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2060         mono_arch_.. () functions.
2061         
2062 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2063
2064         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2065
2066         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2067
2068         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2069         (mini_get_vtable_trampoline): Ditto.
2070
2071         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2072         code in the AOT case by returning the code size and a list of relocations to
2073         the caller.
2074
2075         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2076
2077 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2078
2079         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2080           clean the stack.
2081
2082         Contributed under MIT/X11 license.
2083
2084 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2085
2086         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2087         so the buffer size can be computed correctly. Fixes #404735.
2088
2089         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2090         normally as cfg->debug_info is already freed.
2091
2092 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2093
2094         * mini-amd64.c: For calls returning vtypes in registers, don't store
2095         the return address on the stack, instead allocate a separate local for
2096         it. Fixes #404729.
2097
2098 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2099
2100         * mini-trampolines.c, mini.h: Add an argument to
2101         mono_create_jit_trampoline_in_domain() for turning off the adding
2102         of the sync wrapper.
2103
2104         * mini.c: Use the JIT trampoline without sync instead of
2105         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2106         be patched.
2107
2108 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2109
2110         * driver.c: Turn on GSHARED optimization by default.
2111
2112 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2113
2114         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2115         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2116
2117         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2118         create a variant of the generic trampoline code callable from AOTed trampolines.
2119
2120         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2121         trampoline code callable from AOTed trampolines.
2122
2123         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2124
2125 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2126
2127         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2128         pass-through manner.
2129
2130         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2131         and don't fail sharing for them anymore.
2132
2133         * mini-exceptions.c: Handle exceptions in shared generic methods.
2134
2135         * generic-sharing.c: When checking the context of a generic
2136         method, also check its class's context.  Don't treat wrappers as
2137         sharable.
2138
2139         * mini-trampolines.c: Some code factored out to
2140         metadata/generic-sharing.c.  Handle the MRGCTX case.
2141
2142         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2143         we must deal with the method being of another instantiation of the
2144         class.  Add static rgctx invoke wrappers to generic methods.
2145
2146 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2147
2148         * mini.c: Provide all jit infos of generic shared methods with a
2149         generic jit info.
2150
2151         * mini-exceptions.c: Handle the new situation that a generic info
2152         might be available, but not info about the this/vtable/mrgctx
2153         variable.
2154
2155 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2156
2157         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2158         generic methods.
2159
2160 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * dominators.c (check_dominance_frontier): Fix a warning.
2163
2164         * mini.h: Add some missing prototypes.
2165
2166         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2167
2168         * driver.c (mono_jit_init_version): Correct the comments since the first
2169         argument should be the name of the root domain, not a filename.
2170
2171         * aot-runtime.c (make_writable): Error out if this is called while running
2172         with --aot-only.
2173         (load_aot_module): Ditto.
2174
2175         * aot-compiler.c: Really fix the computation of method indexes.
2176
2177         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2178         optimizations as this is no longer called frequently.
2179
2180         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2181         method and the invoke impl code and pass it to the delegate trampoline instead of
2182         just the delegate class.
2183
2184 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2185
2186         * aot-compiler.c: Fixup the computation of method indexes.
2187         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2188         the method builder infrastructure.
2189
2190         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2191         has no header.
2192
2193         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2194         mode, load the method right away instead of creating a trampoline.
2195
2196         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2197
2198         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2199         some checks a bit.
2200
2201 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2202
2203         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2204         (mono_aot_load_method): Use method_index instead of method->token.
2205
2206         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2207         can handle icalls etc. properly.
2208
2209         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2210
2211         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2212
2213         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2214         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2215         JIT_ICALL_ADDR patch type.
2216
2217         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2218
2219         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2220         request flag.
2221         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2222
2223         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2224
2225 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2226
2227         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2228         domain->jit_code_hash.
2229
2230 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2231
2232         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2233
2234 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2235
2236         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2237         get_this_arg_from_call, let it compute it when needed.
2238
2239         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2240         gsctx from code only when needed.
2241
2242         * mini-trampolines.c (get_generic_context): Rename this to 
2243         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2244         it can be called by the arch backends.
2245
2246         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2247
2248 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2249
2250         * driver.c (mono_main): Add experimental --aot-only command line option.
2251
2252         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2253         set.
2254
2255 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2256
2257         * driver.c (DllMain): Remove mono_module_handle.
2258
2259         Contributed under MIT/X11 license.
2260
2261 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2262
2263         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2264         for emitting methods which are not in the source assembly. Detect and report
2265         failure of assembling+linking.
2266         
2267         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2268
2269         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2270
2271 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2272
2273         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2274
2275 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2276
2277         * mini.h: Remove some obsolete prototypes.
2278
2279         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2280
2281 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2282
2283         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2284         supported by Visual Studio, so use alloca().
2285
2286 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2287
2288         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2289         Fixes #402585.
2290
2291 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2292
2293         * mini.c: Fail sharing of a generic method if it contains an open
2294         catch clause (because we don't pass MRGCTXs yet).
2295
2296 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2297
2298         * mini.c: When compiling a method with generic sharing, insert the
2299         method instantiated with an all-Object generic context into the
2300         jit info table, instead of the context of the first instantiation
2301         of the method we happen to compile.
2302
2303 2008-06-18  Martin Baulig  <martin@ximian.com>
2304
2305         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2306         `major_version' and `minor_version'.
2307
2308 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2309
2310         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2311         mono_method_is_generic_sharable_impl() takes an additional
2312         argument specifying whether to treat type variables as reference
2313         types.
2314
2315 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2316
2317         * mini.h: Removed obsolete prototypes.
2318
2319 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2320
2321         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2322         already handle them.
2323
2324 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2325
2326         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2327         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2328         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2329         tramp-x86.c: Added a MonoGenericContext* argument to
2330         mono_arch_get_unbox_trampoline() so that it can call other
2331         functions which require it.
2332
2333 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2334
2335         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2336         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2337         mono_arch_get_this_arg_from_call() takes a
2338         MonoGenericSharingContext* as well.
2339
2340 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2341
2342         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2343         implement generic sharing of unbox.
2344
2345 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2346
2347         * mini.c: Don't compute the vtable to determine whether a field is
2348         special static, because it might not work for open types.
2349
2350 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2351
2352         * mini.c: Removed the unused token_type and token_source arguments
2353         from get_runtime_generic_context_ptr().
2354
2355 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2356
2357         * mini.c (ADD_BINOP): fix the build
2358
2359 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2362         a widening op.
2363
2364 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2365
2366         * mini.h: Removed class relations enum that's not used anymore.
2367
2368 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2369
2370         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2371
2372         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2373         the lazy fetch trampoline access code.
2374
2375 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2376
2377         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2378
2379 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2380
2381         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2382
2383         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2384
2385         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2386
2387 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2388
2389         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2390         intrinsics.
2391
2392         * mini-ops.h: Add MIN/MAX_UN opcodes.
2393
2394         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2395         intrinsics.
2396
2397         * basic-math.cs: Add more min/max tests.
2398
2399         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2400
2401 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2402
2403         * mini.c: Small fix in the prologue of emit_castclass.
2404
2405 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2406
2407         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2408
2409         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2410         do not work even for unsigned types. Fixes #400014.
2411
2412         * basic-math.cs: Add regression tests for unsigned Min/Max.
2413
2414 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2415
2416         * mini.c: Added additional context_used argument to several
2417         functions, which will be needed for sharing generic methods.  Use
2418         GET_RGCTX macro wherever appropriate.  Declare only one
2419         context_used in mono_method_to_ir().
2420
2421 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2422
2423         * mini.c, generic-sharing.c: Removed generic class relations.
2424
2425         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2426         functions due to MRGCTX changes.
2427
2428 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2429
2430         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2431         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2432         with calculated IMT.
2433
2434         * mini.c: Generic sharing of calls via generic interfaces.
2435
2436         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2437         generic method with non-constant MonoGenericContext*.  Instead,
2438         the context is taken out of the method itself.
2439
2440 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2441
2442         * mini.c: Generic sharing of ldvirtftn.
2443
2444 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2445
2446         * mini.c: Generic sharing of ldftn.
2447
2448 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2449
2450         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2451
2452 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2453
2454         * mini.c: Generic sharing of the special case of ldtoken followed
2455         by a call to GetTypeFromHandle.
2456
2457 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2458
2459         * mini.c: Generic sharing of box for nullable types.
2460
2461 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2462
2463         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2464         are passed on the stack. Fixes #324807.
2465
2466 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2467
2468         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2469         for the ArgValuetypeAddrInIReg case.
2470
2471         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2472         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2473
2474         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2475         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2476         local variable and pass the local variable by reference to the called method.
2477           
2478         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2479         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2480
2481         Contributed under MIT/X11 license.
2482
2483 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2484
2485         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2486
2487         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2488         everything.
2489
2490 2008-06-10  Martin Baulig  <martin@ximian.com>
2491
2492         * debug-mini.c
2493         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2494
2495 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2496
2497         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2498         possible error when no arguments are passed.
2499
2500         Contributed under MIT/X11 license.
2501
2502 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2503
2504         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2505         where the file name is NULL.
2506
2507 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * mini.c: Fix s390 build.
2510
2511 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2512
2513         * trace.c (mono_trace_parse_options): Fix warnings.
2514
2515         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2516
2517 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * mini.c (remove_block_if_useless): Avoid printing the method name.
2520         
2521         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2522         MONO_INST_NEW.
2523
2524         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2525         LMF. Not yet used.
2526
2527         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2528         translated code after it has been patched.
2529
2530 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2531
2532         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2533         avoid problems during code patching on SMP systems.
2534         (emit_call): Avoid adding a patch info which is already added by 
2535         emit_call_body.
2536         (mono_arch_emit_exceptions): Ditto.
2537
2538 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2541         MONO_TYPE_ISSTRUCT already checks for it.
2542
2543 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2544
2545         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2546           structs with floats on Winx64 the float registers are not used.  
2547           The integer registers are always used..
2548         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2549           only one register will be used and only if the size of the struct 
2550           is 1,2,4, or 8 bytes.
2551
2552         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2553           to work for Winx64.
2554
2555         Contributed under MIT/X11 license.
2556
2557 2008-06-05  Martin Baulig  <martin@ximian.com>
2558
2559         * debug-debugger.c (debugger_lookup_class): Also call
2560         mono_class_setup_methods() here; we're only called from RTI.
2561
2562 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2563
2564         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2565         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2566         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2567         Post-process object files and add dtrace-generated object, if necessary.
2568
2569         Contributed under MIT/X11 license.
2570
2571 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2572
2573         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2574         element class.
2575
2576         * mini.c: Generic sharing for unbox.any and castclass.
2577
2578 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2579
2580         * mini.c: Ignore tailcall prefix in shared generic code and when
2581         doing calls which require a vtable/rgctx argument.
2582
2583 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2584
2585         * mini.c: Don't free the JIT info.
2586
2587         * driver.c: Changes in the JIT info table testing code.
2588
2589 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2590
2591         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2592         interruption. Fix some warnings.
2593
2594         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2595         interruption_checkpoint.
2596
2597 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2598
2599         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2600         from embedding applications.
2601
2602 2008-06-02  William Holmes  <billholmes54@gmail.com>
2603
2604         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2605           reserving 32 bytes on the stack when making calls. 
2606
2607         Contributed under MIT/X11 license.
2608
2609 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2610
2611         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2612         the linear IL branch.
2613
2614         * driver.c: Print out more information for --version on arm.
2615
2616 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2617
2618         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2619         bb_exit instead, since out of line bblocks might not actually be emitted
2620         out-of-line.
2621         
2622         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2623         maximum epilog size for out of line bblocks if tracing is enabled.
2624
2625         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2626
2627 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2628
2629         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2630
2631 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2632
2633         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2634         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2635         opcodes.
2636
2637 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2638
2639         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2640         the 'value' to store is a constant.
2641
2642         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2643
2644         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2645         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2646
2647 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2648
2649         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2650         for accessing method->generic_container.
2651
2652 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2655         
2656         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2657
2658         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2659
2660         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2661         fails.
2662
2663 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2664
2665         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2666
2667         * mini.c: Handle the case when mono_class_vtable () fails.
2668
2669 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2670         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2671         the stat profiler.
2672
2673 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2674
2675         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2676         together with domain sharing.
2677
2678 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2679
2680         * mini.c: Treat callvirts to final methods like non-virtual calls
2681         when doing generic sharing, i.e. look them up in the runtime
2682         generic context.
2683
2684 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2685
2686         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2687         with computed types (for generic sharing).
2688
2689         * mini.c: Generic sharing for mkrefany and refanyval.
2690
2691 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2692
2693         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2694         possible.
2695
2696         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2697         the generic sharing code.
2698         
2699         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2700         when needed.
2701
2702 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2703
2704         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2705
2706 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2707
2708         * driver.c: updated copyright date
2709
2710 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2711
2712         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2713         needed.
2714
2715 2008-05-19  Martin Baulig  <martin@ximian.com>
2716
2717         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2718         pointing to the new `_mono_debug_using_mono_debugger' variable.
2719
2720         * driver.c
2721         (mono_main): Check mono_debug_using_mono_debugger() rather than
2722         the `MONO_INSIDE_MDB' environment variable to check whether we're
2723         inside the debugger.
2724
2725 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2726
2727         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2728         argument.
2729
2730 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2731
2732         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2733
2734         * mini.c: Added mini_assembly_can_skip_verification. This
2735         function checks if the assembly requested to skip verification. 
2736         Fixes part of #387274.
2737
2738 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * mini.c (mini_get_method): Disable the check for open generic classes when
2741         using generic sharing.
2742
2743         * generics.cs: Add a test for #387034.
2744
2745         * mini.c (mini_get_method): Check whenever the method class is an open generic
2746         type, and return NULL in that case, causing a verification error. Fixes
2747         #384123.
2748
2749 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2750
2751         * driver.c (mono_main): Revert r102623. The right
2752         thing to do is to enable the verifier under verifiable
2753         unless a --security flag was passed.
2754
2755         We need this non-trivial behavior for --verify-all otherwise
2756         mcs-compileall won't be able to use it. As it needs everything to
2757         be verified under validil.
2758
2759 2008-05-06  Martin Baulig  <martin@ximian.com>
2760
2761         Fix #383749.
2762
2763         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2764         (mono_debugger_thread_cleanup): Likewise.
2765         (mono_debugger_extended_notification): Likewise.
2766
2767 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2768
2769         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2770         against both inflated and non-inflated methods. We need to check against the
2771         generic definition for cases where the instantiated method is not visible.
2772         We need to check against the inflated types for cases where the instantiation
2773         changes any super type. This fixes #382986.
2774
2775         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2776         that check for visibiliy as generic params only appears as the type subject
2777         of tokens on call opcodes. Field manipulation and ldftn must always
2778         target an exact type.
2779
2780 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2781
2782         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2783         if no related --security flag is passed.
2784
2785 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2786
2787         * mini-arch.h: Prepare support for ppc64.
2788
2789         Contributed under MIT/X11 license.
2790
2791 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2792
2793         * aot-runtime.c: Prepare support for ppc64.
2794
2795         Contributed under MIT/X11 license.
2796
2797 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2798
2799         * mini-ops.h: Prepare support for ppc64.
2800
2801         Contributed under MIT/X11 license.
2802
2803 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2804
2805         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2806
2807         Contributed under MIT/X11 license.
2808
2809 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2812         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2813         assemblies on windows.
2814
2815 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2816
2817         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2818         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2819         * main.c: Use UTF-8 encoded command line instead of Windows default code
2820         page on Windows to support Unicode.
2821         * driver.c (DllMain): New function for mixed-mode assembly support.
2822         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2823         export __stdcall functions without decoration.
2824
2825         Contributed under MIT/X11 license.
2826
2827 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2828
2829         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2830         saving it very early.
2831
2832 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2833
2834         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2835         deleted.  The only way to access the new RGCTX is via the
2836         trampline.
2837
2838         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2839         vtable instead of the RGCTX to static methods.
2840
2841         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2842         accessing the new RGCTX.
2843
2844         * generic-sharing.c: There is no separation between self, type
2845         arguments and other types in the RGCTX anymore.
2846
2847 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2848
2849         * mini-amd64.c (add_general): Remove previous stack adjustment.
2850         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2851         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2852         for 32 bytes of stack space reserved for all calls.
2853         
2854         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2855         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2856         adjustment.
2857         
2858         Code contributed under MIT/X11 license.
2859
2860 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2861
2862         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2863         against the root definition, peeling out method and type instantiations.
2864         Cache verify success results, code that fails verification is still
2865         checked multiple times.
2866
2867 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2868
2869         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2870
2871 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2872
2873         * mini-amd64.c (add_general): Always increment stack on Win64.
2874         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2875         on Win64.
2876         
2877         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2878         stack based argument handling on Win64.
2879         
2880         Code contributed under MIT/X11 license.
2881
2882 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2883
2884         * Makefile.am (version.h): Add support for git-svn.
2885
2886 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2887
2888         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2889         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2890         avoiding allocations and libc functions which might deadlock.
2891         
2892         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2893         'no-gdb-backtrace' option is set.
2894
2895         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2896
2897         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2898
2899 2008-04-21  Martin Baulig  <martin@ximian.com>
2900
2901         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2902         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2903
2904 2008-04-21  Martin Baulig  <martin@ximian.com>
2905
2906         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2907         `thread_vtable', `event_handler_ptr' and `event_handler'.
2908
2909 2008-04-21  Martin Baulig  <martin@ximian.com>
2910
2911         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2912         allows delayed initialization of the `executable_code_buffer' when
2913         attaching.
2914
2915 2008-04-21  Martin Baulig  <martin@ximian.com>
2916
2917         * mini.h (mono_debugger_create_notification_function): Removed.
2918         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2919
2920         * mdb-debug-info64.s
2921         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2922
2923         * mdb-debug-info32.s
2924         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2925
2926         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2927         currently only works on x86 and x86_64, so don't create it on ppc.
2928
2929 2008-04-21  Martin Baulig  <martin@ximian.com>
2930
2931         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2932
2933         * mini.c
2934         (mini_method_compile): In the fp elimination check, check
2935         `debug_options.mdb_optimizations' in addition to
2936         mono_debug_using_mono_debugger().       
2937
2938         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2939         disable some JIT optimizations which are only disabled when
2940         running inside the debugger.
2941         Added `--help-debug' option to describe the debugging options.
2942         (parse_debug_options): New static function to parse the `--debug'
2943         options, so we can easily add more stuff in future.
2944
2945 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2948         the method has no body.
2949
2950 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2951
2952         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2953         assembly is not allowed in MSVC 64-bit compiler. 
2954         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2955         as we get floating point exceptions everywhere.
2956         
2957         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2958         correctly align arguments for call to throw_exception.
2959         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2960         
2961         Code contributed under MIT/X11 license.
2962
2963 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2966
2967 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2968
2969         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2970
2971         * mini-amd64.c (NEW_INS): Set cil_code.
2972
2973         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2974         from mini-amd64.c so all debugger related logic is in one place.
2975
2976         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2977         later won't have a random ip assigned to them.
2978
2979 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2980
2981         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2982         the arch specific function initializes code_size.
2983         (mono_create_delegate_trampoline): Ditto.
2984
2985         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2986         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2987         platforms.
2988
2989         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2990         running under the debugger.
2991
2992         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2993         debugger.
2994
2995         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2996         debugger. Also move the disabling of optimizations here from driver.c.
2997         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2998         debugger.
2999
3000         * mini.h (MonoCompile): Add a few new flags.
3001
3002 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3003
3004         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3005         so the cil_code field of created MonoInst's is properly set.
3006         (mini_select_instructions): Ditto.
3007
3008         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3009         (MONO_INST_NEW_CALL): Ditto.
3010
3011         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3012         in many places so the ins->cil_code field is properly initialized.
3013
3014         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3015         place.
3016
3017 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * mini.c (mini_method_compile): Print a different message when compiling a 
3020         shared method.
3021         
3022         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3023         > 1.
3024
3025 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3026
3027         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3028         SSE2 instructions.
3029
3030         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3031         
3032 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3033
3034         * mini.c (handle_stack_args): Make this return void since its return value was
3035         never used. Also set cfg->unverifiable for invalid IL instead of calling
3036         G_BREAKPOINT ().
3037
3038 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3039
3040         * mini.c: Make sure "this" is live in catch clauses with type
3041         variables in shared generic code.
3042
3043 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3044
3045         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3046         generic_class_is_reference_type() to ensure the proper behaviour
3047         when sharing generic code and the type in question is a type
3048         argument.
3049
3050 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3051
3052         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3053         race conditions when printing thread dumps. Fixes #377738.
3054
3055 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3056         
3057         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3058         shows up when both MonoInst arguments can cause aliasig.
3059         There is likely no way in the current JIT to trigger this problem, but
3060         it showed up in the development of generics sharing, when in a new
3061         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3062         When the generics sharing code will be committed, its tests will be
3063         valid also for this bug.
3064
3065 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3066
3067         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3068         PATCH_INFO_METHOD.
3069
3070         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3071         NULL.
3072
3073 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3076         use a more detailed exception message for InvalidCastException.
3077
3078         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3079
3080         * driver.c (mono_main): Add --debug=casts option to turn on better 
3081         InvalidCastException message details.
3082
3083         * mini.c (mini_get_debug_options): New helper function to return the address of
3084         the debug_options variable.
3085
3086         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3087         the jit_tls TLS variable.
3088
3089         * mini.c (mono_jit_tls): New TLS variable.
3090
3091         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3092         option is used.
3093
3094 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3095
3096         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3097
3098         * mini.c: Removed verifer related stuff, code moved to verify.c.
3099
3100         * driver.c: Using code from verify.c instead of mini.c.
3101
3102 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3103
3104         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3105         longer valid.
3106
3107 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3108
3109         * mini.c (check_for_method_verify): Enabling verification of
3110         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3111         have been fixed.
3112
3113 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3114
3115         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3116         caller saved registers as well.
3117         
3118         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3119         saved registers as well.
3120
3121 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3122
3123         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3124
3125         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3126         code.
3127
3128 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3129
3130         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3131         to get_call_info.
3132         (get_call_info): Take a gsctx argument instead of 'cfg'.
3133
3134 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3135
3136         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3137         mono_verify_all is set.
3138
3139         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3140
3141         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3142
3143 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3144
3145         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3146         an exception.
3147
3148         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3149         verifier and the code generated by the compiler.
3150
3151 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3152
3153         * mini.c: Generic sharing of the non-nullable case of the box
3154         instruction.
3155
3156 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3157
3158         * inssel.brg: Fix the build.
3159
3160         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3161
3162 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3163
3164         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3165         Array:Address. Fixes #372410.
3166
3167         * iltests.il.in: New tests for readonly prefix.
3168
3169 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3170
3171         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3172         mini-trampolines.c.
3173
3174         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3175         mini-exceptions.c.
3176
3177         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3178         
3179         * mini.c (mono_decompose_op_imm): New helper function.
3180
3181         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3182         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3183         return value.
3184
3185         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3186         mono_arch_output_basic_block. Fix warnings.
3187
3188         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3189         for now.
3190
3191 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3192
3193         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3194         since the extra frame is now detected automatically inside the loop.
3195
3196         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3197         opts which are now in mono_peephole_ins ().
3198         
3199         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3200
3201         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3202         frames and skip duplicate managed-to-native frames. Fixes #367665.
3203
3204         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3205         opts which are now in mono_peephole_ins ().
3206         (mono_arch_peephole_pass_2): Ditto.
3207
3208         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3209
3210         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3211         arch independent peephole optimizations.
3212
3213         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3214         opts which are now in mono_peephole_ins ().
3215
3216         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3217         
3218         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3219
3220         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3221         pattern.
3222
3223         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3224         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3225         opcode. 
3226
3227 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3230         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3231         return value.
3232
3233         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3234         mono_arch_output_basic_block. Fix warnings.
3235
3236 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3237
3238         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3239         conv.ovf.u.un.
3240
3241 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3242
3243         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3244         conv.ovf.u.un.
3245
3246         * iltests.il: Add new tests.
3247
3248 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3249
3250         * mini.c: Removed Windows version macros.
3251
3252 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3253
3254         * generic-sharing.c: Put reflection types in the extensible part
3255         of the runtime generic context.
3256
3257         * mini.c: Generic sharing of the GetTypeHandle special case of the
3258         ldtoken instruction.
3259
3260 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3263
3264         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3265         
3266         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3267         consistency with the other version on the linear IR branch.
3268
3269         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3270
3271         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3272
3273         * iltests.il.in: Add new tests.
3274
3275 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3276
3277         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3278
3279         * iltests.il.in: Add new tests.
3280
3281 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3282
3283         * mini.c: Two variables with the same name were declared in
3284         nesting contexts and one wasn't initialized.  Fixed.
3285
3286 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3287
3288         * mini.c: Generic sharing of the initobj instruction.
3289
3290 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3291
3292         * mini.c: make the test to optimize ldtoken from typeof() more
3293         precise.
3294
3295 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3296
3297         * mini.c: Generic sharing of the initobj instruction for reference
3298         types.
3299
3300 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3301
3302         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3303         the mono_breakpoint_clean_code() code to perform bound checks.
3304
3305 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3306
3307         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3308         mono_arch_patch_callsite() to include the start of the managed method
3309         to be able to perform bound checks.
3310
3311 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3312
3313         * mini.c: Generic sharing for the isinst instruction.
3314
3315 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3316
3317         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3318         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3319         with the runtime generic context argument.
3320
3321         * mini.c: Share calls to several types of unsharable methods by
3322         putting the address of the method code in the runtime generic
3323         context and doing an indirect call.
3324
3325         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3326         to switches.
3327
3328 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3329
3330         * generic-sharing.c: Change due to a change in the runtime genric
3331         context API.
3332
3333 2008-03-15  Martin Baulig  <martin@ximian.com>
3334
3335         * tramp-x86.c
3336         (mono_arch_nullify_class_init_trampoline): Add call to
3337         mono_breakpoint_clean_code() to make things work when running
3338         inside the debugger.
3339
3340         * tramp-amd64.c
3341         (mono_arch_nullify_class_init_trampoline): Add call to
3342         mono_breakpoint_clean_code() to make things work when running
3343         inside the debugger.
3344
3345 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3346
3347         * inssel-long.brg (reg): Fix 64 bit build.
3348
3349 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3350
3351         * mini.c, mini.h: Share static generic code by passing it an
3352         implicit argument pointing to the runtime generic context.
3353
3354         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3355         inssel-long32-mips.brg: New opcodes for calling shared static,
3356         which need to be passed the runtime generic context.
3357
3358         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3359         argument on the stack in the prologue if needed.  New function for
3360         finding the runtime generic context argument from the registers
3361         saved by the trampoline.
3362
3363         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3364         runtime generic context argument.
3365
3366         * tramp-amd64.c: Also restore the register used for the runtime
3367         generic context argument.
3368
3369         * mini-trampoline.c: Resolve shared static calls by consulting the
3370         runtime generic context via the new argument.
3371
3372         * generic-sharing.c: Add an argument to sharability-checking
3373         functions that specifies whether type variables should be treated
3374         as sharable type arguments.
3375
3376         * inssel-x86.brg: Removed a superfluous, buggy rule.
3377
3378         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3379         to switches.
3380
3381 2008-03-14  Martin Baulig  <martin@ximian.com>
3382
3383         * debug-debugger.c (main_thread_handler): Call
3384         mono_runtime_run_main() without sending any notifications.
3385
3386         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3387
3388 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3389
3390         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3391
3392 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3393
3394         * tramp-x86.c: Fixed register restore offsets in the trampoline
3395         code for ECX and EDX.
3396
3397 2008-03-12  Geoff Norton  <gnorton@novell.com>
3398
3399         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3400         different ucontext_t implementations.
3401         * exceptions-arm.c: Use the above defines to get exceptions working on 
3402         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3403         * mini-arm.c: Implement iPhone icache support (based on a patch by
3404         Luke Howard lukeh@padl.com)
3405
3406 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3407
3408         * mini.c: Enable generic sharing of calls to non-static
3409         non-interface non-generic non-value-type methods.
3410
3411         * mini-trampolines.c: Resolve calls from shared generic code.
3412
3413 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3416
3417         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3418
3419 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3420
3421         * mini.c: some fixes for the AOT compiler.
3422
3423 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3424
3425         * cpu-amd64.md: Add clob:1 to some float opcodes.
3426
3427 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3428
3429         * mini.h: Added MiniVerifierMode enumeration.
3430
3431         * mini.c: Added mini_verifier_set_mode to control
3432         the usage of the new verifier.
3433
3434         * mini.c (mono_method): Integrated the new verifier.
3435
3436         * driver.c: Extended --security option with validil and
3437         verifiable options to activate the new verifier.
3438
3439 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3440
3441         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3442         optimization to ctors taking 0 or 2 arguments too.
3443
3444         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3445         a bit.
3446
3447         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3448
3449         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3450
3451 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3452
3453         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3454         non-aot case as well.
3455
3456         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3457
3458         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3459         changes.
3460
3461         * aot-compiler.c (encode_patch): Ditto.
3462
3463         * mini.h (G_MININT32): Fix the definition of this.
3464
3465 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3466
3467         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3468
3469         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3470
3471 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3472
3473         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3474         methods returning vtypes in registers.
3475         (mono_arch_allocate_vars): Ditto.
3476
3477         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3478
3479         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3480
3481         * generics.cs: Add a test from the linear IR branch.
3482
3483         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3484
3485         * mini.c (inline_method): Cache failed inline attempts.
3486
3487 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3488
3489         * mini.c: For shared methods of generic classes put the location
3490         of "this" into the MonoGenericJitInfo.
3491
3492         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3493         register out of a MonoContext by register number.  Add the generic
3494         sharing context as an argument to mono_arch_find_this_argument().
3495
3496         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3497         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3498         for new arch function.
3499
3500         * mini-exception.c: Handle open exception clauses in shared
3501         generic code.
3502
3503         * mini-trampolines.c: Supply additional argument to
3504         mono_arch_find_this_argument().
3505
3506 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * Makefile.am (regtests): Run the bench.exe tests last.
3509
3510 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3511
3512         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3513         a bit.
3514
3515 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3516
3517         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3518         with MS.
3519
3520         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3521         
3522         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3523
3524         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3525         whose class has no cctor.
3526
3527         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3528
3529 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3530
3531         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3532         unverified.
3533
3534 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3537         to be in sync with the code on the linear IR branch.
3538
3539         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3540
3541         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3542
3543 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3546
3547         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3548
3549         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3550
3551         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3552
3553         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3554         
3555         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3556         body.
3557
3558 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3559
3560         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3561         OP_LOADR4_MEMBASE emission.
3562
3563         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3564         (mono_spillvar_offset_float): Ditto.
3565
3566         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3567
3568         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3569         emission.
3570
3571         * basic-long.cs: Add regression tests for them.
3572
3573         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3574         use.
3575         (mono_arch_allocate_vars): Fix representation of single-precision float
3576         argument.
3577         (mono_arch_output_basic_block): Ditto.
3578
3579         * inssel-mips.brg: Ditto, remove duplicate items.
3580
3581         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3582         arguments of tail calls as on other platforms.
3583         (mono_arch_output_basic_block): Handle tail calls.
3584
3585         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3586         register.
3587
3588         * objects.cs (test_5_pass_static_struct): Add test for it.
3589
3590         Contributed under MIT/X11 license.
3591
3592 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3593
3594         * Makefile.am: Use gmcs for compiling the regression tests.
3595
3596         * *.2.cs *.2.il: Rename to *.cs and *.il.
3597
3598 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3599
3600         * regalloc.h: Make the vassign array smaller.
3601
3602         * mini.c (mini_method_compile): Remove an unused field in cfg.
3603
3604         * mini-codegen.c: Add a bunch of micro optimizations.
3605
3606 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * regalloc.h: Remove some unused fields.
3609
3610 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3613
3614         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3615
3616 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3617
3618         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3619
3620         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3621         trampoline: Fetch an entry from the runtime generic context.  If
3622         it's NULL, jump to the actual trampoline to fill the runtime
3623         generic context.  Otherwise, return it.
3624
3625         * mini.c: Call the lazy fetch trampoline to get entries out of the
3626         runtime generic context.
3627
3628         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3629         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3630         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3631
3632 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3633
3634         * mini.c: Fetch data out of the extensible part of the runtime
3635         generic context instead of calling a helper function.
3636
3637         * generic-sharing.c: Some functions moved into
3638         metadata/generic-sharing.c.  Helper function for fetching other
3639         types now checks and asserts against extensible rgctx (just for
3640         debugging purposes - the helper function isn't called anymore
3641         unless for debugging).
3642
3643 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3646         for tail calls up to the point that the tests in iltests.exe run. Also add a
3647         dummy CKFINITE implementation.
3648         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3649         needed for trampoline LMF frames.
3650
3651         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3652         trampoline LMF frames.
3653
3654 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3655
3656         * mini.c (inline_method): clean any pending loader error when inlining fail.
3657         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3658
3659 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3660
3661         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3662
3663         * aot-runtime.c (decode_patch_info): Ditto.
3664
3665         * mini.c (mono_resolve_patch_target): Ditto.
3666         
3667         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3668         icall wrappers.
3669
3670         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3671         
3672         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3673         if it references an icall address.
3674
3675 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3676
3677         * cpu-s390x.md: Remove some more unused opcodes.
3678         
3679         * cpu-s390x.md: Remove some unused opcodes.
3680
3681         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3682         mono_op_imm_to_op ().
3683
3684         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3685         instead of a switch statement.
3686         
3687         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3688         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3689
3690         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3691         
3692         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3693
3694         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3695         -1.
3696
3697 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3698
3699         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3700         opened. Fixes #362607.
3701
3702         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3703
3704         * iltests.il.in: Add a test for static methods in interfaces.
3705
3706 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * genmdesc.c (build_table): Fix a crash on older glib versions.
3709
3710         * cpu-sparc.md: Remove some unused opcodes.
3711         
3712         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3713         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3714
3715         * cpu-amd64.md: Remove some unused opcodes.
3716
3717         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3718         like the other opcodes.
3719
3720 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3723
3724         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3725
3726         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3727         variables 'cfg' instead of 'm' for consistency.
3728
3729         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3730
3731         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3732         argument holding the vtype return address, to avoid the ambigious use of
3733         cfg->ret for this purpose.
3734
3735         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3736
3737         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3738         
3739         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3740         new mono_print_ins () function which only takes one argument.
3741
3742 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3745         macro arguments.
3746
3747 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3748
3749         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3750
3751         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3752
3753         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3754         opcodes and other small changes.
3755
3756         * mini-ops.h: Add some new opcodes from the linear IR branch.
3757
3758         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3759
3760         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3761         opcodes, use the REG_MEMBASE opcodes instead.
3762         
3763         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3764         opcodes, use the REG_MEMBASE opcodes instead.
3765         
3766         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3767         linear IR branch.
3768
3769         * mini.c (mono_op_imm_to_op): New helper function.
3770
3771         * mini-ops.h: Add some opcodes from linear IR branch.
3772
3773 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3776         <tsv@solvo.ru>.
3777
3778 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3779
3780         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3781         OP_ICONV_TO_R4/R8.
3782
3783         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3784
3785 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3786
3787         * aot-compiler.c (emit_method_code): Add an assert.
3788
3789         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3790         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3791         methods.
3792
3793 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3794
3795         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3796         some load/store opcodes so they are consistent. 
3797         (mono_arch_emit_prolog): Simplify some code.
3798
3799         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3800
3801         * objects.cs: Add tests for large argument offsets on ARM.
3802
3803         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3804         stack offsets. Fixes #359651.
3805
3806         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3807
3808         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3809
3810         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3811
3812         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3813
3814         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3815
3816         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3817         rid of CEE_CONV_R_UN.
3818
3819         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3820
3821 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3822
3823         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3824
3825         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3826
3827         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3828
3829         * cpu-amd64.md: Remove some unused opcodes.
3830
3831         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3832
3833         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3834
3835         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3836         arch specific functions for its parts. Call the peephole pass after local
3837         regalloc so the prolog can compute a more accurate max_offset.
3838         
3839         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3840         the corresponding OP_I/OP_L opcodes.
3841
3842         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3843
3844         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3845
3846 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3847
3848         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3849         as they are handled in mini.c.
3850
3851         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3852         
3853         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3854         case since it is handled in mini.c.
3855
3856         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3857
3858         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3859
3860         * *.c: Use the new opcodes in the IR and back end code.
3861
3862         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3863
3864         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3865
3866 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3867
3868         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3869         an assert because it has a race condition.
3870
3871 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3872
3873         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3874
3875         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3876
3877         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3878
3879         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3880         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3881
3882 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3883
3884         * cpu-amd64.md (move): Correct the maximum size of move.
3885
3886 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3887
3888         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3889         the generic class init trampoline to return quickly if the class
3890         is already inited.
3891
3892 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3893
3894         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3895         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3896
3897 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3898
3899         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3900         branch.
3901
3902 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3903
3904         * objects.cs: Add some soft-float tests.
3905
3906         * mini.c: Fix a couple more soft-float issues.
3907
3908         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3909
3910         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3911         avoid a REX prefix.
3912
3913 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3914
3915         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3916         exception happens while compiling a virtual method.
3917
3918 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3919
3920         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3921         
3922         * mini-sparc.c: Fix build.
3923
3924         * mini-sparc.c (get_call_info): Add support for generic sharing.
3925
3926         * mini-exceptions.c: Add a FIXME.
3927
3928 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3929
3930         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3931         altstack handling code.
3932
3933         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3934         
3935         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3936
3937         * mini-s390.c: Add support for generic sharing.
3938
3939         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3940         Fix CAS on s390.
3941         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3942
3943         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3944
3945         * mini-s390x.c: Add support for generic sharing.
3946         
3947         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3948         Fix CAS on ia64.
3949         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3950
3951         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3952         can be used since it takes a 16 bit signed immediate.
3953
3954         * inssel-s390x.brg: Fix OP_SETRET.
3955
3956         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3957
3958         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3959
3960         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3961
3962         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3963
3964         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3965         in one place.
3966
3967         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3968         stuff.
3969
3970         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3971         of the unused mono_arch_patch_delegate_trampoline stuff.
3972
3973 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * basic-long.cs: Move the fp related tests to basic-float.cs.
3976
3977         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3978
3979         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3980
3981         * basic-calls.cs: Add a test for proper float argument passing.
3982
3983         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3984         if the context corresponds to an exception received through a signal.
3985
3986         * exceptions.cs: Add a test for nullref handling at the start of a try
3987         clause.
3988
3989         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3990
3991         * jit-icalls.c (mono_break): New JIT icall.
3992
3993         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3994
3995         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3996
3997 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3998
3999         * cpu-*.md: Get rid of unused opcodes.
4000
4001         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4002
4003         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4004         by all platforms.
4005
4006         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4007         define.
4008
4009         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4010         the arch independent trampoline code in mini-trampolines.c.
4011
4012         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4013
4014         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4015
4016         * mini-s390.h: Remove an unused define.
4017         
4018         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4019         the arch independent trampoline code in mini-trampolines.c.
4020
4021         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4022
4023 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4024
4025         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4026
4027         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4028
4029         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4030
4031         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4032
4033         * cpu-amd64.md: Use smaller sizes for int opcodes.
4034
4035         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4036
4037         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4038         objects.cs.
4039
4040         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4041         debugging.
4042
4043         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4044         instead of though a pointer to save an indirection when accessing elements of
4045         the array.
4046
4047         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4048         some typos.
4049         (NOT_IMPLEMENTED): New helper macro.
4050         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4051         of a bb.
4052
4053         * *.c: Use the new helper macro.
4054
4055 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4056
4057         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4058
4059 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4060
4061         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4062         stack slots.
4063
4064 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4065
4066         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4067         profiling is enabled.
4068         
4069         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4070         the end.
4071         (mono_arch_emit_prolog): Add more first bblock optimizations.
4072
4073         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4074         in order if possible.
4075         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4076         bblock, since the arguments are still in their original registers.
4077
4078         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4079
4080 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4081
4082         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4083         as well.
4084
4085         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4086         offset 0.
4087
4088         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4089
4090         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4091         process async exceptions received while in unmanaged code.
4092
4093         * mini.c (mini_init): Install a callback with the runtime which will be called
4094         when a thread receives an async exception while in unmanaged code.
4095
4096         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4097
4098         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4099
4100 2008-01-16  Wade Berrier  <wberrier@novell.com>
4101
4102         * cpu-g4.md:
4103         * cpu-arm.md:
4104         * cpu-s390x.md:
4105         fix build
4106
4107 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4108
4109         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4110         compilation with sun cc.
4111
4112         * cpu-*.md: Fix the build.
4113
4114         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4115
4116         * mini-amd64.h: Add some comments to the MonoLMF structure.
4117
4118         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4119         
4120         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4121         in the LMF structure if possible. This saves two instructions in the
4122         managed->native wrappers.
4123
4124         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4125
4126 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4127
4128         * generic-sharing.c: New type argument lookup code which uses the
4129         runtime generic context template.
4130
4131 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4134
4135         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4136         (mono_arch_output_basic_block): Fix localloc implementation.
4137
4138         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4139
4140         * mini-ia64.c (peephole_pass): Fix ia64 build.
4141
4142         * mini-amd64.c (peephole_pass): Fix a warning.
4143         
4144         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4145         at a constant offset from sp/fp.
4146
4147         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4148         instead of obtaining it from *lmf in the managed method case.
4149
4150 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4151
4152         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4153
4154 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4155
4156         * mini.h (MonoInstList): New type.
4157         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4158         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4159         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4160         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4161         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4162         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4163         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4164         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4165         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4166         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4167         MONO_INST_LIST_FOR_EACH_ENTRY,
4168         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4169         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4170         mono_inst_list_first, mono_inst_list_last,
4171         mono_inst_list_next, mono_inst_list_prev): New instruction
4172         list handling interfaces.
4173         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4174         list head 'ins_list'.
4175         (MonoInst): Replace next pointer with list head 'node'.
4176         (MonoCallInst): Make 'out_args' a MonoInstList.
4177         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4178         (MonoCompile): Delete reverse_inst_list and
4179         reverse_inst_list_len.
4180         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4181         mono_arch_lowering_pass, mono_arch_local_regalloc,
4182         mono_arch_output_basic_block, mono_arch_emit_prolog):
4183         Convert to new instruction lists.
4184         (insert_after_ins): Delete.
4185         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4186         instruction lists.
4187         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4188         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4189         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4190         mono_emulate_opcode, mono_emit_load_got_addr,
4191         inline_method, mono_method_to_ir, mono_print_bb_code,
4192         print_dfn, decompose_pass, nullify_basic_block,
4193         replace_out_block_in_code, remove_block_if_useless,
4194         merge_basic_blocks, move_basic_block_to_end,
4195         try_unsigned_compare, optimize_branches, mono_print_code,
4196         mini_select_instructions, remove_critical_edges): Likewise.
4197         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4198         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4199         mono_arch_output_basic_block, mono_arch_emit_prolog):
4200         Likewise.
4201         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4202         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4203         mono_arch_output_basic_block): Likewise.
4204         (inst_list_prepend, insert_after_ins): Delete.
4205         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4206         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4207         instruction lists.
4208         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4209         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4210         mono_arch_emit_prolog): Likewise.
4211         * cfold.c (mono_constant_fold): Likewise.
4212         * liveness.c (visit_bb, mono_analyze_liveness,
4213         optimize_initlocals): Likewise.
4214         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4215         * graph.c (mono_draw_code_cfg): Likewise.
4216         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4217         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4218         mono_ssa_cprop): Likewise.
4219         * abcremoval (get_relations_from_previous_bb, process_block):
4220         Likewise.
4221         * local-propagation (mono_cprop_invalidate_values,
4222         mono_local_cprop_bb): Likewise.
4223         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4224         peephole_pass, mono_arch_output_basic_block,
4225         mono_arch_emit_prolog): Likewise.
4226         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4227         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4228         mono_arch_emit_prolog): Likewise.
4229         (insert_after_ins): Delete.
4230         * aliasing.c (print_code_with_aliasing_information,
4231         mono_build_aliasing_information, mono_aliasing_deadce):
4232         Convert to new instruction lists.
4233         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4234         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4235         mono_arch_local_regalloc, mono_arch_output_basic_block):
4236         Likewise.
4237         (insert_after_ins): Delete.
4238         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4239         peephole_pass, mono_arch_output_basic_block): Convert to
4240         new instruction lists.
4241         * mini-codegen (InstList, inst_list_prepend,
4242         insert_after_ins): Delete.
4243         (insert_before_ins, get_register_force_spilling,
4244         get_register_spilling, free_up_ireg, free_up_reg,
4245         create_copy_ins, create_spilled_store, alloc_int_reg,
4246         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4247         to new instruction lists.
4248         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4249         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4250         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4251         (insert_after_ins): Delete.
4252         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4253         mono_arch_local_regalloc, mono_arch_output_basic_block,
4254         mono_arch_call_opcode): Convert to new instruction lists.
4255         (insert_after_ins): Delete.
4256         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4257         peephole_pass, mono_arch_output_basic_block,
4258         mono_arch_emit_prolog): Convert to new instruction lists.
4259
4260 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4261
4262         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4263
4264         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4265         Fixes #353182.
4266
4267         * Makefile.am (version.h): Make this work with non-bash shells.
4268
4269 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4270
4271         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4272
4273 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4274
4275         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4276         the InitializeArray optimization.
4277
4278 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4279
4280         * mini.c driver.c: Don't include os/gc_wrapper.h.
4281
4282 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4283
4284         * mini.c (print_jit_stats): Print GC statistics if available.
4285
4286 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4287
4288         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4289
4290 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4291
4292         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4293
4294 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4295
4296         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4297         
4298         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4299
4300         * driver.c (mono_main): Ditto.
4301
4302 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4303
4304         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4305
4306         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4307         in the vtable can't be encoded.
4308         (compile_method): Ditto.
4309
4310 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4311
4312         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4313         defined.
4314
4315         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4316         lmf->rbp.
4317
4318         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4319         the top LMF entry belongs to the current method.
4320
4321         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4322
4323 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4324
4325         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4326         
4327         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4328
4329         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4330
4331         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4332
4333         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4334
4335         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4336         implementation.
4337
4338         * basic-float.cs: Add an ulong->double cast test.
4339
4340 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4341
4342         * mini.c (mono_method_to_ir): Fix a warning.
4343
4344 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4345
4346         * mini-ops.h: Add OP_SWITCH.
4347
4348         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4349         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4350
4351 2007-12-11  Geoff Norton  <gnorton@novell.com>
4352
4353         * mini-s390x.c: Minor change to the MAX() define to allow
4354         it to compile with other gcc versions.
4355
4356 2007-12-11  Geoff Norton  <gnorton@novell.com>
4357
4358         * cpu-s390x.md:
4359         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4360
4361 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4362
4363         exceptions-arm.c (mono_arch_get_restore_context): Restore
4364         the frame pointer.
4365
4366         exceptions-arm.c (throw_exception): Save the frame pointer.
4367         This is a partial fix for #323747. Only the client side is
4368         fixed.
4369
4370 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4371
4372         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4373         was using an unrelated variable to log the class which
4374         needed the cctor to be called. This was crashing on arm.
4375
4376 2007-12-09  Robert Jordan  <robertj@gmx.net>
4377
4378         * mini-x86.c (mono_arch_emit_epilog):
4379         Consider all kinds of 64-bit types. Fixes #323114.
4380
4381 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4382
4383         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4384
4385 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4386
4387         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4388
4389 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4390
4391         * mini.c: run type ctor before allocating an object, not only
4392         when running it's constructor method (fixes at least part of bug #342507).
4393
4394 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4395         
4396         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4397         
4398         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4399         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4400         function.
4401
4402         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4403         mono_generic_class_init_trampoline () the same as it is done with the other
4404         trampolines.
4405
4406         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4407         aot-runtime.c aot-compiler.c: Implement AOT support.    
4408
4409 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4410
4411         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4412         build for archs which don't have the vtable trampoline defined
4413         yet.
4414
4415 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4416
4417         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4418
4419         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4420
4421         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4422
4423         * tramp-<ARCH>.c: Use the new helper function.
4424
4425 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4426
4427         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4428         trampoline call, which takes a vtable argument.
4429
4430         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4431         OP_TRAMPCALL_VTABLEs like other calls.
4432
4433         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4434         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4435         call.  Implemented a support function which fetches the vtable
4436         from a register set.
4437
4438         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4439         Implemented a generic class init trampoline, using the
4440         OP_TRAMPCALL_VTABLE opcode.
4441
4442         * mini.c: Implemented static field access when sharing generic
4443         code.  This implies initing the class using the new
4444         OP_TRAMPCALL_VTABLE call.
4445
4446 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4447
4448         * mini.c: Don't compile methods with sharing enabled if their
4449         classes are disabled for sharing.
4450
4451 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4454         opcodes. Fixes #346563.
4455
4456         * objects.cs: Add a new test.
4457
4458         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4459
4460         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4461         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4462
4463 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4464
4465         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4466
4467 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4468
4469         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4470         code stream.
4471
4472 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4473
4474         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4475
4476         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4477         optimization in the AOT case.
4478         
4479 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4480
4481         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4482         
4483         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4484
4485         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4486
4487         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4488
4489         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4490         is created by the inlined delegate ctor.
4491
4492         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4493
4494         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4495
4496 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4497
4498         * cpu-x86.md: Fix the length of ckfinite.
4499
4500 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4501
4502         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4503         
4504         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4505         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4506
4507         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4508
4509         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4510         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4511
4512 2007-11-28  Martin Baulig  <martin@ximian.com>
4513
4514         * mini-x86.c
4515         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4516         after creating the trampoline.
4517
4518 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4519
4520         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4521
4522         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4523         the same version.
4524
4525         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4526         instead of the calling method to help AOT.
4527
4528         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4529
4530 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4531
4532         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4533         is defined.
4534
4535 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4536
4537         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4538         
4539         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4540         (encode_method_ref): No need to handle generic method definitions specially.
4541
4542         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4543
4544         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4545         decode_klass_info.
4546
4547         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4548         encode_klass_info.
4549         (compile_method): Enable generic sharing.
4550
4551 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4552
4553         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4554         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4555
4556         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4557         generic code.
4558
4559         * mini-trampolines.c: Fix a warning.
4560
4561         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4562         NEW_PCONST.
4563         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4564         (generic_class_is_reference_type): Remove unused function.
4565
4566         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4567         in the generic vtable trampoline case.
4568
4569         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4570         
4571         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4572         return an AOT method based on a vtable slot.
4573
4574         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4575
4576         * mini.c (mini_get_vtable_trampoline): Export this.
4577
4578 2007-11-22  Martin Baulig  <martin@ximian.com>
4579
4580         * debug-debugger.h
4581         (MonoDebuggerInfo): Move `debugger_version' up.
4582
4583 2007-11-22  Martin Baulig  <martin@ximian.com>
4584
4585         * mini-amd64.c
4586         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4587
4588         * mini-trampolines.c
4589         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4590         after compiling the method.
4591
4592 2007-11-20  Martin Baulig  <martin@ximian.com>
4593
4594         * debug-mini.c
4595         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4596         (mono_debugger_remove_breakpoint): Likewise.
4597         (mono_debugger_check_breakpoints): Likewise.
4598
4599         * debug-debugger.c: Implement the new breakpoint interface here.
4600
4601 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4602
4603         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4604         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4605
4606         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4607
4608 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4609
4610         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4611
4612         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4613         mini.c.
4614
4615         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4616         mini.c.
4617
4618         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4619         returning a vtype in a register.
4620
4621         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4622         here from the arch specific code.
4623
4624         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4625         mini.c.
4626
4627         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4628         (mono_arch_emit_prolog): Increment maximum prolog size.
4629
4630         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4631         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4632
4633         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4634         MonoGenericSharingContext.
4635
4636         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4637         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4638
4639 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4640
4641         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4642         which extract fields out of the runtime generic context.  Full
4643         sharing of the NEWARR opcode.
4644
4645 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4646
4647         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4648         --enable-minimal=ssa.
4649
4650 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4651
4652         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4653         mono_marshal_get_delegate_invoke () signature change.
4654
4655 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4656
4657         * mini.c: Removed the shared context in favor of the generic
4658         sharing context.  Allocate the MonoJitInfo structure with room for
4659         the generic sharing context if it's needed.
4660
4661         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4662         domain-internals.h now.
4663
4664         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4665
4666         * generic-sharing.c: Several changes for working without a shared
4667         context and instead operating on open types instead.
4668
4669 2007-11-12  David S. Miller  <davem@davemloft.net>
4670
4671        * inssel-sparc.brg: Fix double instruction emit.
4672
4673 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4674
4675         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4676         Get/Set/Address methods.
4677         
4678         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4679         mono_marshal_get_delegate_invoke signature change.
4680
4681 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4682
4683         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4684         This can happens with dynamic methods. Fixes the other bug in #322722.
4685
4686 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4687
4688         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4689         BX call sequence.
4690
4691         * mini-arm.c (arm_patch): Implement patching of BX call
4692         sequence. Fixes one of the bugs in #322722.
4693
4694 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4695
4696        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4697        under Linux.  We only need to flush every 32-byte cache line.    
4698
4699 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4700
4701         * mini.c:
4702         move_basic_block_to_end: Add branches when needed, eventually creating
4703         a new BB.
4704         optimize_branches: added a parameter that tells if it's ok to create
4705         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4706         and avoid calling move_basic_block_to_end when it's not ok.
4707         Fixes bug 318677.
4708
4709 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4710
4711         * mini.c: Abort inlining call to InitializeArray if something
4712         looks wrong.  Let the icall handle it, which now has proper safety
4713         checks.
4714
4715 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4716
4717         * mini.c (mono_spill_call): add support for soft-float.
4718
4719         * mini.c (mono_method_to_ir): add support for soft-float
4720         to inlined functions that return float.
4721
4722         * mini.c (mono_method_to_ir): add support for soft-float
4723         to cee_stsfld opcode on float fields.
4724
4725 2007-11-05  Geoff Norton  <gnorton@novell.com>
4726
4727         * mini-x86.h: Fix the structure access for X86 Leopard.
4728
4729
4730 2007-11-05  Martin Baulig  <martin@ximian.com>
4731
4732         * mini-trampolines.c
4733         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4734         after compiling the method to notify the debugger.
4735
4736 2007-11-05  Martin Baulig  <martin@ximian.com>
4737
4738         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4739
4740 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4741
4742         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4743         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4744
4745 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4748         native-to-managed wrappers.
4749         
4750 2007-11-01  Geoff Norton  <gnorton@novell.com>
4751
4752         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4753         members.
4754
4755 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4756
4757         * mini.c, mini-x86.c: when getting back from unmanaged code
4758         to managed via a marshaled delegate we also need to set the
4759         right domain.
4760
4761 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4762
4763         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4764         for amd64.
4765
4766 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4767
4768         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4769         let the debugger or other external agents to tell the JIT when
4770         a sw breakpoint has been inserted in the code that the JIT needs
4771         to be able to inspect.
4772
4773 2007-10-31  Martin Baulig  <martin@ximian.com>
4774
4775         * debug-debugger.h
4776         (MonoDebuggerInfo): Remove `runtime_class_init'.
4777
4778 2007-10-30  Martin Baulig  <martin@ximian.com>
4779
4780         * debug-mini.h
4781         (mono_debugger_thread_created): Added `MonoThread *' argument.
4782         (mono_debugger_extended_notification): New public method.
4783         (mono_debugger_trampoline_compiled): New public method.
4784
4785         * debug-mini.c
4786         (MonoDebuggerThreadInfo): Added `thread' and
4787         `extended_notifications' fields.
4788
4789         * debug-debugger.c
4790         (debugger_executable_code_buffer): New static variable.
4791
4792         * debug-debugger.h
4793         (MonoDebuggerInfo): Added `executable_code_buffer',
4794         `executable_code_buffer_size', `breakpoint_info_area',
4795         `breakpoint_table' and `breakpoint_table_size'.
4796
4797 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4798
4799         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4800         that IP  either is an unused value or the vtable pointer. IMT 
4801         calls use vtable + offset now. Reduced by almost half the size
4802         of IMT entries.
4803
4804 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4805
4806         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4807         defines to access param registers. Replace long usage with
4808         gsize as sizeof(long) != sizeof(void*) on Win64.
4809
4810         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4811         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4812         instead of non-existant _GetAddressOfReturnAddress.
4813
4814         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4815         param registers. Save/restore %rdi and %rsi in MonoLMF.
4816
4817         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4818         param registers. Modify (throw_exception) signature to take 
4819         %rdi and %rsi on Win64. 
4820
4821         Code is contributed under MIT/X11 license.
4822
4823 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4824
4825         * helpers.c: unlink debugging output files.
4826
4827 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4828
4829         * mini.c: Move mono_create_ftnptr () to object.c.
4830
4831 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4832
4833         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4834         optional. This function can now be used to disassemble code generated
4835         outside the JIT such as trampolines and IMT thunks.
4836
4837         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4838
4839         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4840         vtable pointer from a ldr instruction.
4841
4842         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4843         new IMT call sequence.
4844
4845         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4846         call sequence for interface invocations.
4847
4848         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4849         for imt support. This function is empty since IMT on ARM requires no
4850         special handling on the IR side.
4851
4852         * mini-arm.c (mono_arch_find_imt_method): added, required for
4853         imt support.
4854
4855         * mini-arm.c (mono_arch_find_this_argument): added, required
4856         for imt support.
4857
4858         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4859         a ldr instruction to load a value stored in the code stream.
4860
4861         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4862         for imt support.
4863
4864
4865 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * mini.c (mini_init): Install the jump trampoline callback.
4868
4869 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4870
4871         * mini-trampolines.c: handle synchronized methods with the common
4872         vtable trampoline (bug #335601).
4873
4874 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4875
4876         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4877
4878         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4879         64 bit platforms.
4880
4881         * mini-ia64.h mini-ia64.c: Add support for IMT.
4882
4883         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4884         prolog. Fixes #331958.
4885
4886 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4887
4888         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4889
4890 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4891
4892         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4893         trampoline.
4894
4895 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4896
4897         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4898         trampoline.
4899
4900 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4901
4902         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4903         trampoline.
4904
4905 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4906
4907         * mini-trampolines.c: changed the magic rampoline to understand
4908         the common vtable trampoline method: the method to invoke is
4909         determined by the vtable displacement of the call.
4910
4911 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4912
4913         * mini.c, mini.h: register the common vtable trampoline if the
4914         architecture supports it.
4915
4916 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4917
4918         * cpu-amd64.md: use the correct max length for tls_get.
4919
4920 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4921
4922         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4923         CEE_STELEM_ANY. Fixes #333696.
4924
4925 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4926
4927         * exceptions-x86.c: provide more graceful handling of the case where
4928         we followed a bogus function pointer from managed code (bug #332866).
4929
4930 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4931
4932         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4933         replaces the generic_shared flag and will carry more information
4934         in the future.
4935
4936         * generic-sharing.c: Added mini_type_stack_size() which allows
4937         allows open types if given a generic sharing context.
4938         mini_get_basic_type_from_generic() takes a
4939         MonoGenericSharingContext* instead of a MonoCompile* now.
4940
4941         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4942         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4943         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4944         changes above.  Just passing arguments through to the right
4945         places.
4946
4947 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4948
4949         * mini-arm.c: unify the call emission to emit_code_seq().
4950
4951 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4952
4953         * tramp-arm.c: reduced the trampoline size.
4954
4955 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4956
4957         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4958         variable handling out of arch-specific code.
4959
4960 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4961
4962         * mini-arm.c: implemented fast delegate dispatch.
4963
4964 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4965
4966         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4967         that fp elimination is turned off if the space required by locals is too
4968         big. Fixes #331958.
4969
4970 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4971
4972         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4973         ARM to the new style trampoline.
4974
4975 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4976
4977         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4978
4979         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4980
4981 2007-10-09  Martin Baulig  <martin@ximian.com>
4982
4983         * debug-debugger.h
4984         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4985         `field_info_offset_offset'.     
4986
4987 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4988
4989         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4990         removed more internal usage of the r11 register and made it available
4991         to the register allocator.
4992
4993 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4994
4995         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4996         when sharing generics and treat type variables as references.
4997
4998 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4999
5000         * mini-ppc.c: started removing the internal uses of register r11
5001         to eventually allow the register allocator to manage it as an
5002         additional available register.
5003
5004 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5005
5006         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5007
5008 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5009
5010         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5011         specific trampolines as they are not performance critical as a jump
5012         target (maybe align as before only for AOT code?). This saves about
5013         200 KB of native code on x86 for monodevelop startup.
5014
5015 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5016
5017         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5018         monodevelop startup.
5019
5020 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5021
5022         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5023
5024         * mini-sparc.h mini-sparc.c: Implement IMT support.
5025
5026         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5027         its smaller and doesn't clobber sparc_g1.
5028
5029         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5030
5031 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5032
5033         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5034
5035 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5036
5037         * mini-ppc.c: implemented fast delegate invocation.
5038
5039 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5040
5041         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5042
5043 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5044
5045         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5046         code to the new style trampoline in preparation for IMT support.
5047
5048 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5049
5050         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5051         systems already. This also reduces the specific trampiline sizes and
5052         prepares for the use of r12 as the IMT identifier register.
5053
5054 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5055
5056         * mini-mips.h: endianess fix (simplified from a patch by
5057         Thomas Kunze <thommy@tabao.de>, bug #323737).
5058
5059 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5060
5061         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5062         to access ucontext fields and enable netbsd support
5063         (partially from Magnus Henoch <mange@freemail.hu>).
5064
5065 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5066
5067         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5068         use the preprocessor from the CPP env var if it is set.
5069
5070 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5071
5072         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5073         code, before interface_offset gets used.
5074
5075 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5076
5077         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5078         mono_class_setup_vtable () before accessing klass->vtable.
5079
5080 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5081
5082         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5083         hackish.
5084
5085 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5086
5087         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5088         IMT slots (this saves hundreds of KB of memory in programs like
5089         IronPython and Monodevelop).
5090
5091 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5092
5093         * mini.c: print the delegate counter.
5094
5095 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5096
5097         * mini-x86.c: make it easier to enable the debugging code for IMT
5098         slots.
5099
5100 2007-09-28  Martin Baulig  <martin@ximian.com>
5101
5102         * debug-debugger.h
5103         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5104         `mono_method_klass_offset' and `mono_method_token_offset'.
5105
5106 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5107
5108         * mini.c: First generics sharing implementation.  Can only share
5109         in very simple cases.  If sharing doesn't work it falls back to
5110         dedicated compilation.
5111
5112         * mini.h: Flag in MonoCompile to specify whether generic
5113         compilation is shared.  Flags enum for marking which generic inst
5114         of a context is used.  Prototypes for helper functions.
5115
5116         * generic-sharing.c: Helper functions for generic method sharing.
5117
5118         * optflags-def.h: Optimization flag (gshared) for enabling generic
5119         method sharing added.
5120
5121         * Makefile.am: generic-sharing.c added.
5122
5123 2007-09-19 Daniel Nauck <dna@mono-project.de>
5124
5125         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5126
5127 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5128         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5129         fixes bug 325507.
5130
5131 2007-09-19  Martin Baulig  <martin@ximian.com>
5132
5133         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5134         mono_debug_cleanup() is now part of mono_cleanup().
5135
5136 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5137
5138         * driver.c (mono_main): Fix a warning.
5139
5140 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5141
5142         * aot-compiler.c: Optimize various parts when processing large assemblies.
5143         Fixes ##325568.
5144
5145         * mini.c (mono_patch_info_hash): Improve hash function.
5146
5147 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5148
5149         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5150         
5151         Code is contributed under MIT/X11 license.
5152
5153 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5154
5155         * mini.c (mini_init): Fix a leak.
5156
5157         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5158
5159 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5160
5161         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5162
5163 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5164
5165         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5166
5167 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5170         variance tests.
5171
5172         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5173
5174         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5175
5176         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5177
5178         * aot-runtime.c (decode_patch_info): Ditto.
5179
5180 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5181
5182         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5183         static case. Cache delegates in architecture specific code, 
5184         based on number of parameters.
5185         
5186         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5187         in architecture specific code, based on number of parameters.
5188         
5189         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5190         caching happen in architecture specific code now.
5191         
5192         Code is contributed under MIT/X11 license.
5193
5194 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5195
5196         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5197         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5198         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5199
5200         Code is contributed under MIT/X11 license.
5201
5202 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5203         * mini.c: (mono_thread_abort) Fixed bug #82416.
5204
5205 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5206
5207         * mini.: hook the new managed GC allocation feature into the JIT.
5208
5209 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5210
5211         * mini.c: implementation for the new runtime tls opcode.
5212
5213 2007-09-11  Martin Baulig  <martin@ximian.com>
5214
5215         * debug-debugger.h
5216         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5217         `mono_method_inflated_offset'.
5218
5219 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5220
5221         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5222         async exceptions into a method.
5223
5224         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5225         purpose of testing whenever the unwinder works at every instruction.
5226
5227 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5228
5229         * mini.c: check accessibility of method used in ldftn (fixes
5230         bug #82635).
5231
5232 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5233
5234         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5235
5236         * inssel.brg: Fix a warning.
5237
5238 2007-09-03  Martin Baulig  <martin@ximian.com>
5239
5240         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5241         now takes the `main_method' as argument.
5242
5243 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5244
5245         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5246
5247 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5248
5249         * driver.c: include the cil-coff.h header on Windows.
5250         
5251         Code is contributed under MIT/X11 license.
5252
5253 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5254
5255         * mini.c, driver.c: don't include the cil-coff.h header.
5256
5257 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5258
5259         * mini.c: flag places that needs fixes fo soft-float support.
5260
5261 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5262
5263         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5264         endian systems (partially from Dean Jenkins, bug #81924).
5265
5266 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5267
5268         * mini.c (check_linkdemand): Remove embedded reference object in
5269         call to LinkDemandSecurityException.
5270         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5271         with an IntPtr instead of a reference object.
5272
5273 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5274
5275         * mini.c (handle_initobj): Handle alignment properly.
5276
5277         * inssel.brg (mini_emit_memset): Ditto. 
5278
5279         * inssel.brg (mini_emit_memcpy): Ditto. 
5280
5281         * inssel-sparc.brg: Ditto.              
5282
5283         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5284
5285 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5286
5287         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5288         exceptions raised in unmanaged code. Fixes part of #82594.
5289
5290 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5291
5292         * mini.c (mono_method_to_ir), declsec.c
5293         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5294
5295 2007-08-22  Martin Baulig  <martin@ximian.com>
5296
5297         * debug-mini.h
5298         (MonoDebuggerThreadInfo): New typedef.
5299         (mono_debugger_thread_table): New global variable.
5300         (mono_debugger_thread_created): New public function.
5301         (mono_debugger_thread_cleanup): New public function.
5302
5303         * debug-debugger.h
5304         (MonoDebuggerInfo):
5305         - removed `get_current_thread' and `lookup_assembly'.
5306         - removed `data_table'.
5307         - added `thread_table'.
5308
5309         * mini.c
5310         (mono_thread_start_cb): Call mono_debugger_thread_created().
5311         (mono_thread_attach_cb): Likewise.
5312         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5313         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5314         initial domain.
5315
5316         * driver.c (mono_main): Move mono_debug_init() up, before calling
5317         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5318
5319 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5320
5321         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5322         together when passing several arguments of type double (gives a small
5323         speedup and saves a few bytes of generated code).
5324
5325 2007-08-20  Jb Evain  <jbevain@novell.com>
5326
5327         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5328
5329 2007-08-20  Jb Evain  <jbevain@novell.com>
5330
5331         * mini.c (mono_method_to_ir): throw MethodAccessException
5332         and FieldAccessException instead of InvalidProgramException.
5333
5334 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5335
5336         * mini.c: CoreCLR security checks.
5337
5338         * mini.h: Removed MonoSecurityMode (moved to
5339         metadata/security-manager.h) and mono_security_mode global var
5340         (replaced by set/get functions in security-manager.h).
5341
5342         * driver.c: Added "core-clr-test" security mode for testing.  Used
5343         set-function for setting security mode.
5344
5345 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5346
5347         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5348         the new jit_info_table.
5349
5350         * driver.c: Test code for the new jit_info_table (enabled by the
5351         define MONO_JIT_INFO_TABLE_TEST).
5352
5353 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5356         detection of call <REG> instruction sequence. Fixes build on freebsd.
5357
5358 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5359
5360         * mini-exceptions.c: Fix a warning.
5361
5362 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5363
5364         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5365         stack overflow handling code on amd64 too.
5366
5367         * mini-exceptions.c (mono_setup_altstack): Make this use 
5368         mono_thread_get_stack_bounds ().
5369
5370         * mini-x86.h: Disable sigaltstack on solaris x86.
5371
5372 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5373
5374         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5375
5376 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5377
5378         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5379
5380 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5381
5382         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5383
5384         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5385
5386 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5387
5388         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5389         due to alignment.
5390
5391 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5392
5393         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5394         to be emitted (bug #82281).
5395
5396 2007-08-01  Martin Baulig  <martin@ximian.com>
5397
5398         Merged the `debugger-dublin' branch.
5399
5400         * debug-debugger.h (MonoDebuggerInfo):
5401         Removed the `old_*' compatibility entries.
5402         Added `debugger_version' and `data_table'.
5403         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5404         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5405
5406         * debug-mini.c
5407         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5408         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5409         instead of a `gconstpointer'.
5410         (mono_debugger_insert_method_breakpoint): Return a
5411         `MonoDebugMethodAddressList *'.
5412
5413 2007-06-28  Martin Baulig  <martin@ximian.com>
5414
5415         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5416
5417 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5418
5419         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5420         __builtin_frame_address () since it is broken on older gcc versions.
5421
5422 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5423
5424         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5425         on the stack overflow handling and made the managed stack overflows
5426         catchable in most cases using soft guard pages.
5427         * exceptions-x86.c: added code to restore the protection in the soft
5428         guard pages at the end of exception handling.
5429
5430 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5431
5432         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5433
5434 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5435
5436         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5437         exception handling.
5438
5439 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5440
5441         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5442         signal handling support until it has been ported to the new mechanism.
5443         * mini.c: fixed stack overflow detection and use the new
5444         architecture code  to handle signals on the altstack.
5445
5446 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5447
5448         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5449         stack overflows on the alt stack.
5450
5451 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5452
5453         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5454         stack overflows on the alt stack.
5455
5456 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5457
5458         * exceptions-ppc.c: cleanup preparing for altstack support.
5459
5460 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5461
5462         * exceptions-arm.c: cleanup preparing for altstack support.
5463
5464 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5465
5466         * mini.c (print_jit_stats): Output hazard pointer stats.
5467
5468 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5469
5470         * driver.c, mini.c: Replaced security mode flags with a single
5471         enum variable.
5472
5473 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5474
5475         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5476
5477 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5478
5479         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5480         (which doesn't do anything yet) for activating Core CLR
5481         (Silverlight) security.
5482
5483 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5484
5485         * mini-codegen.c: work around a possible gcc bug on arm.
5486
5487 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5488
5489         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5490         message for platforms that don't support AOT compilation.
5491
5492 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5493
5494         * mini.h, mini.c, driver.c: temporary smcs hack.
5495
5496 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5497
5498         * mini-arm.h, mini-arm.c: arm EABI fixes.
5499
5500 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5501
5502         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5503         case.
5504
5505         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5506         trampolines taking a method argument.
5507
5508         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5509
5510         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5511         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5512
5513         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5514         JIT compilation throws an exception. Fixes #82050.
5515
5516 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5517
5518         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5519         with the MONO_EXCEPTION_ defines.
5520
5521 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5522
5523         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5524         #82117.
5525         
5526         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5527         the cause of an assertion.
5528
5529 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5530
5531         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5532         removed.
5533
5534 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5535
5536         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5537         assert. Should fix #82103.
5538
5539 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5540
5541         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5542         here too. Fixes #82095.
5543
5544         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5545         addresses.
5546
5547         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5548
5549         * mini-amd64.h: Enable IMT for amd64.
5550         
5551         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5552
5553 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5554
5555         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5556
5557 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5558
5559         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5560         as soon as check_linkdemand sets an exception_type.
5561
5562 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5563
5564         * mini-x86.c: fixed offsets for IMT call sequence.
5565         * mini-x86.h: enable IMT again.
5566
5567 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5568
5569         * trace.c (mono_trace_enter_method): Decode MonoType too.
5570
5571         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5572
5573         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5574
5575         * mini-amd64.c: Add preliminary IMT implementation.
5576         
5577 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5578
5579         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5580         understand the new IMT-base interface invocation (thanks to
5581         Daniel Nauck for the report and the remote debugging session).
5582
5583 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5584
5585         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5586
5587 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5588
5589         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5590
5591 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5592
5593         * mini-trampolines.c: implement AOT IMT support.
5594         * mini-x86.h: enable IMT support for wider testing.
5595
5596 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5597
5598         * inssel.brg (emit_imt_argument): Add aot support here.
5599
5600         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5601
5602 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5603
5604         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5605         of the IMT implementation, partially from massi, with my
5606         implementation of the bsearch sequence. Disabled by default until
5607         the AOT code is implemented.
5608
5609 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5610
5611         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5612
5613         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5614
5615 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5616
5617         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5618         arch-independent IMT JIT code from Massimiliano
5619         Mantione (massi@ximian.com) with small cleanups from me.
5620
5621 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5622
5623         * Makefile.am: fix svn invocation to get the svn revision to be
5624         independent of the local language (build fix).
5625
5626 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5627
5628         * mini.c (inline_method): Reset cfg->exception_type if the
5629         inlining is aborted.  Fixes: 82049.
5630
5631 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5632
5633         * mini.c: remove assert from exception handling code when exception_ptr
5634         is not set.
5635
5636 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * mini.c (mono_codegen): Add an assert.
5639
5640         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5641         enter and leave code.
5642         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5643
5644 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5645
5646         * mini-ppc.c: fixed memory corruption for localloc(0)
5647         (bug #81852).
5648
5649 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5650         
5651         * mini.c: Fix warnings.
5652
5653 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5654
5655         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5656         to emit better double->int conversions.
5657
5658 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5659
5660         * mini.c: the provided Min/Max optimizations are valid for unisgned
5661         ints.
5662
5663 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5664
5665         * 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
5666
5667 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5668
5669         * mini.c (mono_running_on_valgrind): Add support for reporting the
5670         method and  its boundaries to valgrind.
5671
5672 2007-06-28  Martin Baulig  <martin@ximian.com>
5673
5674         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5675
5676 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5677
5678         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5679
5680         * generic.2.cs: Add new test case.
5681
5682 2007-06-25  Martin Baulig  <martin@ximian.com>
5683
5684         Merged the `debugger-dublin' branch.
5685
5686         * debug-mini.c
5687         (mono_debugger_insert_method_breakpoint): New public method.
5688         (mono_debugger_remove_method_breakpoint): Likewise.
5689         (mono_debugger_check_breakpoints): New static method.
5690         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5691
5692         * debug-debugger.h (MonoDebuggerInfo):
5693         Renamed (to keep backward compatibility in the vtable):
5694         `insert_breakpoint' -> `old_insert_breakpoint'.
5695         `remove_breakpoint' -> `old_remove_breakpoint'.
5696         `create_string' -> `old_create_string'.
5697         `lookup_class' -> `old_lookup_class'.
5698         `lookup_type' -> removed; changed into a dummy field.
5699         `lookup_assembly' -> `old_lookup_assembly'.
5700         Added (same functionality, but different signature):
5701         `create_string', `lookup_class', `lookup_assembly'
5702         Added new:
5703         `get_method_addr_or_bpt', `remove_method_breakpoint',
5704         `runtime_class_init'.
5705
5706         * debug-debugger.c: Merged the `debugger-dublin' branch.
5707
5708 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5709
5710         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5711         well.
5712         (peephole_pass): Likewise.
5713
5714 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5715
5716         * driver.c: hopefully make setaffinity work also for ancient
5717         versions of linux.
5718
5719 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5720
5721         * driver.c : win32 build fix.
5722
5723 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5724
5725         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5726         processor if it is set.
5727
5728 2007-06-21  Martin Baulig  <martin@ximian.com>
5729
5730         * debug-mini.h: New file.
5731
5732         * debug-mini.c
5733         (mono_debugger_insert_breakpoint_full): Moved here from
5734         ../metadata/mono-debug-debugger.c.
5735         (mono_debugger_remove_breakpoint): Likewise.
5736         (mono_debugger_breakpoint_callback): Likewise.
5737
5738 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5739
5740         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5741         changes in MonoGenericClass.
5742
5743 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5744
5745         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5746
5747 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5748
5749         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5750         removal of MonoGenericMethod.
5751
5752 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5753
5754         * mini-exceptions.c: hooks for the exception events profiling API.
5755
5756 2007-06-14  Randolph Chung  <tausq@debian.org>
5757
5758         * Makefile.ma: Add hppa target.
5759         * mini-arch.h: Include mini-hppa.h
5760         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5761         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5762         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5763
5764 2007-06-14  Randolph Chung  <tausq@debian.org>
5765
5766         * inssel.brg: Add rules for "chained" compare-branch operations so that
5767         a single compare op can affect multiple branches.  Adjust cost for
5768         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5769         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5770         cost for some rules so that they can more easily be overridden by
5771         per-arch rules (with fixes from lupus).
5772         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5773
5774 2007-06-13  Randolph Chung  <tausq@debian.org>
5775
5776         * mini-ops.h: Reorder branch ops so that they match the order of the
5777         corresponding CEE_* ops.  The code expects them this way.
5778         Add new ops for HPPA target.
5779         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5780
5781 2007-06-13  Randolph Chung  <tausq@debian.org>
5782
5783         * mini-exceptions.c: Handle cases where the stack grows towards
5784         larger addresses.
5785         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5786
5787 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5788
5789         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5790         counter.
5791         * driver.c: explain where a non-matching corlib is found.
5792
5793 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5794
5795         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5796
5797 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5798
5799         * mini-exceptions.c: Generate a method profile leave event during
5800         an exception to ensure that the profiler gets notified.
5801
5802 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5803
5804         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5805         branch.
5806
5807         * cpu-amd64.md: Add long_and/or/xor opcodes.
5808
5809 2007-06-06  Wade Berrier  <wberrier@novell.com>
5810
5811         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5812         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5813         length of instruction shr_imm (expected 8, got 10)
5814
5815 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5816
5817         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5818
5819 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5820
5821         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5822         MonoInternalHashTable again (fixed bug in the internal hash table
5823         code).
5824
5825 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5826
5827         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5828         Have to figure out what makes it crash the SWF regression.
5829
5830 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5831
5832         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5833
5834 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5835
5836         * mini.c: optimize out the type check when storing null in a
5837         reference array.
5838
5839 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5840
5841         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5842         MonoInternalHashTable.
5843
5844 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5845
5846         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5847         signed integer methods.
5848
5849 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5850
5851         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5852         permanently since the current approach doesn't work.
5853
5854 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5857         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5858
5859 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5860
5861         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5862         the sreg2==rdx case.
5863         
5864         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5865         account if it contains a rex prefix.
5866         (peephole_pass): Handle OP_FMOVE as well.
5867
5868 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5869
5870         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5871         as it causes regressions.
5872
5873 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5874
5875         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5876         static case as well.
5877
5878         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5879
5880         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5881         (mono_arch_get_this_arg_from_call): Ditto.
5882
5883         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5884
5885         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5886         invoke_impl field.
5887
5888         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5889         (mono_arch_get_this_arg_from_call): Ditto.
5890
5891         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5892         
5893         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5894         try to create optimized invoke code and use that for further invocations. 
5895         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5896
5897         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5898
5899 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5900
5901         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5902         sealed classes or methods.
5903         *devirtualization.cs: tests for the new optimization
5904
5905 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5908         by the update_volatile () function.
5909
5910 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5913         require it.
5914
5915         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5916
5917 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5918
5919         * mini.c: Add configure checks for header files.
5920         * mini-x86.c: Add configure checks for header files.
5921         * trace.c: Add configure checks for header files.
5922         * aot-runtime.c: Add configure checks for header files.
5923         * aot-compiler.c: Add configure checks for header files.
5924         * driver.c: Add configure checks for header files.
5925         * mini-codegen.c: Add configure checks for header files.
5926         
5927         Code is contributed under MIT/X11 license.
5928
5929 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5930
5931         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5932         icompare_imm -128 + op_iclt. Fixes #81703.
5933
5934 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5935
5936         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5937
5938 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5939
5940         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5941         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5942         so that all isinst checks now use "interface_bitmap".
5943
5944 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5945
5946         * cpu-amd64.md (jmp): Fix a warning.
5947
5948         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5949
5950         * basic.cs: Add new regression test.
5951
5952         * basic.cs: Remove test which is now in basic-long.cs.
5953
5954         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5955
5956         * basic-long.cs: Add new test.
5957         
5958 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5959
5960         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5961
5962 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5963
5964         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5965
5966         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5967         places.
5968         
5969         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5970         throwing code a bit.
5971
5972         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5973         the exception throwing code a bit.
5974
5975         * mini-x86.c (get_call_info): Allocate result from a mempool.
5976
5977 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5978
5979         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5980
5981         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5982
5983         * mini.h (MonoCompile): Add 'token_info_hash' field.
5984
5985         * mini.c: Save token->method associations during compilation so the AOT 
5986         compiler can use it.
5987         
5988         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5989         which reference generic classes and methods.
5990
5991 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5992
5993         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5994
5995         * aot-compiler.c (compile_method): Fix a typo in a comment.
5996
5997         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5998
5999         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6000         everything generic.
6001
6002         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6003
6004 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6005
6006         * mini.h (MonoCompile): Add 'args' field.
6007
6008         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6009         into cfg->args.
6010
6011         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6012
6013 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6016
6017         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6018
6019         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6020         opcodes for some opcodes.
6021
6022         * mini.h *.brg *.c: Use the new opcodes.
6023
6024 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6025
6026         * mini.h: Bumped aot revision.
6027
6028         * inssel.brg: modified code generation of type checks for interfaces
6029         to use the new "MonoClass.interface_bitmap" instead of the old
6030         "MonoClass.interface_offsets".
6031
6032 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6033
6034         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6035
6036 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6037
6038         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6039         64 bit platforms.
6040
6041 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6042
6043         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6044
6045 2007-04-27  Wade Berrier  <wberrier@novell.com>
6046
6047         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6048         mini.h) to fix build.
6049
6050 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6051
6052         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6053         
6054         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6055         causes the corlib unit tests to fail.
6056
6057 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6058
6059         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6060
6061         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6062
6063         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6064         opcodes to the comparison relations.
6065
6066         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6067         opcodes to their types.
6068         
6069         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6070
6071         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6072         it in cfg->arch.cinfo.
6073
6074         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6075
6076         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6077         cfg->cil_offset_to_bb.
6078
6079 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6080
6081         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6082         created becase of initlocals.
6083
6084 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6085
6086         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6087         Sergey Tikhonov <tsv@solvo.ru>.
6088
6089 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6090
6091         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6092
6093 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6094
6095         * cpu-s390.md (break): Correct the length of break instruction.
6096
6097 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6098
6099         * mini.c: fix a couple of soft-float issues and comments.
6100
6101 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6102
6103         * trace.c (is_filenamechar): - is also a filename char.
6104
6105 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6106
6107         * mini-s390.c: Correct checking for enum type in return value processing.
6108
6109 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6110
6111         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6112         (version.h): Makefile is in the build directory.
6113
6114 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6115
6116         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6117
6118 2007-04-11  Martin Baulig  <martin@ximian.com>
6119
6120         * mini.c (can_access_member): Fix handling of generic classes;
6121         fixes #81259.
6122
6123 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6124
6125         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6126
6127 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6128
6129         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6130
6131 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6132
6133         * mini-codegen.c: make sure the right spill amount is
6134         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6135
6136 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6137
6138         * mini-ppc.c: fixes for the fp_branch_nan test.
6139
6140 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6141
6142         * basic.cs: Comment out new test which still fails on ia64.
6143
6144 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6145
6146         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6147
6148 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6149
6150         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6151
6152 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6153
6154         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6155         on 64 bit machines. Fixes part of #80738.
6156
6157         * basic.cs: Add regression test.
6158
6159 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6160
6161         * inssel.brg basic.cs: Revert previous change to fix build.
6162
6163         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6164         platforms.
6165         
6166         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6167
6168         * basic.cs: Add new regression test.
6169
6170 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6171
6172         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6173         many arguments.
6174
6175 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6176
6177         * cpu-s390x.md: Correct length of break instruction.
6178
6179 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6180
6181         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6182         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6183
6184 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6185
6186         * *.c: Begin WIN64 port.
6187         * mini.c:  Use correct register in profiler.
6188         * mini-amd64.c: No inline assembly on Win64.
6189         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6190         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6191         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6192         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6193         mono_arch_ip_from_context for Win64.
6194         
6195         Contributed under MIT/X11 license.
6196
6197 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6198
6199         * exceptions-amd64.c (seh_handler): Ditto.
6200
6201         * exceptions-x86.c (seh_handler): Fix a memory leak.
6202
6203 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6204
6205         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6206         mini-s390x.c: fixed peephole optimizations to deal
6207         correctly with 1 and 2 byte reload avoidance.
6208
6209 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6210
6211         * cpu-s390.md, cpu-s390x.md: update localloc length.
6212
6213 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6214
6215         * cpu-g4.md: added missing descriptions.
6216
6217 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6218
6219         *  Makefile.am: Add support so the tail tests are not executed on
6220         PowerPC as that is a known limitation of the PowerPC port.
6221
6222 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6223
6224         * runmdesc.bat:  Move to msvc directory.
6225         
6226 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6227
6228         * runmdesc.bat:  Run executable that was produced by the current
6229         target and sent via an argument.
6230         
6231 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6232
6233         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6234         #81102.
6235
6236         * generics.2.cs: Add regression test.
6237
6238 2007-03-09  Wade berrier  <wberrier@novell.com>
6239
6240         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6241
6242 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6243
6244         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6245         AOT code depends on this.
6246
6247 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6248
6249         * mini.c: more precise tracking of types in the eval stack
6250         (part of fix for bug #81044).
6251
6252 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6253
6254         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6255
6256         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6257
6258 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6261
6262         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6263
6264 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6265
6266         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6267         a pointer on 64 bit systems. Fixes #80190.
6268
6269         * iltests.il: Add new regression test.
6270
6271 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6272
6273         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6274
6275 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6276
6277         * trace.c: Remove an erroneous alignemnt check when tracing.
6278           Fixes --trace on OSX86.
6279
6280 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6281
6282         * mini-$(arch).h: initialize SP in context for all the archs.
6283
6284 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6285
6286         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6287         regressions in the thread tests.
6288
6289 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6290
6291         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6292         - fixed implementation of LOCALLOC opcode
6293         - implemented non-un compare for floats
6294         - code cleanup
6295         - implementation of FDIV and CKFINITE opcodes
6296         - fixes for latest mono updates
6297         - additional arch opcodes
6298
6299 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6300
6301         * Makefile.am: simplify and merge rules for cross-compilation.
6302
6303 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6304
6305         * local-propagation.c: Actually *apply* the fix for bug 80591...
6306
6307 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6308
6309         * mini-exceptions.c: backuot part of the last change
6310         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6311
6312 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6313         * inssel.brg: Fix bug 59286.
6314
6315
6316 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6317
6318         * mini-exceptions.c: patch from Zoltan to correctly check for
6319         stack boundaries (using the stack register, not the frame register),
6320         fixes bugs #80724, #79717.
6321
6322 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6323
6324         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6325         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6326
6327         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6328         presence of frame pointer elimination.
6329
6330 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6331         
6332         * mini-x86.h: NetBSD UCONTEX_REG defines.
6333
6334 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6335
6336         * inssel-amd64.brg: Fix amd64 build.
6337
6338 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6339
6340         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6341         on amd64.
6342
6343 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6344
6345         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6346         ends.
6347
6348         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6349
6350 2007-01-30 Mark Mason <mason@broadcom.com>
6351
6352            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6353            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6354            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6355            beginning support for CEE_JMP [not quite working yet]
6356            * tramp-mips.c: LMF handling now works
6357         
6358 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6359
6360         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6361
6362         * mini.h (NULLIFY_INS): New macro.
6363
6364 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6365
6366         * mini.c: statistical profiler fix for windows, patch
6367         from Tor Lillqvist (tml@novell.com).
6368
6369 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6370         * local-propagation.c: Fix bug 80591.
6371
6372 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6373
6374         * Makefile.am: put back the --export-dynamic option as with
6375         the previous gmodule flags (thanks to Robert Jordan).
6376
6377 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6378
6379         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6380
6381         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6382         simplify and speed up the local register allocator. Also rename some fields
6383         like iassign->vassign.
6384         
6385         * regalloc.c: Remove some functions which are no longer used since their
6386         inlined version is in mini-codegen.c.
6387         
6388         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6389
6390         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6391
6392 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6393
6394         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6395         narrowing. Fixes #80622.
6396
6397         * iltests.il: Add new regresssion test. 
6398
6399 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6400
6401         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6402         debug-debugger.c, debug-debugger.h: warning fixes.
6403         * driver.c: updated copyright year and made it fit in one line.
6404
6405 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6406
6407         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6408
6409 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6412
6413         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6414
6415         * iltests.il: Add new test for bug #80507.
6416
6417 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6418
6419         * mini-arm.h: use soft-float also on vfp for now.
6420
6421 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6422
6423         * mini.c: fix some more soft-float issues.
6424
6425 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6426
6427         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6428
6429 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6430         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6431         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6432         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6433
6434 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6435
6436         * mini-arm.c: typo fix.
6437
6438 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6439
6440         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6441
6442 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6443
6444         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6445         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6446
6447         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6448
6449         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6450
6451         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6452         
6453         * inssel.brg: Fix a warning.
6454
6455         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6456
6457         * abcremoval.c ssa.c ssapre.c: Update after this change.
6458         
6459         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6460
6461         * dominators.c (df_set): Use mono_bitset_union_fast.    
6462
6463 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6464
6465         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6466         mini-codegen.c: reduce relocations and memory usage for the cpu
6467         description.
6468
6469 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6470
6471         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6472
6473         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6474         to reduce their size.
6475
6476 2007-01-19 Mark Mason <mason@broadcom.com>
6477
6478         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6479         * mini-mips.c: more configuration macros, support long conditional branches, additional
6480         asserts, fix epilog instrumentation.
6481         * mini-mips.h: use standard stack walk
6482         * cpu-mips.md: increase size of div, rem and conditional branches
6483         
6484 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6485
6486         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6487         to cpu spec data.
6488
6489 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6490
6491         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6492         (compile_method): Ditto.
6493
6494         * aot-runtime.c (decode_klass_info): Ditto.
6495
6496         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6497         needed by the code generated by inssel.brg. Also fix a warning.
6498
6499 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6500
6501         * mini.c: deal with enums that become genericinsts by
6502         being nested in a generic class (bug #79956).
6503
6504 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6505
6506         * mini.c: match the generic definition to check for
6507         private access with generic types (bug #78431).
6508
6509 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6510
6511         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6512         to make life easier for people cross-compiling that insist on not
6513         using scratchbox.
6514
6515 2007-01-17 Mark Mason <mason@broadcom.com>
6516
6517         * inssel-long.brg: patch to deal with mips missing flags
6518         * inssel-long32-mips.brg: implement overflow checks
6519         * insset-mips.brg: implement overflow checks
6520         * mini-mips.h: implement conditional exception handling
6521         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6522           Remove unused code, minor cleanups.
6523         * exceptions-mips.c: minor cleanups
6524         * mini-ops.h: add mips conditional exception ops
6525         * cpu-mips.md: add mips conditional exception ops
6526
6527         
6528 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6529
6530         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6531         to deal with mips missing of flags.
6532
6533 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6534
6535         * exceptions-ppc.c: execute fault handlers.
6536
6537 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6538
6539         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6540
6541 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6542
6543         * mini.c: handle also floating point values in initialize_array.
6544
6545 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6546
6547         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6548         array initialization and make it conditional on the intrins option.
6549
6550 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6551
6552         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6553         relocations and put the patch info names close to the enum definition.
6554
6555 2007-01-15 Mark Mason <mason@broadcom.com>
6556
6557         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6558
6559 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6560
6561         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6562
6563 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6564
6565         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6566
6567 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6568
6569         * Makefile.am: distribute the mips sources.
6570
6571 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6572
6573         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6574         directly.
6575
6576 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6577
6578         * cpu-x86.md: back out for now as this triggers other regressions.
6579
6580 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6581
6582         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6583         to eax:edx, so ecx can't get allocated to them (bug #80489).
6584
6585 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6586
6587         * mini.c, mini-exceptions.c: enabled running fault handlers
6588         (bug #80469).
6589
6590 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6591
6592         * driver.c: If nothing fail, do not use the string "failed",
6593         because it makes it very annoying to view test result logs on the
6594         web. 
6595
6596 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6597
6598         * debug-debugger.c (mono_debugger_main): Rename "main" to
6599         "main_method" to prevent a warning.
6600
6601         Remove a warning for unused field.
6602
6603 2006-12-28  Martin Baulig  <martin@ximian.com>
6604
6605         * debug-debugger.c
6606         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6607
6608 2006-12-22  Martin Baulig  <martin@ximian.com>
6609
6610         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6611         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6612         seperate `.mdb_debug_info' section, so we can access it from the
6613         debugger even if the binary is stripped.
6614
6615         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6616         from the `.mdb_debug_info' here to prevent the linker from
6617         removing that section.
6618
6619         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6620         mdb-debug-info64.s.
6621
6622 2006-12-19  Robert Jordan  <robertj@gmx.net>
6623
6624         * mini-x86: enable the code to return small structures in
6625         registers for FreeBSD as well. Fixes bug #80278.
6626         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6627
6628 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6629
6630         * mini-x86.c: align the stack when calling the profiler
6631         function instrumenting the prolog (on OSX).
6632
6633 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6634
6635         * mini.c: emit a break opcode where Debugger.Break () is called.
6636
6637 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6638
6639         * mini.c (mono_method_to_ir): Provide useful information on this
6640         assert, to prevent others from debugging like I did.
6641
6642 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6643
6644         * mini.c: enable code which was incorrectly commented
6645         (bug #80235).
6646
6647 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6648
6649         * mini-x86.c: enable on OSX, too, the code to return small
6650         structures in registers.
6651
6652 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6653
6654         * mini-x86.c: remove the use of the dynamic code manager here, too.
6655
6656 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6657
6658         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6659         mono_debugger_create_notification_function() to use
6660         mono_global_codeman_reserve () instead of a dynamic code manager.
6661
6662 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6663
6664         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6665         ves_array_element_address() jit icall and use a generated
6666         managed method instead (which is about 4 times faster for a rank 3
6667         array access).
6668
6669 2006-11-29  Mark Mason  <mason@broadcom.com>
6670
6671         * basic-calls.cs: additional tests for passing
6672         structures as function arguments.
6673
6674 2006-11-29  Mark Mason  <mason@broadcom.com>
6675
6676         * mini-mips.h: disable custom exception handling
6677         * mini-mips.c: throw/rethrow should use jalr to call
6678         exception stubs.  Fixed bug with passing structures
6679         by value. More support for tracing floating point
6680         functions.
6681
6682 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6683
6684         * mini.c: fixed typo in the soft-float ldind.r4 handling
6685         (bug #80086).
6686
6687 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6688
6689         * mini.c, mini.h, driver.c: added --runtime command line
6690         option to select a different runtime than the autodetected one.
6691         * jit.h: added API for embedders to initialize with a specific
6692         runtime version.
6693
6694 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6695
6696         * mini.c: handle also boxing of r4 values (bug #80024).
6697
6698 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6699
6700         * mini-ppc.c: force indirect calls until we reserve
6701         enough address space for all the generated code.
6702
6703 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6704
6705         * exceptions-arm.c: workaround bugs in the libc definition
6706         of struct ucontext.
6707
6708 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6709
6710         * inssel.brg: fixes from me and Mark Mason.
6711
6712 2006-11-23  Dick Porter  <dick@ximian.com>
6713
6714         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6715         semaphore display now we've fixed the initial value
6716
6717 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6718
6719         * inssel.brg: partially revert the last change to fix the build.
6720
6721 2006-11-21  Mark Mason  <mason@broadcom.com>
6722
6723         * inssel.brg: Add and use compare-and-branch macros to support
6724         architectures that do not have condition code registers (ie. MIPS).
6725         * *-mips.{c,brg,md}: Fix copyright statements
6726
6727 2006-11-20  Mark Mason  <mason@broadcom.com>
6728
6729         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6730         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6731         * mini.h: Added declaration for mono_print_ins()
6732         * mini-codegen.c: added ins_spec initializer for MIPS
6733         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6734         vreg to be virtual and hreg to be non-virtual.
6735         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6736         is not yet working/implemented correctly.
6737         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6738         non-static, fixup calls to print_ins() from other parts in the file.
6739
6740 2006-11-20  Mark Mason  <mason@broadcom.com>
6741
6742         * basic-calls.cs: added tests for passing structures as arguments
6743         to calls.
6744
6745 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6746
6747         * inssel-long32.brg: optimize signed division by power of two.
6748
6749 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini-arm.c: added support for interworking with thumb code
6752         (mono must be still be built using the ARM instruction encoding).
6753
6754 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6755
6756         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6757         verifier has different rules for it.   Fixes a few verifier issues
6758         in the test suite.
6759
6760         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6761         at the end, so people know what happened.
6762
6763 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6764
6765         * brach-opts.c: in optimize_exception_target() make sure we
6766         are in a catch clause (fixes bug #79871).
6767
6768 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6769
6770         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6771         more soft-float support fixes.
6772
6773 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6774
6775         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6776         that are passed half on the stack and half in registers.
6777
6778 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6779
6780         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6781         more mips integration work from Mark E Mason 
6782         <mark.e.mason@broadcom.com>.
6783
6784 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6785
6786         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6787         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6788         tramp-mips.c: added sources for the mips port, not
6789         integrated in the build yet. Contributed by
6790         Mark E Mason <mark.e.mason@broadcom.com>.
6791
6792 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6793
6794         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6795
6796 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6797
6798         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6799         put the soft-float rules in its own file since it seems to
6800         break s390 compilation.
6801
6802 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6803
6804         * mini-arm.c: fixed wrnings.
6805
6806 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6807
6808         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6809         inssel-arm.brg: ARM support for soft-float.
6810
6811 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6812
6813         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6814         loads and stores of 32 bit fp values.
6815
6816 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6817
6818         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6819
6820         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6821         works. Fixes #79852 and #79463.
6822
6823 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6824
6825         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6826         more soft-float support WIP and fixes.
6827
6828 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6829
6830         * mini-arm.c: some VFP updates.
6831
6832 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6833
6834         * mini-exceptions.c: 0 is a valid local var offset in some
6835         architectures, don't assert (bug #78508).
6836
6837 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6838
6839         * exceptions-arm.c: fixed off by one error in stack walk code.
6840
6841 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6842
6843         * mini.h, mini.c: more precise tracking of type load exceptions.
6844
6845 2006-11-03  Robert Jordan  <robertj@gmx.net>
6846
6847         * Makefile.am: [WIN32] Add monow.exe target.
6848         * driver.c: [WIN32] Don't detach the console when debugging.
6849         Fixes bug #79797.
6850         
6851 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6852
6853         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6854
6855 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6856
6857         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6858
6859         * driver.c (mini_regression): Fix --regression with AOT.
6860
6861         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6862
6863 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6864
6865         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6866
6867         * mini-sparc.h: Don't use sigaction on sparc/linux.
6868
6869         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6870
6871         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6872
6873         * mini-exceptions.c: Add proper include files for getpid ().
6874
6875 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6876
6877         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6878         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6879         method.
6880
6881         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6882         name cache to reduce its size.
6883
6884         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6885
6886 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6887
6888         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6889         the mono_lmf TLS variable.
6890
6891         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6892         trampoline lmf frames.  
6893
6894         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6895
6896 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6899         the mono_lmf TLS variable.
6900
6901         * mini-exceptions.c: Access the LMF structure through accessors.
6902
6903         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6904         variable instead of in jit_tls->lmf.
6905
6906         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6907         
6908         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6909         trampoline lmf frames.
6910
6911         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6912
6913 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6914
6915        * mini.c trace.c mini-x86.c: Revert these too.
6916         
6917        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6918        signature change.
6919
6920 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6921
6922         * genmdesc.c: removed now dead code.
6923
6924 2006-10-09  Robert Jordan <robertj@gmx.net>
6925
6926         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6927
6928 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6929
6930         * mini.h: do not leave gaps in the opcode values.
6931
6932 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6933
6934         * jit-icalls.h: flag functions as internal here, too.
6935
6936 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6937
6938         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6939         functions with the internal attribute.
6940
6941 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6942
6943         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6944
6945 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6946
6947         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6948         for soft-float.
6949
6950 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6951
6952         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6953         tail calls as on other platforms.
6954
6955         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6956
6957         * iltests.il: Add a few tailcall tests.
6958
6959 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6960
6961         * driver.c: fix loop for old compilers (bug #79521).
6962
6963 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6964
6965         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6966
6967         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6968
6969         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6970         metadata without any code.
6971
6972         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6973         more precise debugging information using gdb.
6974
6975 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6976
6977         * inssel-ia64.brg: Make the helper methods static.
6978
6979 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6980
6981         * inssel-x86.brg: make the helper methods static.
6982
6983 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6984
6985         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6986
6987 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6988
6989         * mini.c: updates for monoburg changes.
6990         * inssel.brg: make a few helper functions static as they should.
6991
6992 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6993
6994         * Makefile.am: Move mini-codegen.c to common_sources.
6995
6996 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6997
6998         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6999         instructions.
7000         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7001         mini-ppc.h: port to use the common local register allocator.
7002
7003 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7004
7005         * mini.h: Remove the comment too then.
7006
7007 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7008
7009         * mini.h: put back backend.data which is to be used shortly and
7010         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7011         pointers on 4 byte boundaries it'd have much bigger issues running
7012         and you can ifdef it out anyway.
7013
7014 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7015
7016         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7017         MonoInst size by 4 bytes on 64 bit machines.
7018
7019 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7020
7021         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7022         replacement with more meaningful field names. Arch maintainers, please
7023         check the assigned names are good enough for your arch.
7024
7025 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7026
7027         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7028         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7029
7030 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7031
7032         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7033         relocations and memory requirements, put the optimization flags
7034         definitions in their own file.
7035
7036 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7037
7038         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7039
7040         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7041
7042 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7043
7044         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7045
7046 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7047
7048         * inssel.brg: use the correct function to get the size of an item
7049         in an array, given an element class.
7050         * aot-compiler.c: do not access class->class_size directly.
7051
7052 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7053
7054         * mini.h, debug-mini.c: added a debugging function to print
7055         info about local variables and arguments in a jitted method.
7056
7057 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7058
7059         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7060
7061         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7062
7063 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7064
7065         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7066         inner and outer loops when passing vtypes.
7067
7068 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7069
7070         * mini-ppc.c: take into account the cpu errata for cache flushing
7071         which caused some random errors (bug #79381).
7072
7073 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7074
7075         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7076         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7077
7078 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7079
7080         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7081         loaded.
7082
7083         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7084         freebsd ports tree.
7085
7086         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7087         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7088
7089         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7090         displacement.
7091
7092 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7093
7094         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7095
7096 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7097
7098         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7099         macro does not have to be changed during debugging.
7100
7101         * 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>.
7102
7103         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7104
7105         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7106         
7107         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7108         MONO_ARCH_NO_EMULATE_MUL is defined.
7109
7110         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7111
7112         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7113
7114         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7115
7116         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7117         
7118 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7119
7120         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7121         stuff to mini-exceptions.c where it is used.
7122
7123         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7124         setup code, the real one is in mini-exceptions.c.
7125
7126         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7127         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7128         some changes from the freebsd ports tree.
7129
7130         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7131         constants.
7132         
7133         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7134
7135 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7136
7137         * mini.c: on Linux, check for /proc to be mounted
7138         (bug# 79351, novell bug#201204).
7139
7140 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7141
7142         * mini.c: handle cases where pthread_attr_getstack() behaves
7143         incorrectly (bug #78096).
7144
7145 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7146
7147         * mini-arm.c: support larger stack frames (bug #79272).
7148
7149 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7150
7151         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7152
7153         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7154         tokens.
7155
7156         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7157         mono_class_from_name () to find a class from its name.
7158
7159         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7160
7161 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7162
7163         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7164
7165 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7166
7167         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7168
7169 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7170
7171         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7172         callinfo->trampoline.
7173
7174         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7175         fixes #79271.
7176         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7177         future.
7178
7179 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7180
7181         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7182
7183 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7184
7185         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7186         stats.method_trampolines, it is already done by the generic trampoline code.
7187
7188         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7189         
7190 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7191
7192         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7193
7194         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7195
7196         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7197
7198         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7199         
7200         * mini.c (print_jit_stats): Print new stats.
7201
7202         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7203
7204 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7205
7206         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7207         Address on two dimensional arrays. Fixes #78729.
7208
7209         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7210
7211         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7212         a method.
7213
7214         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7215
7216         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7217         #79130.
7218         
7219         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7220         a race condition.
7221         (mini_get_ldelema_ins): Ditto.
7222
7223 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7224
7225         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7226         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7227         Fixes #79213.
7228
7229 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7230
7231         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7232         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7233
7234         * exceptions-s390x.c: Cosmetic change.
7235
7236         * tramp-s390.c: Fix warning.
7237
7238         * cpu-s390.md: Correct length of mul_imm.
7239
7240 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7241
7242         * aot-compiler.c: added binary writer with ELF backend
7243         implementation (only on Linux/x86 for now).
7244
7245 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7246
7247         * Makefile.am: Don't run net 2.0 AOT tests.
7248
7249         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7250         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7251
7252         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7253
7254 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7255
7256         * aot-compiler.c: simplified and refactored the asm-writing code
7257         to allow different backends.
7258
7259 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7260
7261         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7262
7263         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7264         little. Share patches of type TYPE_FROM_HANDLE as well.
7265
7266         * mini.c (mono_patch_info_equal): New helper function.
7267         (mono_patch_info_hash): Ditto.
7268
7269         * aot-compiler.c (emit_method_code): Fix s390 build.
7270
7271         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7272         is not handled because it is stored as a flag and not as a type ctor. Fixes
7273         #79016.
7274
7275 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7276
7277         * aot-compiler.c: Fix computation of GOT slot statistics.
7278         
7279         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7280         Also remove support for not PIC AOT.
7281
7282         * mini.h: Bump AOT file format version.
7283
7284         * objects.cs: Add a test for #78990.
7285
7286         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7287         (peter.dettman@iinet.net.au). Fixes #79087.
7288
7289         * basic-long.cs: Add a test for the above.
7290
7291 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7292
7293         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7294         
7295         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7296         code somewhat.
7297
7298 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7299
7300         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7301         exceptions.
7302
7303 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7304
7305         * mini.c: Don't verify COM proxy invoke calls
7306         
7307
7308 2006-08-10  Dick Porter  <dick@ximian.com>
7309
7310         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7311         which process is holding semaphores locked.
7312
7313 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7314
7315         * mini-ia64.c mini-amd64.c: Fix #79027.
7316
7317         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7318
7319         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7320
7321         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7322         implicit arguments in a vararg call. Fixes #79027.
7323
7324 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7325
7326         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7327         (mono_get_array_new_va_signature): Ditto.
7328
7329 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7330
7331         * aot-runtime.c: Call init_plt lazily.
7332
7333         * inssel-long.brg: Fix unsigned long->int conversion.
7334
7335         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7336
7337         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7338         that most data is now in the .rss/.data section.
7339
7340 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7341
7342         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7343
7344         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7345
7346         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7347
7348         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7349
7350         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7351         virtual call. Fixes #79010.
7352
7353         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7354         and use the result as the this argument in the real call.
7355
7356         * generics.2.cs: Add a new test for #79010.
7357         
7358 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7359
7360         * mini-x86.c: Fix a warning.
7361
7362         * aot-compiler.c: Add a bunch of statistics.
7363
7364         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7365
7366 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7367
7368         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7369
7370 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7371
7372         * 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>.
7373
7374 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7375
7376         * mini.c (mono_method_to_ir): Obtain the original method in the
7377         CIL stream and use this to perform validation.
7378
7379         Fixed: #78816
7380
7381 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7382
7383         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7384         (mono_arch_call_opcode): Ditto.
7385
7386         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7387         #78826.
7388
7389         * mini.c (mono_patch_info_dup_mp): New helper function.
7390         
7391         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7392         compilation. Fixes #78827.
7393
7394 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7395
7396         * declsec.c: Use original security informations for
7397           MONO_WRAPPER_MANAGED_TO_MANAGED.
7398
7399 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7400
7401         * mini.c: Allow Com Interop methods/classes and
7402         don't verify COM wrapper calls
7403         
7404
7405 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7406
7407         * inssel-long32.brg: Fix long->i4 checked conversion.
7408
7409         * exceptions.cs: Add a test for the above.
7410
7411 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7412
7413         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7414
7415         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7416         leaks.
7417
7418         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7419         #78775.
7420
7421 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7422
7423         * mini.c: Fix solaris/x86 exception handling.
7424
7425         * Makefile.am: Get rid of $(ICU_LIBS).
7426
7427 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7428
7429         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7430         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7431         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7432
7433         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7434
7435         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7436         this function causes a SIGSEGV.
7437
7438 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7439
7440         * mini.c: Remove unused solaris/x86 includes.
7441
7442 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7443
7444         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7445
7446 2006-06-20  Jb Evain  <jbevain@gmail.com>
7447
7448         * cpu-g4.md: fix max length of start_handler instruction.
7449
7450 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7451         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7452
7453 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7454         * ssa.c: Fixed bug 78653 for SSA based deadce.
7455         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7456         MonoInst.flags, used in SSA based deadce.
7457         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7458         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7459
7460 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7461
7462         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7463         it can end up using non executable memory on ppc64 systems
7464         running ppc32 userspace (fix from Johannes Berg).
7465
7466 2006-06-14  Dick Porter  <dick@ximian.com>
7467
7468         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7469         4.1.1
7470
7471 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7472         * mini.c: Made so that inline is locally disabled if it would
7473         trigger a .cctor, because too many apps depend on this behavior
7474         (which seems to be also the one of the MS CLR).
7475
7476 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7477
7478         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7479         No idea why this worked before.
7480
7481         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7482         which branch to outer exception clauses since they could skip the
7483         inner finally clauses. Fixes #78633.
7484
7485         * exceptions.cs: Add a test for the above.
7486
7487         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7488         Fixes #78629.
7489
7490         * iltests.il: Add a test for the above.
7491
7492 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7493
7494         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7495         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7496
7497         * iltests.il: Add a test for the above.
7498
7499 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7500
7501         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7502         
7503         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7504         methods as instrinsics.
7505
7506 2006-06-09  Wade Berrier <wberrier@novell.com>
7507
7508         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7509         (simple-cee-ops.h ssapre-mini-ops.h)
7510
7511 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7512
7513         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7514         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7515         instruction).
7516         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7517         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7518
7519 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7520
7521         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7522
7523 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7524
7525         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7526         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7527         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7528         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7529         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7530         of opcodes, so that bug 78549 should not happen again.
7531         * ssapre.c: Updated to use the renamed files.
7532
7533 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7534
7535         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7536         in OP_ATOMIC_EXCHANGE_I4.
7537
7538 2006-06-07  Wade Berrier <wberrier@novell.com>
7539
7540         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7541         in mono_debugger_create_notification_function)
7542
7543 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7544
7545         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7546         
7547         * mini.c (type_from_stack_type): Disable some changes which do not
7548         seem to work.
7549
7550         * driver.c: Reenable opts.
7551
7552         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7553         of the evaluation stack.
7554         
7555         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7556         evaluation stack trace at entry to the bblock.
7557
7558         * mini.c (merge_stacks): New function to perform verification of stack merges.
7559         Turned off by default.
7560
7561         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7562         STACK_MP.
7563         
7564 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7565
7566         * local-propagation.c: Fixed bug 78549.
7567
7568 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7569
7570         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7571
7572 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7573
7574         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7575         tramp-arm.c, tramp-ia64.c
7576         (mono_debugger_create_notification_function): Update signature to
7577         new signature and use new protocol for creating the notification
7578         function.  
7579
7580         Should fix the build.
7581
7582 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7583
7584         * exceptions-ppc.c (mono_jit_walk_stack)
7585         (ves_icall_get_frame_info): Fix the build
7586
7587 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7588
7589         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7590
7591 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7592
7593         * il2tests.2.il: New file for generics CIL tests.  Add test for
7594         #78019.
7595         * Makefile.am: Update.
7596
7597         Fix #78019
7598         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7599         to nullable types.
7600
7601 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7602
7603         * aliasing.c: Fixed bug 78311.
7604
7605 2006-05-29  Martin Baulig  <martin@ximian.com>
7606
7607         * mini-exceptions.c (mono_find_jit_info): When computing the
7608         native offset, check whether we're actually inside the method's
7609         code; call mono_debug_print_stack_frame() to format the frame.
7610         (ves_icall_System_Exception_get_trace): Call
7611         mono_debug_print_stack_frame() to format the stack frame.
7612         (ves_icall_get_trace): Update to the new debugging API.
7613         (mono_jit_walk_stack_from_ctx): Likewise.
7614         (ves_icall_get_frame_info): Likewise.
7615
7616         * mini.c (get_method_from_ip): Use the new debugging API.
7617         (mono_print_method_from_ip): Likewise.
7618
7619         * exceptions-ppc.c
7620         (mono_jit_walk_stack): Use the new debugging API.
7621         (ves_icall_get_frame_info): Likewise.   
7622
7623 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7624
7625         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7626
7627 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7628
7629         * mini.c: Added "limitator" to inline for debugging.
7630
7631 2006-05-24  Martin Baulig  <martin@ximian.com>
7632
7633         * debug-debugger.c (mono_debugger_init): Create a private,
7634         malloc()-based code manager for the notification function and
7635         intentionally leak it on exit.  This fixes the crash-on-exit race
7636         condition.
7637
7638         * tramp-amd64.c
7639         (mono_debugger_create_notification_function): Added
7640         `MonoCodeManager *' argument.
7641
7642         * tramp-x86.c
7643         (mono_debugger_create_notification_function): Added
7644         `MonoCodeManager *' argument.
7645
7646 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7647
7648         * aliasing.c: Fixed 64 bit issue.
7649         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7650         default since all known bugs are fixed (one more time!).
7651
7652 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7653
7654         * mini.c: write barrier support.
7655
7656 2006-05-23  Martin Baulig  <martin@ximian.com>
7657
7658         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7659         check at the top of the file.
7660
7661 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7662
7663         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7664         reverting changes without reason and without changelog entries.
7665
7666 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7667
7668         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7669         to a few opcodes. Fixes #78439.
7670
7671         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7672         consistency with other archs.
7673
7674         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7675
7676 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7677
7678         * debug-debugger.c: fix the build.
7679
7680 2006-05-17  Martin Baulig  <martin@ximian.com>
7681
7682         * debug-debugger.c
7683         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7684         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7685         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7686         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7687
7688 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7689
7690         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7691
7692 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7695         MONO_TYPE_GENERICINST.
7696         
7697         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7698         MONO_TYPE_GENERICINST.
7699
7700 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7701
7702         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7703         #78325.
7704
7705 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7706
7707         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7708         mempool.
7709         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7710
7711 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7712
7713         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7714         mono_trace_cleanup ().
7715
7716         * iltests.il: Fix problem with the newly added test.
7717
7718         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7719         due to register constraints, free up the previous hreg. Fixes #78314.
7720
7721         * iltests.il: Add new test for #78314.  
7722
7723         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7724         Interlocked.Add. Fixes #78312.
7725
7726         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7727         
7728 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7729
7730         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7731
7732 2006-05-05  Martin Baulig  <martin@ximian.com>
7733
7734         * debug-mini.c (mono_debug_open_block): New method.
7735
7736         * mini-amd64.c
7737         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7738         the beginning of each basic block.
7739
7740         * mini-x86.c
7741         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7742         the beginning of each basic block.
7743
7744 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7745
7746         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7747         default until I understand why they break the build on amd64.
7748
7749 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7750
7751         * mini.c (mini_cleanup): Call mono_cleanup ().
7752
7753         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7754         errors.
7755
7756 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7757
7758         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7759         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7760         default since all known bugs are fixed, and I cannot reproduce bug
7761         77944... I'm asking Matt Hargett to test again after this commit.
7762
7763 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7764
7765         * mini-codegen.c: Fixed typo that thrashed inline.
7766
7767 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7768
7769         * dominators.c (compute_dominators): Avoid using a worklist since
7770         it is not correct in some cases. Instead, iterate over all bblocks as
7771         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7772
7773 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7774
7775         * mini.c (mono_jit_compile_method_inner): Use
7776         mono_prepare_exception_from_error that resets the value
7777         internally.
7778
7779 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7780
7781         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7782         
7783 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7784
7785         * aliasing.c: Fixed bug 78210.
7786
7787 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7788
7789         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7790         default until all their problems (or the ones they trigger) are fixed.
7791
7792 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7793
7794         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7795         
7796         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7797         as loaded only after resolving patches since that could invoke the same method.
7798
7799         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7800
7801         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7802         functions.
7803
7804         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7805         AOT loader.
7806
7807         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7808         stack.
7809
7810         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7811         made from AOT code through the PLT table.
7812
7813         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7814         holding the plt offset when a call is made to the aot plt trampoline.
7815         
7816 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7817
7818         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7819         amd64 AOT support.
7820
7821         * Makefile.am (common_sources): Fix build breakage.
7822
7823         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7824         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7825         intra-assembly calls if possible.
7826         
7827         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7828
7829         * mini-trampolines.c: Handle PLT entries.
7830
7831         * mini.c: Avoid creating a GOT var for calls.
7832
7833         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7834         from mscorlib code.
7835
7836         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7837         from mscorlib code.
7838
7839         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7840         AOT code.       
7841
7842         * mini.h: Bump AOT file format version.
7843         
7844         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7845         covers more cases.
7846
7847 2006-04-25  Martin Baulig  <martin@ximian.com>
7848
7849         * driver.c: Disable copyprop, consprop and inline when running
7850         inside the debugger.
7851
7852 2006-04-25  Martin Baulig  <martin@ximian.com>
7853
7854         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7855         with `get_current_thread' and added `detach'.
7856         (MonoDebuggerMetadataInfo): Added `thread_size',
7857         `thread_tid_offset', `thread_stack_ptr_offset' and
7858         `thread_end_stack_offset'.
7859
7860 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7861
7862         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7863         aot-runtime.c.
7864
7865         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7866         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7867
7868         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7869
7870         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7871
7872         * aot.c: Add support for ADJUSTED_IID.  
7873
7874 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7875
7876         * aot.c (emit_method_order): Don't align method_order_end.
7877
7878         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7879         the interface ID changes.
7880
7881 2006-04-21  Dick Porter  <dick@ximian.com>
7882
7883         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7884         cleaning up a thread.  Fixes the new part of bug 77470.
7885
7886 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7887
7888         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7889         to managed wrapper.
7890                      
7891 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7892
7893         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7894         
7895         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7896         SIGSEGV. Fixes #78072.
7897
7898         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7899         unregister our SIGABRT handler.
7900
7901 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7902
7903         * mini.c: Disabled inline where it can alter the call stack in a
7904         way visible from managed code.
7905         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7906         default.
7907
7908 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7909
7910         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7911         on other platforms. Fixes #78089.
7912
7913 2006-04-13  Martin Baulig  <martin@ximian.com>
7914
7915         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7916         determine whether we're inside the debugger.
7917
7918         * debug-debugger.h
7919         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7920
7921 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7922
7923         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7924         handler clauses. Fixes #78024.
7925
7926         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7927         in the CALL_MEMBASE opcodes. Fixes #78088.
7928         (mono_arch_get_vcall_slot_addr): Ditto.
7929
7930 2006-04-10  Martin Baulig  <martin@ximian.com>
7931
7932         * debug-debugger.c: The thread handling code has now been moved
7933         into ../metadata/threads.c.
7934
7935 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7936
7937         * driver.c (mono_main): Fix --with-gc=none build.
7938
7939         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7940         (mono_spillvar_offset_float): Ditto.
7941         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7942         hreg, not when its !global, since on ia64, there is a third category: stacked
7943         registers.      
7944
7945 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7946
7947         * mini.c: set MonoInst->klass for load field address and a few other
7948         places.
7949
7950 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7951
7952         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7953
7954 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7955
7956         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7957         the branch opt changes.
7958
7959 2006-04-06  Dick Porter  <dick@ximian.com>
7960
7961         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7962         
7963         * wapihandles.c (mini_wapi_seminfo): 
7964         * driver.c (mono_main): Add semaphore info option
7965
7966 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7967
7968         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7969         branch optimization changes. Fixes #78009.
7970
7971 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7972
7973         * mini.c: ignore accessibility of methods in managed->native wrappers.
7974
7975 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7976
7977         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7978         
7979         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7980
7981 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7982
7983         * mini.c: Modify the branch optimizations to preserve the invariant that
7984         the entries inside the in_bb and out_bb arrays are unique.
7985         (mono_unlink_bblock): Avoid creation of new arrays.
7986
7987 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7988
7989         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7990         change (#77992).
7991
7992 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * mini.c (optimize_branches): Remove the "optimizations" in
7995         the cbranch1/cbranch2 -> branch cases which were causing several
7996         problems in the past. Fixes #77986.
7997
7998 2006-03-31  Chris Toshok  <toshok@ximian.com>
7999
8000         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8001         default optimizations :(
8002
8003 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8004
8005         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8006         branch.
8007
8008 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8009
8010         * local-propagation.c: Added comments to structs and removed
8011         "Mono" prefixes from local tree mover types.
8012
8013 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8014
8015         * Makefile.am (arch_sources): Define this for each architecture so 
8016         libmono_la_SOURCES is defined in one place.
8017
8018 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8019
8020         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8021         from handles/.
8022
8023 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8024
8025         * driver.c: print the GC name supplied by configure.
8026
8027 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8028
8029         * local-propagation.c: Added tree mover, and moved here all the
8030         local propagation code from mini.c
8031         * mini.c: Added support for treeprop, and moved all the local
8032         propagation code to local-propagation.c
8033         * mini.h: Added support for treeprop
8034         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8035         treeprop, inline and deadce by default
8036         * Makefile.am: Added local-propagation.c
8037
8038 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8039
8040         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8041
8042 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8043
8044         * debug-debugger.c: make it compile without the Boehm GC.
8045
8046 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8047
8048         * mini.c: fixed issue with mismatch when an icall is registered
8049         with multiple names but same address.
8050
8051 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8052
8053         * declsec.c, mini-exceptions.c: use write barrier to set reference
8054         fields of managed objects.
8055
8056 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8057
8058         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8059         (can_access_internals): Fix a warning.
8060
8061         * mini.c (print_method_from_ip): Rename this to 
8062         mono_print_method_from_ip so it gets exported.
8063
8064         * trace.c: Deal with strings inside StringBuilder's containing garbage
8065         and fix memory leaks. Fixes #77848.
8066
8067 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8068
8069         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8070         fixes #77787.
8071
8072 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8073         
8074         * mini-s390.c: Remove OP_X86_TEST_NULL.
8075
8076 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8077
8078         * mini.c: use the correct GetHashCode() for the moving collector.
8079
8080 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8081
8082         * liveness.c: Regalloc spill cost tuning.
8083
8084 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8085         
8086         * mini-s390x.h: Correct S390_LONG macro.
8087
8088         * mini-s390x.c: Cleanup unused code.
8089
8090 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8091
8092         * jit-icalls.h: New file.
8093
8094         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8095         icalls and include that instead of including jit-icalls.c.
8096
8097         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8098         OP_X86 opcodes.
8099
8100 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8101
8102         * mini.c: when checking for member accessibility, also check for
8103         friend assemblies and for explicit interface implementations.
8104
8105 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8106
8107         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8108
8109         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8110
8111         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8112         common cases are done first.    
8113
8114         * mini-ops.h: Only define platform specific opcodes on the given platform.
8115
8116         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8117         branch.
8118         
8119 2006-03-14  Martin Baulig  <martin@ximian.com>
8120
8121         Revert Paolo's change from r57348:
8122
8123         * mini.h: don't use gboolean for bitfields.
8124         * mini.c: verifier changes for fields and methods accessibility.
8125
8126 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8127
8128         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8129
8130         * mini-s390x.c: Fix conv_r_un.
8131
8132         * cpu-s390, cpu-s390x.md: Fix lengths.
8133
8134 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8135
8136         * mini.c: nested types have access to all the nesting
8137         levels, not just the enclosing types.
8138
8139 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8140
8141         * mini.c: added a few more verification checks.
8142
8143 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8144
8145         * liveness.c: Merge optimizations from the linear-il branch.
8146
8147 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8148
8149         * mini-ia64.c (emit_call): Add a comment.
8150
8151         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8152
8153         * tramp-ia64.c: Fix some warnings.
8154
8155 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8156
8157         * mini.h: don't use gboolean for bitfields.
8158         * mini.c: verifier changes for fields and methods accessibility.
8159
8160 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8161
8162         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8163         lazy icall wrapper changes.
8164
8165         * dominators.c: Replace all the dominator algorithms with faster
8166         ones from the linear-il branch.
8167
8168         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8169         the mempool.
8170
8171         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8172         common cases are done first.
8173
8174         * mini-amd64.c: Fix some warnings.
8175
8176         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8177         from the mempool.
8178
8179         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8180         added code.
8181
8182         * mini.h: Add a missing prototype.
8183
8184 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8185
8186         * mini.c: Compile icall wrappers lazily.
8187
8188         * mini-codegen.c: Use printf instead of g_print since its much faster.
8189
8190         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8191         function.
8192
8193         * mini.c (optimize_branches): Cache the negative result from 
8194         remove_block_if_useless ().
8195
8196         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8197         Also fix some bblock linking issues.
8198
8199         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8200         assembly files.
8201
8202         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8203
8204         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8205         accessed fields first, for better cache behavior.
8206         
8207 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8208
8209         * mini.c: speedup IList<T> array accesses.
8210
8211 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8212
8213         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8214         inline_costs counter. Fixes #77190.
8215
8216 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8217
8218         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8219         trace messages. Fixes #77706.
8220
8221 2006-03-04  Martin Baulig  <martin@ximian.com>
8222
8223         * tramp-amd64.c, tramp-x86.c
8224         (mono_debugger_create_notification_function): Use
8225         mono_global_codeman_reserve() to allocate a buffer at runtime and
8226         return it.
8227
8228         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8229
8230         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8231         notification function at runtime and then call `initialize' in the
8232         `MONO_DEBUGGER__debugger_info' vtable.
8233
8234 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8235
8236         * iltests.il: Fix a visibility problem.
8237
8238 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8239
8240         * driver.c, mini.c: add hooks for the counters API.
8241
8242 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8243
8244         * driver.c: show disabled options.
8245
8246 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8247
8248         * linear-scan.c: always use cost-driven selection.
8249
8250 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8251
8252         * jit-icalls.c (helper_compile_generic_method): Revert change from
8253         2006-02-24.
8254
8255 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8256
8257         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8258
8259 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8260
8261         * inssel.brg: style fixes, mostly to force the updated monoburg
8262         to run for people using svn.
8263
8264 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8265
8266         * mini.c: match monoburg changes.
8267
8268 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8269
8270         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8271         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8272         declaration in the header file.
8273
8274 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8275
8276         * helpers.c: reduce relocations and mem usage.
8277
8278 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8279
8280         * mini.h, mini-codegen.c: disable logging features if
8281         requested by configure.
8282
8283 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8284
8285         * mini.c: tiny verifier changes.
8286
8287 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8288
8289         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8290         cpu-pentium.md: stack alignment changes for osx/x86,
8291         partially from Geoff Norton <gnorton@customerdna.com>.
8292
8293 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8294
8295         * jit-icalls.c (helper_compile_generic_method): Update to changes
8296         in metadata/class.c.
8297
8298 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8299         
8300         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8301         
8302         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8303         interface calls with large offsets.
8304
8305 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8306
8307         * jit-icalls.c (helper_compile_generic_method): Document the
8308         special-case we depend on so that we can inflate the method twice
8309         with the same context with no bad side-effects.
8310
8311 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8312
8313         * mini-x86.c, mini-amd64.c: fix for case when xen support
8314         is disabled.
8315
8316 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8317
8318         * mini-x86.c, mini-amd64.c: generate code to access tls items
8319         in a faster way for Xen systems.
8320
8321 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8322
8323         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8324         updates and compilation fixes for the OSX/x86 port, mostly from
8325         Geoff Norton <gnorton@customerdna.com>.
8326
8327 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8328
8329         * inssel.brg: faster interface call implementation
8330         to sync with the interface_offsets MonoVTable changes.
8331
8332 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8333
8334         * mini.c: more verification checks.
8335
8336 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8337
8338         * mini.c: added a few more verification checks.
8339
8340 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8341
8342         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8343         facility on the processor and use it if available.
8344
8345 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8346
8347         * driver.c, aot.c, mini.c: throw exception if the IL code is
8348         invalid or unverifiable.
8349
8350 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8351
8352         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8353         m.StructField.
8354
8355 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8356
8357         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8358
8359 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8360
8361         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8362         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8363         handling of instantiated generic valuetypes.
8364
8365 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8366
8367         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8368         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8369         instead.
8370
8371         * generics.2.cs: Revert the nullable reftypes tests.
8372
8373 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8374
8375         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8376         using __builtin_frame_address (1) as it doesn't work in the presence
8377         of optimizations. Hopefully fixes #77273.
8378
8379         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8380         -> generics.cs change as it doesn't work with some automake versions.
8381
8382 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8383
8384         * mini.c: handle systems that sue a different way to
8385         retrieve the stack address of the current thread.
8386
8387 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8388
8389         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8390         it specially in the makefile.
8391
8392         * generics.2.cs: Add tests for nullable reference types.
8393
8394 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8395
8396         * mini.c: always handle the case when mono_jit_init()
8397         is called in a thread different from the main thread,
8398         confusing libgc (bug #77309).
8399
8400 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8401
8402         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8403
8404 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8405
8406         * mini.c: change optimize_branches () to use a single loop
8407         and introduce a new optimization to simplify some range checks.
8408
8409 2006-02-03  Martin Baulig  <martin@ximian.com>
8410
8411         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8412         and merged with debugger_thread_manager_add_thread().
8413         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8414         inform the debugger about the main thread.
8415
8416 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8417
8418         * basic.cs: Add test for div.un/rem.un constant folding.
8419
8420 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8421
8422         * cpu-s390x.md: correct int_xor_imm length
8423
8424 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8425
8426         * generics.2.cs: New test for #77442.
8427
8428         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8429         #77442.
8430
8431 2006-02-02  Martin Baulig  <martin@ximian.com>
8432
8433         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8434         <mono/metadata/mono-debug-debugger.h>   
8435
8436         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8437
8438 2006-02-02  Martin Baulig  <martin@ximian.com>
8439
8440         * debug-debugger.h: New header file for debug-debugger.c.
8441
8442         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8443         function is a separate thread anymore; add support for attaching.
8444
8445 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8446
8447         * tramp-x86.c: Fix a warning.
8448
8449 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8450
8451         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8452         on very large methods.
8453
8454         * aot.c (load_patch_info): Fix a warning.
8455
8456 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8457
8458         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8459         mini-ops.h: alu membase optimizations.
8460
8461 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8462
8463         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8464         to speedup StringBuilder.
8465
8466 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8467
8468         * dominators.c (mono_compute_natural_loops): Fix detection of
8469         loop body start blocks.
8470
8471         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8472
8473 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8474
8475         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8476         #75145.
8477
8478 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8479
8480         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8481
8482 2006-01-25  Martin Baulig  <martin@ximian.com>
8483
8484         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8485         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8486         started to cleanup this file a little bit.
8487
8488 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8489
8490         * mini.c: optimize a codepath frequently happening in generics code.
8491
8492 2006-01-23  Martin Baulig  <martin@ximian.com>
8493
8494         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8495
8496         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8497         functions directly.
8498
8499         * driver.c: debug-debugger.c is only available if
8500         `MONO_DEBUGGER_SUPPORTED' is defined.   
8501
8502 2006-01-23  Martin Baulig  <martin@ximian.com>
8503
8504         * debug-debugger.c: Only enable this on platforms where the Mono
8505         Debugger is working (x86 and x86_64).
8506
8507 2006-01-21  Martin Baulig  <martin@ximian.com>
8508
8509         The Mono Debugger is now using the normal `mono' instead of the
8510         `mono-debugger-mini-wrapper' when executing managed code.
8511
8512         * debug-debugger.c: New file; previously known as
8513         debugger/wrapper/wrapper.c.
8514
8515         * debug-mini.c (mono_init_debugger): Removed.
8516
8517         * driver.c (mono_main): Added new `--inside-mdb' command line
8518         argument which is used when running inside the debugger.
8519
8520 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8521
8522         * liveness.c (mono_analyze_liveness): Remove some unused data
8523         structures.
8524
8525 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8526
8527         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8528
8529 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8530
8531         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8532         depends on implementation details of monobitset.
8533
8534         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8535         Fixes #77271.
8536
8537 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8538
8539         * liveness.c: Update after monobitset changes.
8540
8541 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8542
8543         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8544
8545 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8546
8547         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8548
8549         * mini-s390x.c: Remove warning messages.
8550
8551 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8552
8553         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8554
8555 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8556
8557         * generics.2.cs: Add ldelem/stelem_any test.
8558
8559 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8560
8561         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8562
8563 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8564
8565         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8566         
8567 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8568
8569         * generics.2.cs: Reenable vtype tests.
8570
8571         * inssel-x86.brg: Remove an icorrect valuetype rule.
8572
8573 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8574
8575         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8576         initial support for OP_ABS.
8577
8578 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8579
8580         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8581
8582 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8583
8584         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8585         conversion and implement LADD/LSUB.
8586
8587         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8588         architectures.
8589
8590 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8591
8592         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8593
8594         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8595         architectures.
8596
8597 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8598
8599         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8600         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8601         (stack walk problem).
8602
8603 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8604
8605         * aot.c (mono_aot_load_method): Fix a warning.
8606
8607 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8608
8609         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8610
8611 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8612
8613         * iltests.il: Add test for #77148.
8614
8615         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8616         #77148.
8617
8618 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8619
8620         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8621
8622 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8623
8624         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8625         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8626
8627         * basic-long.cs: Add lconv-to-r4/r8 tests.
8628
8629 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8630
8631         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8632
8633         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8634         here as on other archs.
8635
8636 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8637
8638         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8639
8640 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8641
8642         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8643         
8644         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8645
8646         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8647         instrument_prolog; Add memory_barrier instruction.
8648
8649 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8650
8651         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8652
8653 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8654
8655         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8656
8657         * aliasing.c inssel.brg: Fix warnings.
8658
8659         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8660         could skip initialization of some parts of memory.
8661
8662         * mini.c mini-ia64.c: Fix warnings.
8663
8664         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8665
8666 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8667
8668         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8669         a crash seen on sparc.
8670
8671         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8672         
8673         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8674
8675 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8676
8677         * mini-ops.h: Add s390_backchain instruction
8678
8679         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8680
8681         * cpu-s390.md: Add s390_backchain instruction
8682
8683         * mini-s390.c: Significant ABI changes
8684
8685         * mini-s390.h: Cater for zero length structures
8686
8687 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8688
8689         * mini-s390.c: ABI fixes
8690
8691         * inssel-s390.brg: Remove debug statements
8692
8693         * cpu-s390.md: Fix length of ATOMIC_xx operations
8694
8695 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8696
8697         * basic-float.cs: Add float<->long conversion tests.
8698
8699 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8700
8701         * mini-s390.c: Fix LOCALLOC processing.
8702
8703         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8704
8705 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8706
8707         * iltests.il: Add tests for some opcodes not covered by the other
8708         tests.
8709
8710 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8711
8712         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8713         register loading for Tail processing; Correct trace output.
8714
8715         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8716
8717         * cpu-s390.md: Correct size of jmp instruction. 
8718
8719 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8720
8721         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8722
8723 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8724
8725         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8726           Bring s390 up to current level.
8727
8728 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8729
8730         * generics.2.cs: Disable the newly added tests as they do not work yet.
8731         
8732         * generics.2.cs: Add valuetype tests.
8733
8734 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8735
8736         * basic-long.cs: Add i4->u8 test.
8737
8738         * objects.cs: Add tests for JIT intrinsic.
8739
8740         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8741         optimizations lost by a mistake.
8742
8743 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8744
8745         * basic-long.cs: Remove a test moved to objects.cs.
8746
8747         * arrays.cs: Add more array tests.
8748
8749 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8750
8751         * arrays.cs: Add new tests for multi-dimensional arrays.
8752
8753 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8754
8755         * Makefile.am (test_sources2): Add generics.2.cs.
8756         (EXTRA_DIST): Add test_sources2.
8757
8758 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8759
8760         Support for boxing and unboxing nullable types as well as the
8761         isinst operation on nullables, per the CLI ammendment.
8762
8763         * inssel.brg (CEE_ISINST): Special case for nullable
8764
8765         * mini.c (handle_unbox_nullable): new method
8766         (handle_box): Special case for nullable types
8767         (mono_method_to_ir): Call handle_unbox_nullable in correct
8768         places.
8769
8770         * generics.2.cs: New test suite
8771
8772         * Makefile.am: Support for regression tests with generics.
8773
8774 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8775
8776         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8777         allocated to registers. Fixes #76800.
8778
8779 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8780
8781         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8782
8783 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8784
8785         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8786         of platforms.
8787
8788 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8791         objects.cs.
8792
8793         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8794         
8795         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8796 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8797
8798         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8799         single precision before storing to a single precision location.
8800
8801 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8802
8803         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8804
8805 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8806
8807         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8808         correct files.
8809
8810         * basic.cs: Remove test_0_byte_compares test which was moved to
8811         objects.cs a long time ago.
8812
8813 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8814
8815         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8816
8817 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8818
8819         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8820         handlers are called.
8821
8822         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8823         throwing code.
8824
8825          * mini-ia64.c: Add support for the throw->branch exception 
8826         optimization.   
8827
8828         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8829
8830 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8831
8832         * mini.c: Enabled "fastpath" deadce :-)
8833         
8834 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8835
8836         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8837         alias analysis pass to support it.
8838         * mini.h: Likewise.
8839         * ssa.c: Likewise.
8840         * liveness.c: Likewise (liveness computation can use aliasing
8841         information to be more accurate).
8842         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8843         moreover made so that "--compile-all" uses the given optimization
8844         flags and not the default ones.
8845         * aliasing.c: Alias analysis (new file).
8846         * aliasing.h: Likewise.
8847         * Makefile.am: added "aliasing.c" and "aliasing.h".
8848         
8849 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8850
8851         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8852         OP_L opcodes.
8853
8854 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8855
8856         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8857         fp >= end_of_stack exit condition, as it is not needed, and it might
8858         become true for fp eliminated frames.
8859
8860 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8861
8862         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8863         coded offsets.
8864
8865 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8866
8867         * mini-arm.c: fixed alignment of doubles/longs to match
8868         the C ABI (bug #76635).
8869
8870 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8871
8872         * aot.c: fix compilation with --enable-minimal=aot.
8873
8874 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8875
8876         * mini-arm.c: fixed compatibility with the new
8877         floating point emulator package for compares.
8878
8879 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8880
8881         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8882
8883 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8884
8885         * mini-exceptions.c (print_stack_frame): Output to stderr.
8886         (mono_handle_native_sigsegv): Ditto.
8887
8888 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8889
8890         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8891         OP_LCONV_TO_OVF_I implementation.
8892
8893         * mini-amd64.c: Add support for the throw->branch exception 
8894         optimization.
8895
8896         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8897         when the catch clause catches a more general exception, i.e. Object.
8898
8899 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8900
8901         * cpu-ia64.md: Remove unused opcodes.
8902
8903         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8904         specific defines for architectures defining USE_SIGACTION.
8905
8906         * mini-ia64.c: Fix some warnings.
8907
8908         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8909         version seemed to skip a frame.
8910
8911 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8912
8913         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8914         only calls which are made to native code use this flag.
8915
8916 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8917
8918         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8919         varargs methods as well.
8920         
8921         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8922         which have save_lmf set. Reorganize methods prologs a bit.
8923
8924         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8925         debugger to the proper place.
8926
8927 2005-10-29  Martin Baulig  <martin@ximian.com>
8928
8929         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8930         when running inside the debugger until the debugger has support
8931         for it.
8932
8933 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8934
8935         * mini.h: Fix a warning.
8936
8937 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8938
8939         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8940         we expose publicly, this returns the string.
8941
8942 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8943
8944         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8945         with fp elimination.
8946
8947 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8948
8949         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8950         native stacktrace using the glibc 'backtrace' function if available.
8951
8952 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8953
8954         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8955
8956         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8957         handle SIGSEGVs received while in native code.
8958
8959         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8960         code, call mono_handle_native_sigsegv which will abort the runtime
8961         after printing some diagnostics, instead of converting it into a
8962         confusing NullReferenceException.
8963
8964 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8965
8966         * cpu-pentium.md: Remove unused opcodes.
8967
8968 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8969
8970         * mini-amd64.h (MonoLMF): Add rsp field.
8971
8972         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8973         the lmf too.
8974
8975 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8976
8977         * mini-codegen.c (get_register_spilling): Fix some warnings.
8978
8979 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8980
8981         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8982         elimination during exception handling. Enable fp elimination by
8983         default.
8984
8985         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8986         elimination.
8987
8988 2005-10-16  Martin Baulig  <martin@ximian.com>
8989
8990         * mini-exceptions.c
8991         (mono_debugger_run_finally): New public method for the debugger.
8992
8993 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8994
8995         * debug-mini.c (mono_debug_init_method): Fix warning.
8996
8997         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8998         the 'exname' parameter const to fix some warnings.
8999
9000 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9001
9002         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9003         introduced by the previous patch.
9004
9005 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9006
9007         * basic-float.cs: Add test for precision of float arithmetic.
9008
9009         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9010         when loading/storing single values from/to memory.
9011
9012         * mini.c (mono_jit_compile_method_with_opt): Create the function
9013         pointers in the correct domain.
9014
9015 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9016
9017         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9018         introduced by previous patch.
9019         
9020         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9021         when out_filter_idx is NULL.
9022
9023         * mini-exceptions.c: Don't run filter clauses twice during exception
9024         handling. Fixes #75755.
9025
9026 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9027
9028         * aot.c: Add support for ldflda wrappers.
9029
9030         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9031         #75902.
9032
9033 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9034
9035         * mini.c, mini.h: do not consider exception handlers blocks when
9036         setting up interface variables.
9037
9038 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9039
9040         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9041
9042 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9043
9044         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9045         causes a regression.
9046
9047         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9048
9049 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9050
9051         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9052         of the OP_P definitions.
9053
9054         * TODO: Add a proposal for dealing with the CEE/OP mess.
9055
9056         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9057         optimizations from the x86 port.
9058
9059         * cpu-amd64.md: Ditto.
9060
9061         * basic.cs basic-long.cs: Add tests.
9062
9063 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9064
9065         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9066         Patrik Torstensson's implementation of my exception-handling
9067         optimization idea, when the exception object is not used
9068         (bug #62150).
9069
9070 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9071
9072         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9073         of the mul_imm optimizations from the old jit.
9074
9075 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9076
9077         * mini.c, liveness.c: patch by Patrik Torstensson and
9078         Zoltan Varga to improve performance in methods with
9079         exception clauses.
9080
9081 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9082
9083         * driver.c: Remove 'Globalization' entry from --version.
9084
9085 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9086
9087         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9088         there is a profiler interested in JIT events.
9089
9090         * aot.c: Load profile files produced by the AOT profiling module, and
9091         reorder methods based on the profiling info. Add a 'method_order' table
9092         to the AOT file to make mono_aot_find_jit_info work with the reordered
9093         methods.
9094
9095         * mini.h: Bump AOT file version info.
9096
9097 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9098
9099         * mini-arm.h: work around what looks like a gcc bug when optimizations
9100         are enabled.
9101
9102 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9103
9104         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9105         conditionals.  Use ...
9106         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9107
9108 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9109
9110         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9111         to determine the amount of memory to copy when passing valuetypes.
9112
9113         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9114         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9115
9116 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9117
9118         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9119         information about aot.
9120
9121 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9122
9123         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9124         macros. This will allow a deadlock debugger to easily be plugged
9125         in.
9126
9127 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9128
9129         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9130
9131 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9132
9133         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9134         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9135         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9136         ($(arch_built)) [CROSS_COMPILING]: Error out.
9137
9138 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9139
9140         * aot.c: Add support for the no_special_static flag for classes.
9141
9142 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9143
9144         * Reapply reverted patches.
9145
9146         * *: Revert r50174 as well.
9147
9148         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9149
9150 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9151
9152         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9153
9154 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9155
9156         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9157         part of the SIG_HANDLER_SIGNATURE.  
9158
9159 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9160
9161         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9162         statistics.
9163
9164         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9165         introduced by previous patch.
9166
9167 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9168
9169         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9170         saved registers too.
9171
9172         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9173         upon the information returned by get_call_info ().
9174         
9175         * mini-x86.c (add_float): Fix stack size calculation.
9176         (mono_arch_call_opcode): Rewrite this so it works based up the
9177         information returned by get_call_info ().
9178         (mono_arch_get_this_vret_args): Ditto.
9179
9180 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9181
9182         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9183         in cinfo to determine the registers which need to be used.
9184
9185 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9186
9187         * driver.c (mono_main): Add --server and --desktop flags. 
9188
9189 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9190
9191         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9192         registers as global registers.
9193
9194         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9195         longer needed with the new register allocator.
9196
9197         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9198
9199         * cpu-ia64.md: Remove unused opcodes.
9200         
9201         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9202         
9203 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9204
9205         * cpu-amd64.md: Remove unused opcodes.
9206
9207         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9208         needed with the new register allocator.
9209
9210         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9211         reg-reg moves.
9212
9213 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9214
9215         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9216
9217 2005-09-16  Martin Baulig  <martin@ximian.com>
9218
9219         * exceptions-amd64.c
9220         (throw_exception): Don't call mono_debugger_throw_exception() if
9221         we're a rethrow - see the FIXME in the code.
9222
9223 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9224
9225         * mini.c (mono_init_exceptions): This only works on some architectures.
9226         
9227 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9228
9229         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9230         on ia64.
9231
9232         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9233
9234         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9235         now in mini-exceptions.c.
9236
9237 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9238
9239         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9240         now in mini-exceptions.c.
9241
9242 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9243
9244         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9245         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9246
9247         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9248         code into mini-exceptions.c. Add some assertions to it.
9249
9250 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9251
9252         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9253         (<software@solmersa.com>). Fix as errors on windows.
9254
9255 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9256
9257         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9258         method info into the LMF.
9259
9260 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9261         
9262         * mini-ia64.c: Add proper unwind info for method epilogs.
9263
9264         * exceptions-ia64.c: Add some code to help debugging.
9265         
9266         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9267
9268         * mini-exceptions.c: Fix warning.
9269
9270 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9271
9272         * mini.c: Really fix build.
9273
9274         * mini-x86.c mini-amd64.c: Fix build.
9275
9276 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9277
9278         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9279
9280         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9281         some Interlocked methods as intrinsics.
9282
9283         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9284         for Thread methods as well.
9285
9286         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9287
9288         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9289
9290         * mini-ia64.c mini-x86.c mini-amd64.c 
9291         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9292         OP_MEMORY_BARRIER.
9293         
9294         * mini.c (mono_init_exceptions): Fix build breakage.
9295
9296 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9297
9298         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9299         of instructions. Use the new ia64_unw_op macros for emitting unwind
9300         info.
9301
9302         * mini.c (mono_init_exceptions): Initialize exception handling
9303         related trampolines at startup.
9304
9305 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9306
9307         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9308
9309 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9310
9311         * mini.c: Handle type loading errors gracefully during compilation and
9312         throw the appropriate exception.
9313
9314 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9315
9316         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9317         for the mono binary.
9318
9319 2005-09-09  Martin Baulig  <martin@ximian.com>
9320
9321         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9322         the release.
9323
9324 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9325
9326         * mini-arm.h: use emulation for conv.r.un for the release.
9327
9328 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9329
9330         * mini-arm.c, objects.cs: more fixes and tests for them.
9331
9332 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9333
9334         * mini-arm.c: align structures to at least 4 bytes to be able
9335         to keep our current optimized memcpy.
9336
9337 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9338
9339         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9340
9341 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9342
9343         * mini.c: ignore SIGPIPE.
9344
9345 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9346
9347         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9348
9349         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9350
9351 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9352
9353         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9354
9355 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9356
9357         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9358         exception handling support.
9359         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9360         patch by Brian Koropoff <briank@marakicorp.com>).
9361
9362 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9363
9364         * mini.c: revert another 'optimization' which breaks when
9365         items on the eval stack need to be saved at a basic block end
9366         (bug #75940).
9367
9368 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9369
9370         * jit-icalls.c: for arrays, ensure we always provide
9371         lower bounds.
9372
9373 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9374
9375         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9376         
9377         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9378
9379 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9380
9381         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9382         arguments in their original register.
9383
9384 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9385
9386         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9387         memset/memcpy.
9388
9389         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9390         when ssapre is enabled.
9391
9392         * inssel-long.brg: Fix bug in previous patch.
9393
9394         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9395         multiplication by a constant.
9396
9397 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9398
9399         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9400         icc.
9401
9402         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9403         saving registers.
9404
9405 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9406
9407         * inssel-arm.brg: apply changes tested by Brian Koropoff
9408         <briank@marakicorp.com>.
9409
9410 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9411
9412         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9413         
9414 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9417         to the same register if dreg is just a base register.
9418         (print_ins): Improve printing of membase opcodes.
9419
9420         * inssel-x86.brg: Add optimized ldind(reg) rules.
9421
9422         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9423
9424 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9425
9426         * mini.c: when running under valgrind, set the stack bottom for
9427         the GC at the actual approximate stack for the app (fixes running
9428         mono with valgrind).
9429
9430 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9431
9432         * mini.c: do no break at the first valuetype to init found
9433         (fixes bug #75791).
9434
9435 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9436
9437         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9438
9439 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9440
9441         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9442
9443 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9444
9445         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9446
9447 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9448
9449         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9450
9451         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9452         code.
9453
9454         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9455         code.
9456
9457         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9458         methods.
9459
9460 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9461
9462         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9463
9464 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9465
9466         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9467         in the tail recursion optimization.
9468
9469         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9470         debug info into the assembly file.
9471
9472         * iltests.il: Add test for filter regions.
9473
9474         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9475         initial stack of filter regions. Fixes #75755.
9476
9477 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9478
9479         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9480         stack requirements.
9481
9482 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9483
9484         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9485         the check for an already compiled method on non-ia64 platforms.
9486         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9487         proper domain.
9488
9489         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9490
9491         * inssel-x86.brg: Add some optimized call rules.
9492
9493 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9494
9495         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9496         method here.
9497
9498         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9499         mono_arch_patch_delegate_trampoline.
9500
9501         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9502
9503         * mini-trampolines.c: Fix build.
9504
9505         * mini-amd64.h: Add delegate trampolines.
9506
9507         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9508
9509         * inssel-amd64.brg: Add optimized call rules.
9510         
9511         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9512
9513         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9514
9515 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9518         change.
9519
9520         * mini-ia64.c: Remove LMF fixmes.
9521
9522         * mini-ia64.h: Remove most fields from LMF.
9523
9524         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9525
9526         * mini-trampolines.c: Add support for IA64 function descriptors.
9527
9528         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9529         for IA64 function descriptors.
9530
9531 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9532
9533         * tramp-arm.c: patch the vtable for virtual calls. Added
9534         support code to register/unregister the LMF.
9535         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9536         more LMF work.
9537
9538 2005-08-19  Dick Porter  <dick@ximian.com>
9539
9540         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9541         bit value if needed.
9542
9543 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9544
9545         * mini.c (mini_get_method): Move handling of wrapper data here.
9546
9547         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9548
9549         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9550         virtual.
9551
9552         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9553         bblock->code does not remain empty.
9554
9555 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9556
9557         * arrays.cs: Add regression test for #75832.
9558
9559         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9560         rules. Fixes #75832.
9561
9562         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9563         instruction scheduling.
9564
9565 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9566
9567         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9568
9569 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9570
9571         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9572
9573         * mini-codegen.c: Fix VC build.
9574
9575         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9576
9577 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9578
9579         * mini.h: fix signature for mono_register_opcode_emulation.
9580
9581 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9582
9583         * mini.c: Get rid of most of the helper_sig_... constants using
9584         mono_create_icall_signature ().
9585
9586 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9587
9588         * jit-icalls.c (helper_ldstr): New helper function.
9589
9590         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9591
9592         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9593         throw, load the string using a helper call instead of creating a string object.
9594
9595         * aot.c: Update after LDSTR changes.
9596
9597         * mini.h: Bump AOT file version.
9598         
9599         * aot.c: Save class size info into the AOT file. Print more statistics during
9600         compilation.
9601
9602         * mini.h: Bump AOT file version.
9603
9604         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9605         ordering of disasm cases. Fixes #74957.
9606
9607 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9608
9609         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9610         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9611         the generic code needed for the ARM port.
9612
9613 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9614
9615         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9616         inssel-arm.brg: more ARM features and fixes.
9617
9618 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9619
9620         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9621         ARM port work in progress.
9622
9623 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9624
9625         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9626
9627         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9628
9629         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9630
9631         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9632
9633         * *-ia64.*: Ongoing IA64 work.
9634         
9635         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9636
9637 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9638
9639         * TODO: Remove out-of-data todo stuff.
9640
9641         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9642         dead code.
9643
9644         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9645
9646         * mini.h: Bump corlib version.
9647
9648 2005-07-27  Martin Baulig  <martin@ximian.com>
9649
9650         * mini-codegen.c
9651         (create_copy_ins): Added `const unsigned char *ip' argument; set
9652         `copy->cil_code' from it.
9653
9654 2005-07-27  Martin Baulig  <martin@ximian.com>
9655
9656         * mini-exceptions.c (mono_handle_exception): Don't call
9657         mono_debugger_handle_exception() for filters.
9658
9659 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9662         as well.
9663
9664 2005-07-26  Martin Baulig  <martin@ximian.com>
9665
9666         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9667
9668         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9669         helper_compile_generic_method() if the method is actually virtual
9670         and non-final.
9671
9672 2005-07-26  Martin Baulig  <martin@ximian.com>
9673
9674         * mini.c
9675         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9676         public; this is now accessed directly by the debugger.
9677         (mono_generic_trampoline_code): Removed.
9678
9679         * debug-mini.c
9680         (mono_debug_init_method): Also add interncalls and wrappers.
9681
9682 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9683
9684         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9685
9686 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9687
9688         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9689
9690 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9693
9694 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9695
9696         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9697         getting TLS offsets on AMD64 too.
9698
9699 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9700
9701         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9702
9703 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9704
9705         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9706         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9707
9708 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9709
9710         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9711
9712         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9713         to mini.c.
9714
9715         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9716         mono_sparc_is_virtual_call ().
9717         
9718         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9719
9720         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9721         trampoline parameters.
9722
9723         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9724         
9725         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9726         to mono_arch_get_vcall_slot_addr.
9727
9728         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9729         trampoline code.
9730
9731         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9732
9733 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9734
9735         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9736
9737 2005-07-19  Martin Baulig  <martin@ximian.com>
9738
9739         * exceptions-amd64.c (throw_exception): Call
9740         mono_debugger_throw_exception() here like we're doing it on i386.
9741
9742 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9743
9744         * mini-ia64.c: Add optimized TLS access support.
9745
9746 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9747
9748         * mini-exceptions.c: Ongoing IA64 work.
9749
9750         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9751
9752         * mini.c: Use the default optimization set when embedding. Fixes
9753         #75194.
9754
9755 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9758         of trampolines to a separate file.
9759
9760         * mini-trampolines.c: New file.
9761
9762         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9763         separate file.
9764         
9765         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9766         amd64/ia64 code.
9767
9768         * mini-codegen.c: Fix cygwin build.
9769
9770 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9771
9772         * mini.c: Add some minor changes needed by the IA64 port.
9773
9774         * *-ia64.*: Ongoing IA64 work.
9775
9776 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9777
9778         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9779         trampolines into arch-independent and arch-dependent parts.
9780
9781         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9782
9783 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9784
9785         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9786
9787         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9788         the xp-regalloc-branch for amd64.
9789
9790         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9791         xp-regalloc-branch for x86.
9792
9793 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9794
9795         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9796
9797 2005-07-06  Martin Baulig  <martin@ximian.com>
9798
9799         * mini.c
9800         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9801         (mono_jit_runtime_invoke): Likewise.
9802
9803 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9804
9805         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9806         on x86 too.
9807         
9808         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9809         without loading their metadata. Reorganize the file format so exception handling+
9810         debug info is kept separate from normal method info. Create MonoJitInfo 
9811         structures for methods lazily.
9812
9813         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9814         loading metadata.
9815         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9816
9817         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9818
9819         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9820         in AOT code.
9821
9822         * mini.h: Bump AOT file version.
9823
9824 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9825
9826         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9827
9828 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9829
9830         * Makefile.am (check-local): Call semdel-wrapper.
9831
9832 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9833
9834         * mini-x86.c: Revert the last change as it seems to break the build..
9835
9836 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9837
9838         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9839         
9840         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9841
9842 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9843
9844         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9845         outside of the macro, so strange stuff doesn't happen with gcc4
9846         (NEW_AOTCONST_TOKEN): Likewise.
9847
9848 2005-06-28  Martin Baulig  <martin@ximian.com>
9849
9850         * mini.c (mini_class_is_system_array): New static method; use this
9851         instead of `klass->parent == mono_defaults.array_class' everywhere
9852         since this also works for the new generic array class.
9853
9854 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9855
9856         * inssel.brg: Remove warnings.
9857
9858 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * mini-ia64.c: Ongoing IA64 work.
9861
9862         * basic-float.cs: Add float->i1 conversion test.
9863
9864         * iltests.il: Add conv.u4 test.
9865
9866 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9867
9868         * inssel-long.brg: Fix bug caused by last change.
9869
9870 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9871
9872         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9873         BSDs.  Allows the x86 JIT to work on OSX86
9874
9875 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9876
9877         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9878         u4->i8 conversion.
9879
9880         * mini-ia64.c: Ongoing IA64 work.
9881
9882 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * mini-ia64.c: Ongoing IA64 work.
9885
9886         * driver.c: Clean up jit_code_hash as well when using --regression.
9887
9888         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9889
9890         * basic-long.cs: Add tests for long->u4 conversion.
9891
9892 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9893
9894         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9895         that we do not depend on undefined C behavior: the order stuff
9896         gets evaluated within an expression. Fixes mono when compiled on
9897         GCC 4.
9898
9899 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9900
9901         * *-ia64.*: Ongoing IA64 work.
9902
9903         * aot.c: Lower memory usage while loading AOT methods.
9904
9905         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9906
9907         * mini.h: Bump AOT file format version.
9908
9909 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9910
9911         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9912
9913 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9914
9915         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9916         not on callee assembly). Fixed some comments.
9917
9918 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9919
9920         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9921         it gets proper disassembly.
9922         (emit_method_info): Remove some dead code.
9923
9924         * mini.c (mini_method_compile): Allways allocate the GOT var in
9925         mono_method_to_ir for emulating opcodes.
9926
9927 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9930         before freeing the code memory. Fixes #74990.
9931
9932         * objects.cs: Add regression test for #74992.
9933
9934         * liveness.c: Extend live ranges of arguments to the beginning of the
9935         method. Fixes #74992.
9936
9937         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9938         so it points into the faulting instruction.
9939
9940 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9941
9942         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9943
9944         * *-ia64.*: Ongoing IA64 work.
9945
9946         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9947
9948 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9949
9950         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9951
9952         * *-ia64.*: Ongoing IA64 work.
9953
9954 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9955
9956         * basic-long.cs: Add tests for add/sub.ovf.
9957
9958         * basic.cs: Add tests for sub.ovf.
9959
9960         * *-ia64.*: Ongoing IA64 work.
9961
9962 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * *-ia64.*: Ongoing IA64 work.
9965
9966         * basic.cs: Add conv.ovf.i4.un test.
9967
9968 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9969
9970         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9971         
9972 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9973
9974         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9975
9976 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9977
9978         * *-ia64.*: Ongoing IA64 work.
9979
9980 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9981
9982         * trace.[ch]:
9983         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9984
9985 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9986
9987         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9988
9989 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9990
9991         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9992
9993         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9994         of a call is callable by a near call.
9995
9996 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9997
9998         * mini-ia64.c: Ongoing IA64 work.
9999
10000 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10001
10002         * genmdesc.c: Make the generated array non-static.
10003
10004         * inssel-long.brg: Fix LSHR_IMM rule.
10005
10006         * *-ia64.*: Ongoing IA64 work.
10007
10008         * *-ia64.*: Ongoing IA64 work.
10009
10010 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10011
10012         * *-ia64.*: Ongoing IA64 work.
10013
10014         * *-ia64.*: Ongoing IA64 work.
10015         
10016         * mini-ia64.c: Ongoing IA64 work.
10017
10018         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10019
10020 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10021
10022         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10023         
10024         * objects.cs basic-long.cs: Move some tests to objects.cs.
10025
10026 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10027
10028         * *-ia64.*: Ongoing IA64 work.
10029
10030         * iltests.il: Add a new test.
10031
10032         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10033         newobj. Fixes #75042.
10034
10035 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * *-ia64.*: Ongoing IA64 work.
10038         
10039         * *-ia64.*: Ongoing IA64 work.
10040         
10041         * *-ia64.*: Ongoing IA64 work.
10042
10043         * basic.cs objects.cs: Move tests accessing static variables as well.
10044
10045         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10046
10047 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10048
10049         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10050
10051         * driver.c: Always print failed tests.
10052
10053         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10054         frame pointer.
10055
10056         * *ia64*: Ongoing IA64 work.
10057
10058 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10059
10060         * basic.cs: Add tests for add.ovf. Fix warnings.
10061
10062 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10063
10064         * driver.c (mono_main): Avoid crash if no argument is passed to
10065         --break;  Do not use g_error, but f_printf.   And fix all other
10066         ocurrences of the same crash.
10067
10068 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10069
10070         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10071         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10072         Fixes #74742.
10073
10074 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10075
10076         * *-ia64.*: Add beginnings of IA64 backend.
10077
10078         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10079
10080 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10081
10082         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10083         Fixes #74925.
10084
10085         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10086
10087         * mini-amd64.c: Fix a warning.
10088
10089 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10090
10091         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10092         in float_neg. Fixes #74897.
10093
10094         * mini-amd64.c (emit_call): Fix another near call bug.
10095
10096 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10097
10098         * declsec.c: Keep the appdomain information in the structure. Added a 
10099         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10100         value gets overwritten).
10101         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10102         an MonoAppDomain member to MonoSecurityFrame.
10103         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10104         used in the stack walk. Now use a MonoArray which grow (double) when
10105         it gets full.
10106
10107 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10108
10109         * mini.c: Re-enabled runtime cleanup, since running threads should
10110         now properly stop when exiting.
10111
10112 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10113
10114         * mini-codegen.c: New file contaning the arch-independent local
10115         register allocator. Not used by any architectures yet.
10116
10117         * mini.h linear-scan.c: Merge some changes from the 
10118         mini-xp-local-regalloc branch.
10119
10120 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10121
10122         * mini-amd64.c (emit_call): Fix calls to native functions when the
10123         runtime is compiled as a shared library. Fixes #74756.
10124
10125         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10126         on a literal field. Fixes #74751.
10127
10128 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10129
10130         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10131
10132 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10133
10134         * objects.cs: Add missing null casting test.
10135
10136 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10137
10138         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10139         in wrapper methods. Also rename 'address' variable to 'offset'.
10140
10141 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10142
10143         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10144         warnings.
10145         
10146         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10147
10148         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10149         work on windows.
10150
10151 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10152
10153         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10154
10155 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10158         just the last bytes.
10159
10160 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10161
10162         * aot.c (mono_compile_assembly): Fix warning.
10163
10164         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10165         by the _MSC_VER stuff.
10166
10167 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10168
10169         * inssel-long.brg: Fix #74588.
10170
10171         * cpu-amd64.md: Fix #74591.
10172
10173         * iltests.il: Add new regression tests.
10174
10175 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10176
10177         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10178         valuetype.
10179
10180 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10181
10182         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10183
10184         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10185         from Bill Middleton <flashdict@gmail.com>.
10186
10187 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10188
10189         * arrays.cs: Add new regression test. Fix warnings.
10190
10191 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10192
10193         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10194         and leakage in CKFINITE.
10195
10196         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10197         this to a null op since it is called on amd64 too.
10198
10199         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10200
10201         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10202         body since this is not used on amd64.
10203         
10204         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10205
10206         * mini-amd64.c: Remove obsolete fixmes.
10207
10208         * mini.c (print_method_from_ip): Fix debugging support.
10209
10210 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10211
10212         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10213         so that expressions that don't give much gain are not reduced.
10214         * ssapre.h: Likewise.
10215
10216 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10217
10218         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10219
10220         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10221
10222         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10223
10224 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10225
10226         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10227
10228         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10229
10230 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10231
10232         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10233         stack touching.
10234
10235         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10236
10237         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10238
10239         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10240
10241         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10242         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10243
10244         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10245
10246         * mini-x86.c: Fix up stack overflow handling.   
10247
10248         * exceptions.cs: Add new regression test.
10249
10250 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10251
10252         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10253         mono_jit_thread_attach.
10254
10255         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10256
10257 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10258
10259         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10260         avoid calling constructors using callvirt.
10261
10262         * inssel.brg: Fix #74073.
10263
10264 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10265
10266         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10267         compilation with non-GCC compilers.
10268         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10269         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10270
10271 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10272
10273         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10274         klass->interface_offsets (will likely fix bug#74073).
10275
10276 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10277
10278         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10279
10280 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10281
10282         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10283         to amd64_div_reg_size ().
10284         
10285         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10286
10287 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10288
10289         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10290
10291 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10292
10293         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10294
10295 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10296
10297         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10298         
10299         * mini.c (mono_precompile_assembly): Load and precompile referenced
10300         assemblies as well. Fixes #74015.
10301
10302 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10303
10304         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10305
10306 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10307
10308         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10309         a lot of checks and (anyway) permissions cannot work until corlib is 
10310         loaded.
10311
10312 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10313
10314         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10315
10316 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10317
10318         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10319         calls (fixes bug#72824).
10320
10321 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10322
10323         * mini.c: fix tail recursion elimination (see test in bug#73936).
10324
10325 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10326
10327         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10328         some fp functions in sse2 mode.
10329
10330 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10331
10332         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10333
10334 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10335
10336         * mini.h mini.c: Add mono_get_jit_tls_key ().
10337
10338         * mini-x86.c: Enable fast TLS support on windows.
10339
10340 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10341
10342         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10343         * mini.c: Check for p/invoke method when generating code. If a
10344         p/invoke method, or it's class, isn't decorated with [Suppress
10345         UnmanagedCodeSecurity] then generate code to call System.Security.
10346         UnmanagedDemand (only if the security manager is active).
10347
10348 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10349
10350         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10351         last change as it seems to cause strange crashes.
10352         
10353 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10354
10355         * *.c: handle unsafe function pointers where needed.
10356
10357 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10358
10359         * mini.c (mono_jit_free_method): Remove the fixme too.
10360
10361 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10362
10363         * mini.c: As discussed, make the code actually free the delegate
10364         thunk now, to enable the debugging of delegate problems, use
10365         MONO_DEBUG=1 when running Mono. 
10366
10367         This takes also care of parts of the leaks as seen by Joe.
10368
10369 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10370
10371         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10372         thread_tls_offset calculation.
10373
10374 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10375
10376         * declsec.c: Reworked linkdemand checks for icall. The previous code
10377         was using the declaration code (untrusted) and didn't work as expected
10378         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10379         specific case.
10380
10381 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10382
10383         * iltests.il: Add new localloc test.
10384
10385         * mini-amd64.c: Handle large stack allocations the same way as on
10386         windows if stack overflow handling is working.
10387         
10388         * mini-amd64.c: Allocate the signal stack using mmap.
10389
10390         * mini.c (sigsegv_signal_handler): Fix reading of context.
10391
10392         * mini-exceptions.c: Fix up stack overflow handling.
10393
10394         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10395
10396         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10397
10398         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10399
10400         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10401
10402         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10403         tramp_init functions as they are no longer needed.
10404
10405 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10406
10407         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10408         
10409         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10410
10411         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10412         
10413         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10414         support that now.
10415
10416         * mini-ops.h: Add OP_LMUL_IMM.
10417
10418         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10419         long mul/div opcodes as intrinsic.
10420
10421         * mini-amd64.c (emit_call): Handle the case when the callee might be
10422         an AOT method.
10423
10424 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10425
10426         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10427         extra safe.
10428         
10429         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10430
10431         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10432
10433 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10434
10435         * mini.c (mono_codegen): Don't leak here, to help people running
10436         monogrind.
10437
10438 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10439
10440         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10441         conversions in sse2 mode.
10442
10443         * basic-float.cs: Add regression test.
10444         
10445         * mini-amd64.c: Reenable sse2.
10446
10447 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10448
10449         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10450
10451 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10452
10453         * driver.c: Copyright text should include 2005.
10454         
10455 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10456
10457         * cpu-amd64.md (load_membase): Fix more max lengths.
10458
10459 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10460
10461         * cpu-amd64.md (load_membase): Fix max length.
10462
10463         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10464
10465         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10466
10467         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10468         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10469
10470         * basic-float.cs: Add rounding regression test.
10471
10472         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10473
10474 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10475
10476         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10477         structures in registers for pinvoke wrappers.
10478
10479 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10480
10481         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10482
10483 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10484
10485         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10486         wrapper to mono_jit_thread_attach.
10487
10488         * mini.c (mini_jit_thread_attach): New jit icall.
10489
10490         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10491         native->managed wrappers.
10492
10493         * exceptions.cs: Add new regression test.
10494
10495         * mini.c (optimize_branches): Check regions in the cbranch to throw
10496         block case as well. Fixes #73242.
10497
10498 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10499
10500         * mini.c: thread safety fixes.
10501
10502 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10503
10504         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10505         patching stuff, since delegates use jump trampolines so there is
10506         no caller.
10507
10508         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10509         jump trampolines.
10510         
10511         * tramp-amd64.c: Fix build.
10512
10513         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10514         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10515
10516         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10517         Rename this to mono_arch....
10518         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10519
10520         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10521
10522         * mini-amd64.c (emit_call): If both the caller and the callee is
10523         guaranteed to have 32 bit addresses, emit a normal call.
10524
10525         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10526
10527         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10528         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10529         method_ptr inside delegates.
10530
10531 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10532
10533         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10534         invalidated. Fixes #73001.
10535
10536         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10537
10538         * mini-x86.c: Only use stdcall for pinvokes on windows.
10539
10540 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10541
10542         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10543         * mini-x86.c: remove unreliable __thread var offset detection,
10544         use the correct accessors and enable by default.
10545
10546 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10547
10548         * mini.c (mono_jit_free_method): Fix memory leak.
10549
10550 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10551
10552         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10553
10554 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10555
10556         * cpu-amd64.md: Fix lengths of atomic opcodes.
10557
10558 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10559
10560         * driver.c: try to not imply using ICU is any good.
10561
10562 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10563
10564         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10565         functions as inline ops.
10566
10567         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10568         some Interlocked functions as inline ops.
10569
10570         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10571
10572         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10573
10574         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10575
10576         * mini.c: Add support for OP_NOT_TAKEN.
10577
10578         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10579         structures in registers for pinvoke wrappers.
10580
10581         * mini-amd64.c: Fix warnings.
10582
10583 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10584
10585         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10586
10587         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10588
10589         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10590         address instead of loading the address from it.
10591
10592         * mini-x86.c: Add support for returning small structs in registers
10593         on Win32. Fixes part of #70864.
10594         
10595 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10596
10597         * trace.c (get_token): Improve error checking.
10598
10599 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10600
10601         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10602
10603 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10604  
10605         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10606         it can be reused for MonoClass.
10607         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10608         _LINKDEMAND.
10609
10610 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10611
10612         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10613         instead of a MonoReflectionMethod. The method information wasn't used
10614         when displaying SecurityException details (but will be now).
10615
10616 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10617
10618         * Makefile.am : windows build fix.
10619
10620 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10621
10622         * iltests.il: Add new regression test.
10623
10624         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10625         #72522.
10626
10627 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10628  
10629         * mini.c: Moved linkdemand check into helper function check_linkdemand
10630         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10631         LDFTN, LDVIRTFTN).
10632
10633 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10634
10635         * declsec.c: Added statistics counter for different kinds of 
10636         LinkDemands.
10637         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10638         (and commented) declaration.
10639         * mini.c: Added statistics counter for security Demand code 
10640         generation. Added display of security statistics.
10641
10642 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10643
10644         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10645         Fix compilation errors under gcc-2.95.
10646
10647 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10648
10649         * mini.c, driver.c: Use the new jit trampoline hashtable
10650
10651 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10652
10653         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10654
10655 2005-02-11  Martin Baulig  <martin@ximian.com>
10656
10657         * debug-mini.c (mono_debug_close_method): Free the line number array.
10658
10659 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10660
10661         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10662         icalls.
10663
10664         * mini.h: Bump AOT file format version. 
10665
10666 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10667
10668         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10669         APTC and P/Invoke.
10670         * declsec.h: Added macros to get/set lazyly initialized security 
10671         informations about assemblies. Added new enum for different type of
10672         possible LinkDemand violation. Added function to check LinkDemands.
10673         * mini.h: Added a field to MonoCompile to hold any security violation
10674         detected when JITting a method (so it can be thrown later).
10675         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10676         and CEE_CALLVIRT. Added code to throw exception at the end of
10677         mini_method_compile (note: the exception is unhandled right now).
10678
10679 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10680
10681         * mini.c, jit-icalls.c: use the managed implementation of
10682         memset for initobj and memset, to avoid managed <-> unmanaged
10683         transitions.
10684
10685 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10686
10687         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10688         optimization if it would need a GOT var.
10689
10690         * basic.cs: Add tests for constant propagation and switch statements.
10691
10692         * ssa.c: Fix out-of-range constant propagation and switch statements.
10693
10694 2005-02-09    <vargaz@freemail.hu>
10695
10696         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10697
10698 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10699
10700         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10701
10702 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10703
10704         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10705
10706 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10707
10708         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10709         arithmetic operations.
10710
10711 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10712
10713         * mini-ppc.c: add a workaround for broken user code that
10714         DllImports vararg functions with non-vararg signatures.
10715
10716 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10717
10718         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10719         meaningfull error message for assemblies written in Managed C++.
10720
10721         * tramp-amd64.c mini-amd64.h: Add support for 
10722         create_trampoline_from_token ().
10723
10724         * aot.c mini-x86.c abcremoval.c: Applied patch from
10725         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10726
10727 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10728
10729         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10730         which takes a MonoImage/token as parameter instead of a MonoMethod.
10731
10732         * aot.c: Use the new trampoline for initializing vtables.
10733
10734         * aot.c: Add support for ldfld/stfld_remote wrappers.
10735
10736         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10737         rules for compare <MEM>, IMM.
10738
10739         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10740
10741         * aot.c: Handle inherited finalizers correctly.
10742
10743 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10744
10745         * inssel.brg (stmt): Add a missing _setup_... ().
10746
10747         * aot.c: Save some parts of the class state to the AOT file and use it
10748         to recompute that state when a class is initialized.
10749
10750         * mini.c: Install AOT hooks into the runtime.
10751
10752         * mini.h: Bump AOT file format version.
10753         
10754         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10755         Fixes #72148.
10756
10757         * iltests.il: Add new test.
10758
10759 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10760
10761         * mini.c: fix typo.
10762
10763 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10764
10765         * mini.c: setup the statistical profiler in the thread attach
10766         callback to cope with the new single thread code.
10767
10768 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10769
10770         * mini-ppc.c: ensure we have enough room for the profiler
10771         calls (fixed bug#72084).
10772
10773 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10774
10775         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10776         it.
10777
10778 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10779
10780         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10781
10782 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10783
10784         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10785         to succesfully execute parrotbench).
10786         * ssapre.h: Likewise.
10787
10788 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10789
10790         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10791         variable for stores to method arguments (fixes a SSAPRE issue).
10792
10793 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10794
10795         * mini.c: handle value types in dup, fixes gen-112.cs.
10796
10797 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10798
10799         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10800         sequence for calls in dynamic methods to avoid thunks.
10801
10802 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10803
10804         * mini.c: correctly remove dynamic methods from the hashtable.
10805
10806 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10807
10808         * driver.c: Disabled SSAPRE until fix the bug that appears
10809         in IronPython's parrotbench.
10810
10811 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10812
10813         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10814
10815         * mini.c (mono_method_to_ir): Revert the previous change.
10816         
10817         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10818         when AOT compiling.
10819
10820         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10821         mono_jit_info_table_find () etc. when running under valgrind.
10822
10823         * inssel.brg: Fix warnings.
10824
10825         * mini-exceptions.c: Fix warnings.
10826
10827 2005-01-31  Martin Baulig  <martin@ximian.com>
10828
10829         * driver.c (compile_all_methods_thread_main): Don't try to compile
10830         generic methods or anything which has type parameters.
10831
10832 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10833
10834         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10835
10836         * TestDriver.cs: Add --verbose flags.
10837
10838         * graph.c ssa.c: Fix 64 bit warnings.
10839         
10840         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10841         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10842         Fix 64 bit warnings.
10843
10844         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10845         variable not spotted by gcc.
10846         
10847         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10848         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10849         X86_COMPARE_MEMBASE opcodes.
10850
10851         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10852
10853 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10854
10855         * *: MonoMethod->signature might be NULL now. You *MUST* use
10856         mono_method_signature.
10857
10858 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10859
10860         * driver.c (compile_all_methods_thread_main): Compile the methods
10861         without invoking cctors.
10862
10863 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10864
10865         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10866         * basic-calls.cs: test for the above.
10867
10868 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10869
10870         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10871         MonoJitInfo changes.
10872
10873 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10876         eagerly if it contains dynamic methods.
10877         
10878         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10879
10880         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10881         trace, it is now computed by an icall from trace_ips.
10882         
10883         * mini-exceptions.c: Fix a warning.
10884
10885 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10886
10887         * mini-exceptions.c: don't bother getting stack trace info if
10888         it's not going to be used.
10889
10890 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10891
10892         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10893         ssapre-mini-ops.h.
10894
10895 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10896
10897         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10898
10899         * aot.c: Avoid calling mono_method_get_header () if not needed.
10900
10901         * mini.h: Bump AOT file format version.
10902         
10903         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10904
10905         * mini.c (mono_print_tree): Print more info for calls.
10906
10907 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10908
10909         * declsec.h: Remove warning by adding missing include for marshal.h
10910
10911 2005-01-26  Martin Baulig  <martin@ximian.com>
10912
10913         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10914         `ip' twice.
10915
10916 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10919         flags.
10920
10921         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10922
10923         * aot.c (mono_compile_assembly): Fix a warning.
10924
10925 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10926
10927         * declsec.c: Look for security attributes on the original MonoMethod 
10928         (and not the wrapped one). This fix permissions on icalls.
10929
10930 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10931
10932         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10933
10934         * mini.c (mono_allocate_stack_slots): Add a fixme.
10935
10936         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10937
10938 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10939
10940         * inssel.brg: optimize casts of sealed types (more
10941         optimizations waiting for fixes in remoting).
10942
10943 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10944
10945         * inssel.brg (stmt): Add another dummy rule.
10946
10947         * driver.c: Fix warnings.
10948
10949         * driver.c (mono_main): If running under valgrind, instruct glib to use
10950         the system allocation functions so valgrind can track the memory
10951         allocated by the g_... functions.
10952
10953         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10954
10955         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10956
10957         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10958
10959         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10960         variables in try regions.
10961
10962         * mini.c (mini_method_compile): Don't disable optimizations on large
10963         methods when AOT compiling.
10964
10965         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10966         allocate stack slots. Not yet used.
10967
10968 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10969
10970         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10971
10972 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10973
10974         * mini-ppc.c: make the branch info relative as the code
10975         buffer can be reallocated.
10976
10977 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10978
10979         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10980         * driver.c: Removed the AOT/security restriction. Now initialize the
10981         security manager (in metadata) if --security is used.
10982         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10983         rather than the pointer to declarative security, when AOT is used.
10984
10985 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10986
10987         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10988         basic blocks, reduced intrinsic exception throwing code size.
10989
10990 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10991
10992         * driver.c (mini_usage): Reorder the usage screen.
10993
10994 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10995
10996         * mini.c (mono_resolve_patch_target): Fix warning.
10997
10998 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10999
11000         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11001         previous patch.
11002
11003         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11004
11005         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11006         breaks the amd64 build.
11007
11008         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11009         register allocation. Fixes #71454.
11010
11011         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11012
11013         * arrays.cs: Add new regression test.   
11014
11015 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11016
11017         * ssapre.c: Turned usage of snprintf to GString.
11018         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11019         (I left it on by mistake in my previous commit).
11020
11021 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11022
11023         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11024         on cond branch optimization (fixes bug# 71515).
11025
11026 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11027
11028         * abcremoval.c: Fixed bug 71062.
11029         * abcremoval.h: Likewise.
11030
11031 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11032
11033         * mini.c: Added a new functionality to optimize_branches, the removal
11034         of useless basic blocks, and fixed some problem in the removal of
11035         critical edges; some utility functions added for both purposes.
11036         * ssapre.c: Added complex expression support, and fixed bug 70637.
11037         * ssapre.h: Likewise.
11038         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11039         enabled in SSAPRE.
11040         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11041         * driver.c: Re-enabled SSAPRE.
11042
11043 2005-01-19  Martin Baulig  <martin@ximian.com>
11044
11045         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11046         the result of mono_get_method_constrained().
11047
11048 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11049
11050         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11051         manager.
11052
11053 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11054
11055         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11056         be detected.  Fixes #59296.
11057
11058 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11059
11060         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11061         which can happen. Fixes #71361.
11062
11063 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11064
11065         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11066         manager.
11067
11068 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11071         appdomain-unload.exe to fail.
11072         
11073         * mini.c: Fix some memory leaks.
11074
11075 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11076
11077         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11078         Fixed bug and sped up some codepaths.
11079
11080 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11081
11082         * mini.c: Fix some memory leaks.
11083
11084         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11085         conversion.
11086
11087         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11088
11089         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11090         #71320.
11091
11092         * iltests.il: Add regression test for #71320.
11093
11094 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11095
11096         * mini.c (mono_codegen): Fix installation of profiler hooks.
11097
11098         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11099
11100 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11101
11102         * mini.h, mini.c, cfold.c: optimize access to enum
11103         readonly fields, too. Eval conditional branches if possible
11104         to perform unreachable code removal in more cases.
11105
11106 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11107
11108         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11109
11110         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11111         code manager.
11112
11113         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11114         WinXP DEP. Fixes #71244.
11115
11116 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11117
11118         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11119
11120 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11121
11122         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11123
11124 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11125
11126         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11127         changes.
11128
11129         * mini.h: Bump AOT version.
11130
11131         * mini.h (MonoCompile): Change exvar to a hash table.
11132
11133         * mini.c: Allocate a separate exvar for each handler block.
11134
11135         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11136
11137         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11138         ex var with the pending exception and only throw if the two are equal.
11139         Fixes #68552.
11140         
11141         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11142
11143         * mini-x86.c: Fix warnings.
11144
11145         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11146         used by all the ports now.
11147
11148         * aot.c: Add write-symbols and save-temps options.
11149
11150 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11151
11152         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11153
11154 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11155
11156         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11157         operations.
11158
11159         * tramp-s390.c: Check vtable slot belongs to the domain.
11160
11161         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11162         as per other platforms.
11163
11164         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11165
11166 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11167
11168         * driver.c: we don't run the Main() code in a subthread anymore.
11169
11170 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11171
11172         * mini.c: added experimental rtc support in the statistical
11173         profiler: if the user has the permission, more accurate statistics
11174         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11175         The MONO_RTC value must be restricted to what the linux rtc allows:
11176         power of two from 64 to 8192 Hz.
11177
11178 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11179
11180         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11181
11182 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11183
11184         * mini-ppc.c: better icache flush for smp.
11185
11186 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11187
11188         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11189
11190         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11191         amd64 port, not yet used.
11192
11193 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11194
11195         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11196         a struct type.
11197
11198 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11199
11200         * driver.c: Added --security option to activate the security manager.
11201         Right now this will allow code generation for declarative demands and
11202         is disabled when AOT is specified.
11203         * mini.c: Add code generation for declarative security demands.
11204         * mini.h: Add mono_use_security_manager as an extern gboolean.
11205
11206 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11207
11208         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11209         emitting more dense assembly code.
11210
11211         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11212         exception throwing stuff.
11213
11214 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11215
11216         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11217         dead code.
11218
11219         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11220         left in by mistake.
11221
11222         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11223         fixed.
11224
11225         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11226
11227         * tramp-*.c: Only patch vtable slots if the object is in the current
11228         domain. Fixes appdomain-unload.exe.
11229
11230         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11231         
11232         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11233         x86 branch.
11234
11235 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11236
11237         * mini.c (reverse_branch_op): New helper function.
11238
11239         * mini.c (optimize_branches): Run the new optimization only on 
11240         platforms which support it. Also reverse all kinds of branches.
11241
11242         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11243
11244         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11245         a throw statement.
11246
11247         * mini.c (optimize_branches): Reverse not-equals branches if the false
11248         bblock is a throw. This happens a lot of time with argument checking in
11249         corlib.
11250
11251         * mini.c (mono_codegen): Add support for placing basic blocks after
11252         the function epilogue.
11253
11254         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11255         function epilogue.
11256         
11257 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11258
11259         * mini.c (setup_stat_profiler): Only set this up if the platform
11260         supports ITIMER_PROF.
11261
11262 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11263
11264         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11265         previous patch.
11266
11267         * inssel.brg: Fix a warning.
11268
11269 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11270
11271         * mini.c: added support for statistical profiler 
11272         (run with: --profile=default:stat).
11273
11274 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11275
11276         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11277
11278         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11279
11280         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11281         related to global registers from the amd64 port.
11282
11283 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11284
11285         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11286
11287         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11288         with global registers.
11289         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11290
11291         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11292
11293 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11294
11295         * debug-mini.c (encode_value): Fix off-by-one.
11296
11297         * aot.c (encode_value): Likewise.
11298
11299         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11300
11301 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11302
11303         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11304         AOT.
11305
11306         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11307         
11308         * aot.c (emit_method_info): Increase size of temp buffer.
11309
11310         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11311         the AOT case.
11312
11313 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11314
11315         * aot.c (emit_method_info): Fix build.
11316         
11317         * aot.c: Further rework of the AOT file format to reduce the size of
11318         the method info data.
11319
11320         * mini.h: Bump AOT file format version.
11321
11322 2004-12-27  Martin Baulig  <martin@ximian.com>
11323
11324         * mini.c (mini_get_method): New static method; call
11325         mono_get_method_full() and mono_get_inflated_method().
11326         (mono_method_to_ir): Use mini_get_method() instead of
11327         mono_get_method_full(). 
11328
11329 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11330
11331         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11332
11333 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11334
11335         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11336
11337         * inssel-amd64.brg: Add some optimization rules.
11338
11339 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11340
11341         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11342         standard not GC'd stuff is fine.
11343
11344 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11345
11346         * aot.c: Rework the AOT file format to get rid of most of the global
11347         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11348
11349         * mini.h: Bump AOT file format version.
11350         
11351 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11352
11353         * mini.h: Bump AOT file format version.
11354
11355         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11356         address is inside a GOT.
11357
11358         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11359
11360         * cpu-pentium.md: Increase the maximum size of some instructions which
11361         might involve a got access.
11362         
11363         * mini.c (get_method_from_ip): Another debug helper function.
11364
11365         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11366         when got var accesses are created during the decompose phase.
11367
11368         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11369
11370         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11371         argument mini_compile_method and to MonoCompile, and use this to
11372         determine whenever a given method is compiled for AOT. This allows the
11373         other methods compiled during AOT compilation to be free of AOT stuff,
11374         so the backends does not need to add special support for them by
11375         creating a fake GOT etc.
11376
11377         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11378         longer needed.
11379
11380 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11381
11382         * mini.c (mono_method_to_ir): It turns out that some of the
11383         x-appdomain wrappers are lax with types, so just ignore this for
11384         all wrappers.
11385
11386         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11387         at the vtable->klass. If it is non-shared code we can just use the
11388         vtable.
11389
11390 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11391
11392         * mini-ppc.c: access MonoDomain from tls, too.
11393
11394 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11395
11396         * declsec.c: Removed unused variable (and related warning ;-)
11397
11398 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11399
11400         * iltests.il: New test for LDELEMA on an array of ref types.
11401
11402         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11403         all ldelema's on reftypes.
11404         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11405         it was the wrong place to put it.
11406
11407         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11408         register to pop to make this cleaner, at the request of Paolo.
11409
11410 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11411
11412         * mini-ops.h (OP_GETHASHCODE): New op.
11413
11414         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11415
11416         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11417         operation.
11418
11419         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11420         by 25%.
11421         
11422         * mini-x86.c (mono_arch_output_basic_block): Rather than
11423
11424         add ebp, 4
11425
11426         Emit
11427
11428         pop edx
11429
11430         The first is 3 bytes while the second is 1. This saves 36 kb on
11431         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11432         see a small boost because of icache locality.
11433
11434         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11435
11436 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11437
11438         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11439         started code sharing with the generic code.
11440
11441 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11442
11443         * mini-ppc.c, cpu-g4.md: added code for direct access to
11444         tls data slots.
11445
11446 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11447
11448         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11449          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11450         to OP_TLS_GET.
11451
11452 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11453
11454         * declsec.c|h: Added functions to cache the declarative stack modifiers
11455         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11456         structure.
11457         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11458         created. Register internal calls for System.Security.SecurityFrame::
11459         _GetSecurityFrame and _GetSecurityStack.
11460         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11461         the definitions for the new stack walk/callback mechanism.
11462         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11463         first security frame for LinkDemands and InheritanceDemands) and
11464         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11465         from lupus.
11466         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11467         walk initialization (lupus).
11468
11469 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11470
11471         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11472         idiom.
11473         (handle_loaded_temps): Do not create a temporary variable for
11474         things that we know are temps. They will never be modified.
11475         (mono_spill_call): Set MONO_INST_IS_TEMP
11476         (mono_emulate_opcode): ditto
11477         (emit_tree): ditto
11478         (mono_method_to_ir.CEE_DUP): ditto
11479
11480 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11481
11482         * mini.c (type_to_eval_stack_type): Make this handle the void type
11483         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11484         (emit_tree): use ip_in_bb to special case some common idioms
11485         Update all callers to pass in the IP.
11486         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11487
11488         This gives us a nice 2% speedup in mcs bootstrap.
11489
11490         * mini-x86.c (peephole_pass): Peephole pass to make
11491         mov  [foo], eax
11492         push [foo]
11493
11494         into
11495
11496         mov [foo], eax
11497         push eax
11498
11499         * mini.c (ip_in_bb): new method.
11500         (mono_method_to_ir): use this method rather than doing the hash
11501         lookup ourselves.
11502
11503         * linear-scan.c (mono_linear_scan): When expiring actives, you
11504         don't need to keep around variables that expire on this
11505         instruction. This makes it so that:
11506              a = b + 1
11507         will turn into:
11508              store (ebx add (ebx, 1))
11509         which will become
11510              add ebx, 1
11511
11512 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11513
11514         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11515         combination to avoid doing two copies. Fix up problems with previous
11516         patch.
11517
11518         * mini.c: Fix 64 bit warnings.
11519
11520         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11521
11522 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11523
11524         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11525         changes from the x86 code.
11526
11527         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11528
11529 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11530
11531         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11532         throwing code to reduce its size, unify the AOT and non-aot code and 
11533         get rid of relocations in the AOT case.
11534
11535         * mini-x86.h mini.c exceptions-x86.c 
11536         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11537         raise corlib exceptions which doesn't require relocations in the 
11538         caller.
11539
11540         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11541
11542 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11545         needed.
11546
11547         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11548         in the AOT case.
11549
11550 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11551
11552         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11553         with add function when used from Inc/dec atomic 
11554         functions. Re-enabled optimization on x86.
11555         * mini-ops.h: renamed atomic_add functions to
11556         allow _add to match the Interlocked::Add and
11557         _add_next to match Interlocked::Inc/Dec.
11558
11559 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11560
11561         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11562         linking of BBs to the end BB, and enabled SSAPRE also with
11563         consprop and copyprop (which was prevented by that bug).
11564
11565 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11566
11567         * mini-x86.c: disabling the Interlocked optimizing code. 
11568
11569 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11570
11571         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11572         file version check.
11573         
11574 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11575
11576         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11577         interlocked optimization due lack of support on x86, rewrote 
11578         exchange to take into account that base may be in eax.
11579         
11580         xsp works again; activated Interlocked optimizing code.
11581         
11582 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11583
11584         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11585
11586 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * mini-ops.h: Add new opcodes.
11589
11590         * mini.h: Add new patch types. Add got_var to MonoCompile.
11591
11592         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11593         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11594         make it work with all kinds of patchable code.
11595
11596         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11597         address of the GOT, and referencing entries in the GOT.
11598
11599         * mini.c: Add code to load the GOT address if needed by an opcode.
11600
11601         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11602         independent AOT code on the x86 using an elf-style Global Offset Table.
11603
11604 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11605
11606         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11607
11608 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11609
11610         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11611         when running xsp.
11612
11613 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11614
11615         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11616         of Interlocked:Increment/Decrement/Add as inline ops.
11617         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11618
11619 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11620
11621         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11622         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11623
11624 2004-12-12  Duncan Mak  <duncan@ximian.com>
11625
11626         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11627         again. `patch_info->table_size' is no longer valid after Zoltan's
11628         commit #37636.
11629
11630 2004-12-12  Martin Baulig  <martin@ximian.com>
11631
11632         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11633         if we are the "real" method, ie. not an inlined method inside it.
11634
11635 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11636
11637         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11638         before we look in the special fields table. This fixes
11639         ../tests/thread-static-init.cs.
11640
11641 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11642
11643         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11644         for Array get_Rank and get_Length. Fixes bug #70465.
11645
11646 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11647
11648         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11649         separate structure to reduce the size of MonoJumpInfo.
11650
11651 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11652
11653         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11654
11655 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11656
11657         * mini.c (mini_get_inst_for_method): Changed to allow ports
11658         to return a MonoInst instead of opcode 
11659         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11660         
11661         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11662         Allow ports to return a created MonoInst instead of op-code, will enable
11663         new optimizations.
11664         (renamed mini_get_opcode_for_method to better reflected the functionality)
11665
11666 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11667
11668         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11669
11670 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11673         Fixes #69985.
11674
11675 2004-12-08  Martin Baulig  <martin@ximian.com>
11676
11677         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11678         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11679
11680 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11681
11682         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11683         correctly.
11684
11685         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11686         arithmetic.
11687
11688 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11689
11690         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11691
11692 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11693
11694         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11695         bug introduced by the previous patch.
11696
11697 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11698
11699         * mini-ppc.c, objectc.cs: handle large structs passed by value
11700         (fixes bug #69972).
11701
11702 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11703
11704         * mini-ppc.c: OP_ARGLIST implementation from
11705         Geoff Norton  <gnorton@customerdna.com>.
11706
11707 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11708
11709         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11710         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11711
11712 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11713
11714         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11715
11716 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11717
11718         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11719         support.
11720
11721 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11722
11723         * mini-sparc.c: Zero out localled-ed memory.
11724
11725         * iltests.il: Add tests for zeroing out localloc-ed memory.
11726
11727 2004-12-04  Martin Baulig  <martin@ximian.com>
11728
11729         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11730         mono_method_get_signature_full().       
11731
11732 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11733
11734         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11735         and some utility functions (always for SSAPRE), integrated SSAPRE.
11736         * mini.h: Likewise.
11737         * driver.c: Added ssapre option.
11738         * ssa.c: Small fix on OP_ARG handling.
11739         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11740         * Makefile.am: Likewise.
11741
11742 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11743
11744         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11745         now in the xp code.
11746
11747         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11748         icall.
11749
11750 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11751
11752         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11753         
11754         * cpu-s390.md : Increase instruction length of oparglist.
11755
11756         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11757
11758 2004-11-30  Martin Baulig  <martin@ximian.com>
11759
11760         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11761         virtual generic methods.  We call a special helper_compile_generic_method()
11762         icall to retrieve the method from the vtable, inflate and compile
11763         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11764
11765         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11766
11767 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11768
11769         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11770
11771 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11772
11773         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11774         Fixes #69929.
11775
11776 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11777
11778         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11779         platforms with PIC aot.
11780
11781 2004-11-28  Martin Baulig  <martin@ximian.com>
11782
11783         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11784         Fixes gen-112.cs.
11785
11786 2004-11-28  Martin Baulig  <martin@ximian.com>
11787
11788         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11789         the result of mono_type_get_underlying_type() to check whether
11790         we're byref.
11791
11792 2004-11-26  Martin Baulig  <martin@ximian.com>
11793
11794         * mini.c
11795         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11796         in the g_assert().
11797
11798 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11799
11800         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11801         the same way as the other arguments so they won't get clobbered.
11802
11803         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11804         calls through R11 since it is clobbered by the trampoline code.
11805
11806 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11807
11808         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11809         pick up in-tree mscorlib.dll.
11810
11811 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11812
11813         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11814
11815         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11816         runtime data/code are now stored in a table similar to the GOT in ELF. 
11817         This allows the code itself to be position independent.
11818
11819         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11820         loading changes.
11821
11822         * aot.c: Attach ELF type (object/function) directives to all global
11823         symbols.
11824
11825         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11826
11827         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11828
11829         * mini-amd64.h: Turn on PIC AOT code.
11830
11831         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11832         returning the offset within an OP_AOTCONST instruction where the GOT
11833         offset needs to be added.
11834
11835         * mini.h: Bump AOT file format version.
11836
11837 2004-11-25  Martin Baulig  <martin@ximian.com>
11838
11839         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11840         uninflated generic methods.
11841
11842 2004-11-25  Martin Baulig  <martin@ximian.com>
11843
11844         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11845
11846 2004-11-24  Martin Baulig  <martin@ximian.com>
11847
11848         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11849         original klass (this only applies for generic instances).
11850
11851 2004-11-24  Martin Baulig  <martin@ximian.com>
11852
11853         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11854         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11855         that array).
11856
11857 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11858
11859         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11860         localloc. Fixes #69678.
11861
11862         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11863         
11864 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11867         used SSE registers on pinvoke calls. Fixes #69774.
11868
11869 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11870
11871         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11872         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11873
11874 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11875
11876         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11877         Refer directly to the mcs/ tree.
11878
11879 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11880
11881         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11882         Check if a trampoline for a synchronized method is required. 
11883
11884 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11885
11886         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11887         with localloc if needed. Throe arithmetric exception in
11888         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11889         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11890
11891 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11892
11893         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11894         types before switching on type.  Fixes #69622.
11895
11896 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11897
11898         * Makefile.am (check-local): New.  Integrate into 'make check'.
11899         (MCS,RUNTIME): Define using in-tree mono and mcs.
11900         (ILASM): New.
11901         (%.exe): Use $(ILASM).
11902
11903 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11904
11905         * mini-ppc.c: adjust initial prolog size (bug #69691).
11906
11907 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11908
11909         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11910         #69664.
11911
11912 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11913
11914         * Makefile.am (clean-local): Rename from 'clean'.
11915
11916 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11917
11918         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11919         to mono_arch_is_int_overflow. 
11920         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11921         SIGFPE events.
11922
11923 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11924
11925         * declsec.c|h: New files to support declarative security attributes.
11926         Added function to check if a method has (applicable) security.
11927         * mini.c|h: Add check for declarative security attributes in
11928         mono_method_check_inlining.
11929         * Makefile.am: Added declsec.c and declsec.h to the build.
11930
11931 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11932
11933         * mini.c, mini.h: update to keep dynamic code info per-domain.
11934
11935 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11936
11937         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11938         (mini_init): Get rid of it from here too.
11939
11940 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11941
11942         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11943         implemented OP_RETHROW (patch by Geoff Norton
11944         <gnorton@customerdna.com>).
11945
11946 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11947
11948         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11949         between appdomains.  Fixes appdomain-unload on PPC.
11950
11951 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11952
11953         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11954         mini-exceptions.c: handle the new wrapper types.
11955         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11956         token value as a MonoClass* when compiling a wrapper.
11957         mono_jit_create_remoting_trampoline now takes an additional
11958         MonoRemotingTarget parameter.
11959         
11960 2004-11-10  Martin Baulig  <martin@localhost>
11961
11962         * mini.c (mono_method_to_ir): Use `generic_container->context'
11963         rather than creating a new one.
11964
11965 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11966
11967         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11968
11969         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11970
11971 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11972
11973         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11974         the experimental aot cache stuff.
11975
11976 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11977
11978         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11979         mini-exceptions.c: update to exception clause structure changes.
11980
11981 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11982
11983         * exceptions-x86.c (throw_exception): Fix warnings.
11984
11985         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11986         for OP_RETHROW.
11987
11988 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11989
11990         * exceptions-sparc.c (get_throw_exception): Really fix this.
11991
11992 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11993
11994         * tramp-*.c: we no longer support icalls without wrappers, so
11995         a bit of code can be removed here
11996
11997 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11998
11999         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12000         patch.
12001
12002         * cpu-sparc.md: Add op_rethrow.
12003
12004         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12005
12006         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12007
12008         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12009         * mini-ops.h: Add OP_RETHROW.
12010
12011         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12012
12013         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12014
12015 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12016         
12017         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12018         Makes the output much easier to read
12019
12020 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12021
12022         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12023         prevents another huge leak when compiling with ssa. Secondly, the
12024         performance of doing this rather than freeing the lists is much
12025         better. GList does a lock every time you allocate a list link,
12026         so that it can use a memory pool. So, it is better to just use
12027         a memory pool of our own.
12028         
12029         * ssa.c, linear-scan.c: replace g_list_remove_link with
12030         g_list_delete.  The remove one does not free the GList, so we were
12031         leaking memory. On -O=all --compile-all with corlib, this cut down
12032         3 MB of allocations.
12033
12034 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12035
12036         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12037
12038         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12039
12040         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12041         into a new function mono_create_jit_trampoline ().
12042
12043 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12044
12045         * trace.c (get_spec): Allow tracing of classes without a namespace.
12046
12047 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12048
12049         * mini.c: Fix pointer overwrite in mini_method_compile.
12050
12051 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12052
12053         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12054         The darwin ABI needs some special handling for 1 and 2 byte structs
12055         Lets use lbz/lhz instead of lwz everywhere.
12056         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12057         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12058         Use stb/sth for the former, and put the latter always on stack instead of in
12059         argument registers.
12060
12061 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12062
12063         * trace.c (is_filenamechar): Add '_'.
12064
12065 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12066
12067         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12068
12069         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12070
12071 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12072
12073         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12074         depends on libmonogc. Fixes #68805.
12075
12076 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12077
12078         * mini.c (mono_jit_free_method): Provide extra information for
12079         this error.  Currently this leaks, but will be turned into a
12080         developer option in the future.
12081
12082 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12083
12084         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12085
12086 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12087
12088         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12089         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12090         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12091
12092 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12095         trampolines for AOT code.
12096
12097 2004-10-22    <vargaz@freemail.hu>
12098
12099         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12100         constructed types. Fixes #68136.
12101
12102 2004-10-21  Martin Baulig  <martin@ximian.com>
12103
12104         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12105         if it returns true, unwind the stack to the call instruction.
12106
12107 2004-10-21    <vargaz@freemail.hu>
12108
12109         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12110
12111         * mini.h: Bump AOT version number.
12112
12113         * objects.cs: Add another test for unbox trampolines.
12114
12115         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12116         valuetype methods.
12117
12118 2004-10-20    <vargaz@freemail.hu>
12119
12120         * driver.c: Add SHARED to the set of optimizations tested.
12121
12122         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12123
12124         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12125         used by CEE_NEWARR.
12126
12127         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12128
12129 2004-10-20  Martin Baulig  <martin@ximian.com>
12130
12131         * mini-exceptions.c (mono_handle_exception): Call
12132         mono_debugger_handle_exception() to tell the debugger about
12133         catch/finally clauses.
12134
12135 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12136
12137         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12138
12139         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12140         #68447.
12141
12142 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12143
12144         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12145         methods as their native size, fixed bug #57543, #57545.
12146         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12147         This saves a temporary register and mullw call down into 1 (minor perf
12148         increase for cases like sum = sum * 5;  This use to translate into:
12149             li r11,5
12150             mullw r28,r28,r11
12151         It now translates to
12152             mulli r28,r28,5
12153
12154 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12155
12156         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12157         #68388.
12158
12159 2004-10-11  Martin Baulig  <martin@ximian.com>
12160
12161         * mini.c (mono_method_to_ir): If we're a generic method, get the
12162         MonoGenericContainer from our MonoMethodNormal and create a
12163         MonoGenericContext from it.
12164
12165 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12166
12167         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12168
12169         * basic-long.cs: Add test for checked i8->i2 cast.
12170
12171 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12172
12173         * inssel-ppc.brg: added a couple of speedup rules.
12174
12175 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12176
12177         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12178         to speed up rebuilds.
12179
12180 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12181
12182         * mini-s390.c: Minor fix to OP_OR_IMM.
12183
12184 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12185
12186         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12187         better. Fixes appdomain-unload.exe on sparc.
12188
12189 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12190
12191         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12192         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12193         see bug 67324.
12194
12195 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12196
12197         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12198
12199 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12200
12201         * mini.c: Always generate a field read/write wrapper for members
12202         of the class MarshalByRefObject since the actual instance could
12203         be a CBO.
12204
12205 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12206
12207         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12208
12209 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12210
12211         * driver.c mini.h trace.c: Move the setting of the main assembly into
12212         a separate function called mono_trace_set_assembly () and call it after
12213         actually loading the main assembly. Fixes #66872.
12214
12215 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12216
12217         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12218         using the code manager.
12219
12220 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12223
12224 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12225
12226         * cpu-amd64.md: Fix bug in previous patch.
12227         
12228         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12229         #66650.
12230
12231 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12232
12233         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12234         mini-exceptions.c: updates for changed stack walk interface.
12235
12236 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12237
12238         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12239
12240 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12241
12242         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12243
12244 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12245
12246         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12247         since assemblies can't be unloaded.
12248         
12249 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12250
12251         * cpu-amd64.md: Fix more instruction lengths.
12252
12253         * cpu-amd64.md: Fix lengths of some instructions.
12254
12255 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12256
12257         * inssel.brg: Make the array ldelema check aot friendly.
12258
12259 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12260
12261         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12262
12263         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12264
12265 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12266
12267         * mini-x86.c: Fix build.
12268
12269         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12270         mono_type_get_underlying_type () helper function to simplify code.
12271         
12272 2004-09-09  Martin Baulig  <martin@ximian.com>
12273
12274         * mini-amd64.c: Don't access `type->data.klass' directly, call
12275         mono_class_from_mono_type() instead since the type may be a
12276         generic instance.
12277
12278 2004-09-09  Martin Baulig  <martin@ximian.com>
12279
12280         * mini-amd64.c (get_call_info): Fix support for generic instances.
12281         (add_valuetype): Use mono_class_from_mono_type() to get the class
12282         since we can be a generic instance.
12283
12284 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12285
12286         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12287
12288 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12289
12290         * liveness.c: reset spill costs on each scan: bug 62107
12291
12292 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12293
12294         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12295         unnecessary line that doesn't compile
12296
12297 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12298
12299         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12300         trampolines, make them call an error function so people can fix their
12301         code.
12302
12303 2004-09-06  Martin Baulig  <martin@ximian.com>
12304
12305         * mini.c (mono_method_to_ir): When initializing locals, handle a
12306         generic instances like a valuetype if it's a valuetype and like a
12307         class if it's a class.
12308
12309 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12310
12311         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12312         stack. Fixes #64674.
12313
12314         * exceptions.cs: Add test for unwinding of call arguments.
12315
12316 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12317
12318         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12319         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12320         set the carry/borrow flag). The sparc and s390 implementations
12321         can now use optimized versions (and simplify the code). ppc bugfixes.
12322
12323 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12324
12325         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12326
12327 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12328
12329         * inssel-amd64.brg: Remove leftover 32 bit rule.
12330
12331         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12332
12333 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12334
12335         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12336         mono_arch_find_jit_info functions into a new function. Fix a memory
12337         leak.
12338
12339         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12340         refactored code.
12341         
12342 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12343
12344         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12345         as well.
12346         
12347         * exceptions.cs: Add array size tests.
12348
12349         * mini.c: Allocate a separate icall wrapper for each arity of 
12350         mono_array_new_va. Fixes #59509.
12351
12352         * exceptions.cs: Add testcase for 64578.
12353
12354         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12355
12356         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12357         
12358 2004-09-02  Martin Baulig  <martin@ximian.com>
12359
12360         * mini.c (mono_method_to_ir): When initializing the locals, call
12361         handle_initobj() on the generic instance itself, not its
12362         underlying type.
12363
12364 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12365
12366         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12367         MonoJitInfo for dynamic methods.
12368
12369         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12370
12371         * mini.c: Add support for freeing JIT data for dynamic methods.
12372         
12373 2004-09-01  Martin Baulig  <martin@ximian.com>
12374
12375         * mini-x86.c (is_regsize_var): Added support for generic
12376         instances.
12377         (mono_arch_emit_prolog): Make this compile again, use
12378         `x86_push_imm_template (code)'.
12379
12380 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12381
12382         * mini-x86.c: make all push_imm instructions that get
12383         patched always emit the long form
12384
12385 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12386
12387         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12388         in a per-domain hash.
12389
12390         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12391         types.
12392
12393 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12394
12395         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12396         work.
12397         
12398         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12399         work.
12400
12401         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12402         Beginnings of SSE2 support.
12403
12404         * exceptions.cs: Add more tests for checked int<->uint casts.
12405
12406 2004-08-28  Martin Baulig  <martin@ximian.com>
12407
12408         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12409         generic instances.
12410
12411         * mini.c
12412         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12413         Handle generic instances recursively.
12414
12415 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12416
12417         * iltests.il: test for conv.u8 on a constant
12418
12419 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12420
12421         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12422         LCONV_x4 (shrun_32 (membase)).
12423
12424 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12425
12426         * inssel-x86.brg: c&p rules for push/setret of long
12427
12428 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12429
12430         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12431         compare (regvar, base)
12432
12433         * inssel-x86.brg: more burg love
12434
12435         * inssel.brg: more cleanup
12436
12437         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12438
12439 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12440
12441         * basic-long.cs, basic-calls.cs: new tests for optimization.
12442
12443 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12444
12445         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12446         patch.
12447
12448 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12449
12450         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12451         
12452 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12453
12454         * inssel.brg (mini_emit_memcpy): use 
12455         NO_UNALIGNED_ACCESS to disable memcpy optimization
12456
12457 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12458
12459         * mini-amd64.c: Handle generic types in various places.
12460
12461         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12462
12463 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12464
12465         * mini.c (handle_box): Fix warning.
12466
12467         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12468
12469         * mini-amd64.h: Enable the emit_state optimization.
12470
12471         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12472
12473         * mini-amd64.c: Add some new 64 bit peephole opts.
12474
12475         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12476
12477         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12478
12479         * mini-amd64.c: Register allocator fixes.
12480
12481         * mini.c: Add an optimization to emit_state to avoid allocation of new
12482         registers on some platforms.
12483
12484 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12485
12486         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12487
12488         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12489         allocation. Fixes #63085.
12490
12491         * basic-long.cs: Add new regression test.
12492
12493         * mini-amd64.c: Register allocator improvements.
12494
12495 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12496
12497         * mini-amd64.c (read_tls_offset_from_method): Add another code
12498         sequence.
12499
12500         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12501         instruction sequence for nullifying class init trampolines.
12502
12503         * objects.cs: Add new regalloc test.
12504
12505         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12506
12507 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12508
12509         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12510         
12511         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12512         arguments.
12513
12514         * driver.c: Fix profiling after TLS changes.
12515         
12516         * driver.c (mono_main): Set mono_stats.enabled if needed.
12517
12518         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12519         CEE_BOX.
12520
12521 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12522
12523         * mini-x86.c: use a 1 op rather than a 2 op tls access
12524         instruction -> faster.
12525
12526 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12527
12528         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12529         x86 backend.
12530
12531 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12532
12533         * exceptions-sparc.c (throw_exception): fix typo
12534
12535 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12536
12537         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12538         set tree->dreg correctly with tls. Allow any
12539         register to be used.
12540
12541         * mini-x86.c (read_tls_offset_from_method): add new code
12542         generation pattern seen with GCC.
12543
12544
12545 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12546
12547         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12548         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12549         exceptions-sparc.c: fix some performance issues in exception
12550         handling and setting of the stack trace for exceptions that were
12551         already thrown.
12552
12553 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12554
12555         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12556         x86 backend.
12557         
12558         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12559         registers.
12560
12561 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12562
12563         This patch inlines tls access, when possible.
12564         
12565         * mini.h: new arch functions for TLS intrinsics.
12566         All platforms updated with a stub.
12567
12568         * mini.c: use the new intrinsics
12569
12570         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12571         arch specific intrinsic for tls variables
12572
12573 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12574
12575         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12576         under windows.
12577
12578 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12579
12580         * mini.c: thread local allocation
12581
12582 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12585
12586         * Makefile.am: Link against the static version of libmonogc.
12587         
12588         * Makefile.am: Link the static versions of the convenience libraries
12589         into the mono executable.
12590
12591         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12592
12593 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12594
12595         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12596         on integer overflow.
12597
12598         * mini-amd64.c: Reorganize function call code.
12599
12600         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12601
12602 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12603
12604         * inssel-x86.brg: use xor eax,eax.
12605         
12606         * basic.cs: new tests
12607
12608 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12609
12610         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12611         in exception throwing code.
12612         
12613 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12614
12615         * inssel-x86.brg: use xor esi,esi.
12616
12617 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12618
12619         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12620         can trace methods compiled during mini_init () too.
12621
12622         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12623         CEE_CONV_U4.
12624
12625 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12626
12627         * Makefile.am: static link on x86 (r=zoltan)
12628
12629 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12630
12631         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12632         code since it causes some programs to fail.
12633
12634 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12637
12638 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12639
12640         * mini.c: ovfops_op_map - add STACK_OBJ case for
12641         CONV_I 
12642         * basic.cs: add test_0_pin_string as test
12643         case for above.
12644
12645 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12646
12647         * Makefile.am: build C# if srcdir != builddir
12648
12649 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12650
12651         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12652         fall-through blocks.
12653
12654 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12655
12656         * driver.c: enable loop by default again and include abcrem in -O=all.
12657
12658 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12659
12660         * iltests.il: Add some localloc tests.
12661
12662         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12663
12664         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12665         Fixes #62574.
12666
12667         * inssel-amd64.brg: Add some optimizations.
12668
12669         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12670         for gcc-3.4.
12671
12672         * Makefile.am: Statically link mono against libmono on AMD64.
12673         
12674         * mini-amd64.c inssel-amd64.brg: Optimizations.
12675
12676 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12677
12678         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12679
12680         * tramp-amd64.c: Patch calling code in trampolines.
12681
12682 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12683
12684         * mini-amd64.c: pinvoke struct passing fixes.
12685
12686 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12687
12688         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12689         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12690
12691 2004-08-05  Duncan Mak  <duncan@ximian.com>
12692
12693         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12694         CEE_LDELEM_ANY.
12695
12696 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12697
12698         * mini-amd64.c (emit_move_return_value): Move return value for normal
12699         calls too.
12700
12701 2004-08-05  Martin Baulig  <martin@ximian.com>
12702
12703         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12704         `type->type'; just modify `type' itself when dealing with enums
12705         and generic instances.
12706         (check_call_signature): Make `simple_type' a `MonoType *'.
12707
12708 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12709
12710         * mini.c: Use OP_PADD to add offsets to addresses.
12711
12712         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12713
12714 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12715
12716         * mini-sparc.c (mono_arch_emit_epilog): fix check
12717         for folding last op into restore instruction
12718
12719 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12720
12721         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12722         helper methods using the code manager.
12723         
12724         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12725
12726         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12727
12728 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12729         
12730         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12731           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12732
12733         * mini-s390.c: fix tail processing
12734
12735 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12736
12737         * mini-ppc.c: mul.ovf.un exception name fix.
12738
12739 2004-08-03  Martin Baulig  <martin@ximian.com>
12740
12741         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12742         instances; before jumping to `handle_enum', also modify `ptype'.
12743
12744 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12745
12746         * cpu-sparc.md: fcall maximal length too small.
12747
12748 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12749
12750         * mini-amd64.c mini.h: Add initial support for passing/returning 
12751         structures to/from pinvoked methods.
12752
12753 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12754
12755         * mini-ppc.c: reg allocator fix.
12756
12757 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12758
12759         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12760
12761         * inssel.brg: Optimize memset on 64 bit machines.
12762
12763         * mini-amd64.c: Fix some vararg cases.
12764
12765 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12766
12767         * mini-s390.c: Corrected macro in emit_float_to_int
12768
12769         * s390-abi.cs: Tests to exercise the s390 ABI
12770
12771 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12772
12773         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12774         caller saved regs.
12775
12776         * basic.cs: Add a test for add.ovf.un.
12777
12778 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12779
12780         * mini-sparc.c: add case for OP_IDIV_UN
12781
12782 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12785         
12786         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12787
12788 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12789
12790         * basic.cs: regression tests.
12791
12792         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12793         regressions.
12794
12795 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12796
12797         * basic.cs: Add a new test.
12798
12799         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12800         and AOT. Various fixes and optimizations.
12801
12802         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12803
12804 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12805
12806         * mini-ppc.c: make sure temp regs are not used for global reg
12807         allocation.
12808
12809 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12810
12811         * cpu-sparc.md: conv_i8 fix for 64bits
12812
12813         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12814
12815 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12816         
12817         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12818         add opcode for cmp BYTE PTR [eax], imm.
12819
12820         * inssel.brg: Make memcpy and memset takes bases.
12821
12822 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12823
12824         * *-amd64.*: More AMD64 work.
12825         
12826 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12827
12828         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12829         add a compare-not-equal opcode.
12830         
12831 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12832
12833         * mini.c: Use mono_init_from_assembly instead of mono_init.
12834         
12835 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12836
12837         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12838
12839         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12840
12841         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12842
12843         * inssel.brg: 64 bit fixes.
12844
12845         * mini.h (MonoCallInst): Add some AMD64 specific data.
12846
12847         * mini.h: Add some OP_P opcodes.
12848
12849 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12850
12851         * basic.cs: tests for 61797 and 61740
12852
12853 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12854
12855         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12856         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12857
12858 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12859
12860         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12861
12862         * *-amd64*.*: Ongoing AMD64 work.
12863
12864 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12865
12866         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12867
12868         * *-amd64*: Ongoing AMD64 work.
12869
12870         * mini-arch.h: Add AMD64 support.
12871
12872         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12873
12874         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12875
12876         * mini-ops.h: Add new opcodes.
12877
12878         * Makefile.am: Add AMD64 support.
12879
12880         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12881         rules into the inssel-long*.brg files.
12882
12883         * *-amd64.*: Add beginnings of AMD64 backend.
12884
12885 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12886
12887         * mini.c (print_dfn): commenting out the code that prints
12888         the cil. With -O=deadce, this makes -v -v crash.
12889         
12890         * cpu-pentium.md: make checkthis have a length of 2
12891
12892 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12893
12894         * mini-sparc.h: fix implementations of __builtin
12895         functions for Sun compiler for V9.
12896
12897 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12898
12899         * mini.c: use the new stelem.ref wrapper
12900         * exceptions.cs, arrays.cs: new stelem.ref tests
12901
12902 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12903
12904         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12905         new XSP should work with these changes).
12906
12907 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12908         
12909         * inssel-{long32,x86,}.brg: trivial optimizations.
12910         
12911 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12912
12913         * mini.c: load value when emitting box operation in
12914         constrained calls.
12915
12916 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12917
12918         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12919         is one byte shorter than cmp DWORD PTR [eax], 0.
12920
12921 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12922
12923         * inssel-ppc.brg: arguments on the stack are always
12924         relative to the stack pointer (spotted by Neale Ferguson).
12925
12926 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12927
12928         * exceptions-x86.c: delay appending the method name to the trace until
12929         after mono_jit_info_table_find is called, as this gets the real
12930         MonoMethod.
12931
12932 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12933
12934         * aot.c: register roots
12935
12936 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12937
12938         * aot.c : I could just use PLATFORM_WIN32 flag.
12939
12940 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12941
12942         * aot.c : Reverting the previous fix. This time it broke linux build.
12943
12944 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12945
12946         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12947
12948 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12949
12950         * mini.c (handle_stack_args): Remove some more debugging code.
12951         
12952         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12953
12954         * driver.c mini.h aot.c: Allow additional options to be specified with
12955         --aot and pass them to mono_compile_assembly.
12956
12957         * aot.c: Add experimental code to AOT compile all loaded assemblies
12958         on demand and save the code into a cache in the filesystem.
12959
12960         * aot.c: Add support for more wrapper methods.
12961         
12962         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12963         58863.
12964
12965         * cpu-*.md: Remove removed opcodes.
12966
12967         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12968         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12969         related icalls to marshal.c.
12970
12971 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12972
12973         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12974
12975         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12976
12977         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12978
12979 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12980         * liveness.c: If liveness is recomputated we need to reset the information
12981         for each variable. This way, if the liveness range has been narrowed
12982         by optimizations that happened after the last computation, we can return
12983         a smaller range.
12984         
12985         For example, if you have
12986         
12987         {
12988                 int i = 0;
12989                 
12990                 // Tons of code that does not affect i
12991                 
12992                 i = foo ();
12993                 ...
12994         }
12995         
12996         i = 0 is dead code and will be removed by SSA. However, when
12997         linear scan gets to the code, i will still appear to be live
12998         throughout the entire block. This prevents good register allocation.
12999
13000 2004-07-06  Martin Baulig  <martin@ximian.com>
13001
13002         * debug-mini.c (mono_debug_init_method): Allow
13003         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13004         (mono_debug_add_icall_wrapper): New method.
13005
13006         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13007
13008 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13009
13010         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13011         optimization.
13012
13013 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * aot.c (mono_aot_load_method): Fix loading of debug info.
13016
13017 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13018
13019         * aot.c: Add logging support.
13020
13021 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13022
13023         * mini.h: Add prototype for mono_print_method_from_ip.
13024
13025         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13026
13027         * inssel.brg: 64 bit fixes.
13028
13029         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13030         inssel-long32.brg.
13031
13032         * Makefile.am: Add SPARC64 support.
13033
13034 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * aot.c: Fix alignment problems on 32 bit platforms.
13037
13038 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13039
13040         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13041         SPARC64.
13042
13043         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13044         problems.
13045
13046         * mini.h: Bump AOT file version. Some 64 bit fixes.
13047
13048 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13049
13050         * inssel-sparc.brg: Add new rule to avoid register moves.
13051
13052         * inssel.brg: Add ldind_to_load_membase helper function.
13053
13054 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13055
13056         * mini.c: OffsetToStringData intrinsic.
13057         
13058 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13059
13060         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13061
13062         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13063         regression tests.
13064
13065         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13066 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13067
13068         * mini.c: reinstated mono_compile_get_interface_var()
13069         on x86, too, since the change breaks the Gtk# build there as well.
13070
13071 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13072
13073         * driver.c: remove loop from the default optimizations: it seems to
13074         interact badly with some of the other options (see bug #60613).
13075
13076 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13077
13078         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13079         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13080
13081 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13082
13083         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13084         vararg-using methods.
13085
13086 2004-06-21  Martin Baulig  <martin@ximian.com>
13087
13088         * mini/mini-exceptions.c
13089         (mono_handle_exception): Added `gpointer original_ip' argument.
13090         After calling mono_unhandled_exception(), call
13091         mono_debugger_unhandled_exception() and if that returns true,
13092         restore the context and return.
13093
13094 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13095
13096         * mini-ppc.c: prefer the use of relative branches so
13097         they won't need to be patched in aot code (patch from Patrick Beard).
13098
13099 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13100
13101         * aot.c: patch from Patrick Beard to make the output assembly
13102         more correct for the MacOSX assembler. Small tweak to
13103         generate sane images on Linux/PPC, too.
13104
13105 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13106
13107         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13108         case until bug #59509 is fixed (shows up in #60332).
13109
13110 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13111
13112         * mini.c: make sure the needed wrappers are compiled, too, with
13113         precomp.
13114
13115 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13116
13117         * driver.c: remove NPTL reference in --version output.
13118
13119 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13120
13121         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13122         generate valid assembly for the Mach-O assembler.
13123
13124 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13125
13126         * driver.c: don't include abcrem in the all optimization specifier
13127         since it slows down jit compilation too much for now.
13128
13129 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13130
13131         * mini.c: use BIGMUL only if both operands have the same signage.
13132         * iltests.il: Test for bug 60056. (errors related to signage in
13133         BIGMUL).
13134
13135         r=lupus.
13136
13137 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13138
13139         * mini.c, aot.c: memory leak fixes.
13140
13141 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13142
13143         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13144
13145 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13146
13147         * Makefile.am: remove the -static hack completely, it links in
13148         statically glib as well.
13149
13150 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13151
13152         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13153         * exceptions.cs: make it compile with new mcs/csc.
13154
13155 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13156         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13157         and added relevant test case.
13158
13159 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13160
13161         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13162         regressions in gtk-sharp.
13163
13164 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13165
13166         * exceptions.cs: New regression tests.
13167
13168         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13169
13170 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13171
13172         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13173
13174 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13175
13176         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13177
13178         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13179
13180 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13181
13182         * mini.c (mono_jit_runtime_invoke): Init class in this
13183         method instead of trusting mono_jit_compile_method to
13184         do the work (because wrappers can be in object class)
13185
13186 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13187
13188         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13189
13190         * basic-long.cs: New regression test.
13191
13192 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13193
13194         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13195         and div/rem checks.
13196
13197 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13198
13199         * Makefile.am: fix miguel's change to build mono statically against
13200         libmono (track build dependencies).
13201
13202 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13203
13204         * cfold.c: Some glib versions do not have G_MININT32.
13205
13206 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13207
13208         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13209         with precision of tan, atan, sin and cos, and implemented related
13210         regressions tests (fixes bug 54467, but one new problem appeared and
13211         is not fixed yet).
13212
13213 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13214
13215         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13216
13217         * exceptions.cs: Add test for constant folding && division by zero.
13218
13219         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13220         since driver.c is in libmono too, so the optimization was useless.
13221
13222         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13223         variable to driver.c so the compiler can emit more efficient code to
13224         access them.
13225
13226 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13227
13228         * Makefile.am: don't distribute generated inssel.[ch] files.
13229
13230 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13231
13232         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13233         into the default appdomain. Fixes #58707.
13234
13235         * jit-icalls.c: Remove the broken approximation for truncl, doing
13236         no conversion is better.
13237
13238         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13239         Fixes #58863.
13240
13241 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13242
13243         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13244         of the mcrxr instruction which is not available on some processors
13245         even if it's documented to be. Implement add and sub overflow correctly
13246         (still not complete for long unsigned). Speed up icalls a bit.
13247
13248 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13249
13250         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13251         we run .cctor in the current domain instead of target_domain.
13252         
13253         Fixes bug #58558, .cctor not being called in -O=shared.
13254
13255 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13256
13257         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13258
13259 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13260
13261         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13262         which can be done with an imm8, do it that way.
13263         (mono_arch_output_basic_block): ditto for a jmp
13264         (mono_arch_emit_prolog): Computate maximum offset of a label.
13265
13266 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13267
13268         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13269         now tries to allocate prefered physical reg's for virtual
13270         regs. This reduces the number of emited spills/loads with
13271         20-30% on our core assemblies.
13272
13273 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13274
13275         * jit-icalls.c: truncl() is not needed and trunc() is
13276         the correct thing to do anyway (bug #58287).
13277
13278 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13279
13280         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13281         if available.
13282
13283 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13284
13285         * driver.c: enable loop optimizations by default.
13286
13287 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13288
13289         * mini-x86.c: fix calc of max loop size when aligning loops start.
13290
13291 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13292
13293         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13294         the stack.
13295
13296 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13297
13298         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13299         should set carry.
13300
13301         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13302
13303         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13304         
13305         * mini.c (inline_method): Allways inline some wrappers even if the cost
13306         is too large. Fixes #58785.
13307
13308         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13309         
13310 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13311
13312         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13313         (crichton@gimp.org). Beginning of support for sparc/linux.
13314
13315         * mini-sparc.c: Optimize retrieval of LMF address.
13316
13317 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13318
13319         * exceptions-ppc.c:  handle alloca in methods with clauses.
13320
13321 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13322
13323         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13324
13325 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13326
13327         * mini.c: Delegate most of the abort signal work to 
13328           mono_thread_request_interruption, which also handles Stop and Suspend
13329           states.
13330
13331 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13332
13333         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13334         supports the save/restore lmf opcodes.
13335
13336 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13337
13338         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13339         by gcc-3.4 as well.
13340
13341         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13342
13343 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13344
13345         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13346         methods which contain array accesses.
13347
13348         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13349         boundaries. Fixes #58537.
13350
13351         * iltests.il: Add regression test for #58537.
13352
13353 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13354
13355         * mini-x86.c (mono_arch_local_regalloc): Last part of
13356         fix for bug #58633 (releasing register to early).
13357
13358 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13359
13360         * basic-long.cs: Add new regression test.
13361
13362 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13363
13364         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13365         register too early on the chain.
13366
13367 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13368
13369         * mini.c (create_helper_signature): Use a helper function to reduce
13370         the code which needs to be written. Also set the calling convention of
13371         icalls on windows. Fixes #57840.
13372
13373 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13374
13375         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13376         exceptions-ppc.c: added helper function to get the instruction address
13377         from a signal handler context.
13378
13379 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13380
13381         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13382         from gonzalo.
13383
13384 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13385
13386         * helpers.c: Add new env variable to pass args to objdump.
13387         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13388
13389 2004-05-17  Radek Doulik  <rodo@ximian.com>
13390
13391         * Makefile.am (common_sources): added abcremoval.h so it get
13392         disted and daily mono packages on go-mono.com will build again
13393
13394 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13395
13396         * abcremoval.c: Fixed coding style, added copyright header.
13397
13398         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13399
13400         * mini.h: Added prototype for abc removal main function.
13401
13402         * build_relations_propagation_table.pl: Added copyright header.
13403
13404 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13405
13406         * basic-long.cs: reg test for complex ceq_long bug.
13407
13408 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13409
13410         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13411         reg in long and clob case (bug #58343). Fixed/added comments.
13412
13413 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13414
13415         * mini.c (mono_jit_runtime_invoke): Follow new convention
13416         of calling the invoke method with an function pointer.
13417
13418 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13419
13420         * ChangeLog: Fix author of memory leak patch.
13421
13422 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13423
13424         * Makefile.am: fix make dist as well...
13425
13426
13427 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13428
13429         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13430         on archs where pointers are 4 bytes long.
13431
13432         * Makefile.am: Added abcremoval.c source file.
13433
13434         * abcremoval.c: Added abcremoval.c.
13435
13436         * abcremoval.h: Added abcremoval.h.
13437
13438         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13439
13440         * inssel.brg: Enabled bounds check removal.
13441
13442         * mini.c: Added support for abcrem optimization.
13443
13444         * mini.h: Added abcrem optimization label.
13445
13446         * driver.c: Added support for abcrem optimization.
13447
13448         * propagated_relations_table.def: Added propagated_relations_table.def.
13449
13450 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13451
13452         * mini.c, cfold.c: fix style.
13453
13454 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13455
13456         * mini.c: handle issue with the low-level implementation of
13457         some long opcodes (bug #54209).
13458
13459 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13460
13461         * basic.cs: test for my new cmov stuff.
13462
13463 2004-05-13      Patrik Torstensson
13464
13465         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13466         opt and added peephole documentation.
13467
13468 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13469
13470         * tramp-ppc.c: rewrote the generic trampoline code.
13471
13472 2004-05-11      Patrik Torstensson
13473
13474         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13475
13476 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13477
13478         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13479
13480         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13481         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13482
13483         * mini.c: Add new icalls for AsAny marshalling.
13484
13485 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13486
13487         * tramp-ppc.c, mini-ppc.c: more cleanups.
13488
13489 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13490
13491         * mini.c: no warnings.
13492
13493 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13494
13495         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13496
13497 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13498
13499         * mini.c: In the thread abort signal handler, if the thread is in the
13500         process of being stoped, don't throw the Abort exception, just stop the
13501         thread.
13502
13503 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13504
13505         * tramp-ppc.c: removed old code.
13506
13507 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13508
13509         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13510         do some simple speed optimizations on ppc.
13511
13512 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13513
13514         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13515         and large offsets in load/store.
13516
13517 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13518
13519         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13520         it causes regressions.
13521
13522 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13523
13524         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13525         support.
13526
13527 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13528
13529         * jit-icalls.c: remove warnings.
13530         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13531         speedups for unsafe code.
13532
13533 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13534
13535         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13536
13537 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13538
13539         * basic-calls.cs: Add new regression test.
13540
13541         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13542         more portable.
13543
13544         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13545
13546         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13547         is no longer used.
13548
13549 2004-05-06      Patrik Torstensson
13550
13551         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13552         long reg allocation in any reg (not only eax:edx) and implemented 
13553         long shl/shr ops in asm instead of helpers.
13554
13555 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13556
13557         * mini-sparc.h: Fix warnings.
13558
13559         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13560         stack.
13561
13562         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13563         separate statement for clarity.
13564
13565         * mini-sparc.c: Update status.
13566
13567 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13568
13569         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13570         here.
13571
13572 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13573
13574         * inssel-ppc.brg: another small pre-release workaround:
13575         we don't do overflow detection for long_sub_un.
13576
13577 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13578
13579         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13580         (also works around a weird ppc bug: 57957).
13581
13582 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13583
13584         * tramp-ppc.c: trampoline fixes.
13585
13586 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13587
13588         * mini-ppc.c: fixed typos.
13589
13590 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13591
13592         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13593         at the top of the stack. Fixed typos. Use a frame registers
13594         for all the methods with exception clauses.
13595
13596 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13597
13598         * exceptions-ppc.c: restore fp registers.
13599
13600 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13601
13602         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13603         order from the stack top (moved the stack room to save the
13604         return value for trace after the param area). Fixed corruption
13605         in restoring registers on unwind.
13606
13607 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13608
13609         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13610
13611 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13612
13613         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13614         and prolog/epilog for methods that use it. Allow
13615         enough param area room for varargs methods. Fix miguel's
13616         breakage in exception handling.
13617
13618 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13619
13620         * Makefile.am: run genmdesc only on current arch.
13621
13622 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13623
13624         * exceptions-x86.c:
13625         * mini-x86.h: fix the build on windows.
13626
13627 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13628
13629         * 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.
13630
13631         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13632
13633         * mini-exceptions.c: New file.
13634         
13635         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13636         Move some parts of the x86 exception handling code to an 
13637         arch-independent file so it can be shared with other ports.
13638
13639 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13640
13641         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13642
13643 2004-04-26  David Waite  <mass@akuma.org>
13644
13645         * driver.c: remove comma from end of enumeration declaration
13646
13647 2004-04-26  Jackson Harper  <jackson@ximian.com>
13648
13649         * driver.c: parse config file before loading first assembly. This
13650         allows the user gac to be enabled/disabled. 
13651         
13652 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13653
13654         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13655         simpler mechanism: we do not care what is encoded initially
13656         (branch absolute or relative), we care about the code and its
13657         target.  I kept the old code for reference for now.
13658
13659         The new code tries first to determine if the jump is anywhere in
13660         the -/+32 absolute meg range, if it succeeds, it encodes using the
13661         absolute branch;  If not, it tried to find something in the
13662         relative range, if not, it uses the handle_thunk code. 
13663
13664 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13665
13666         * exceptions-ppc.c: use the correct ip register on macosx.
13667
13668 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13669
13670         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13671
13672 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13673
13674         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13675         Raise exception on integer divide by zero by hand since the hw
13676         doesn't support it. Handle NaNs in FP compares.
13677
13678 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13679
13680         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13681         code reducing duplication between the platforms and enabled
13682         signal exception handling (on linux for now).
13683
13684 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13685
13686         * exceptions-ppc.c: more macosx support.
13687
13688 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13689
13690         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13691
13692 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13693
13694         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13695
13696 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13697
13698         * iltests.il: more tests.
13699
13700 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13701
13702         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13703         vars as well.
13704
13705 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13706
13707         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13708
13709 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13710
13711         * liveness.c: Mark variables as volatile in all basic blocks reachable
13712         from exception clauses.
13713
13714 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13715
13716         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13717         inlining.
13718
13719 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13720
13721         * iltests.il, basic.cs: more tests for regalloc.
13722
13723 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13724
13725         * iltests.il: Some tests for register allocation modifications
13726         I have locally.
13727
13728 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13729
13730         * exceptions.cs: Add regression test for bug #56782.
13731
13732         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13733         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13734         the beauty of fixing the same thing in 5 different files...
13735
13736 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13737
13738         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13739         methods.
13740
13741 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13742
13743         * mini.c: Add support for STRWLPARRAY marshalling convention.
13744
13745 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13746
13747         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13748         to init the context to setup the regs pointer).
13749
13750 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13751
13752         * exceptions-ppc.c: more exceptions work.
13753
13754 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13755
13756         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13757         not allowed.
13758
13759 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13760
13761         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13762         can use the memory directly.
13763
13764         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13765
13766         add x86_add_membase, x86_sub_membase, x86_mul_membase
13767
13768 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13769
13770         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13771         GENERAL_REGS they were also hardcoded for all PPC ports.
13772
13773         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13774
13775         Remove hard-coded limit for floating point registers, use
13776         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13777
13778         Notice that in MacOS X calling conventions you can fit a lot more
13779         floating point values in registers, so I should update the PInvoke
13780         test to excercise the passing of floating point values on the
13781         stack (currently broken).
13782         
13783 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13784
13785         * tramp-ppc.c (create_trampoline_code): Added
13786         JUMP_TRAMPOLINE_SIZE. 
13787         (ppc_magic_trampoline): Follow the pattern from
13788         x86_magic_trampoline: if code is set to zero, return. 
13789         (create_trampoline_code): Always pass MonoMethod to the jump
13790         trampoline, before it was passing a null.
13791         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13792         share the code with mono_arch_create_jit_trampoline. 
13793
13794         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13795         implemented.
13796         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13797         implemented.  
13798
13799         * cpu-g4.md: Added length for jmp instruction, the worst case
13800         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13801         for save_lmf).
13802
13803 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13804
13805         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13806
13807 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13808
13809         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13810         before each IL instruction.
13811
13812         * mini.c (CEE_BOX): Fix warnings.
13813
13814 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13815
13816         * mini.c: removed a few unused vars and extra whitespace.
13817
13818 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13819
13820         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13821         checks.
13822         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13823         index.
13824         (OP_GETCHR): use the above
13825         (CEE_LDELEMA): use the above.
13826
13827         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13828         version of the generic impl.
13829         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13830         (CEE_LDELEMA): use the above.
13831
13832 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13833
13834         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13835         Fixes #56317.
13836
13837         * iltests.il: Added new regression test for #56317.
13838
13839 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13840
13841         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13842         under NetBSD. Fixes #56450.
13843
13844         * liveness.c (update_gen_kill_set): Fix previous patch.
13845
13846 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13847
13848         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13849
13850 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13851
13852         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13853         ldsfld and ldsflda.
13854
13855         * inssel-sparc.brg: Add more optimizations.
13856
13857         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13858
13859 2004-04-01  Martin Baulig  <martin@ximian.com>
13860
13861         * mini.c (handle_box): New static function; moved the
13862         implementation of CEE_BOX here.
13863         (mono_method_to_ir): Added `constrained_call' variable.
13864         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13865         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13866         mono_method_get_constrained() to get the method.
13867
13868 2004-04-01  Martin Baulig  <martin@ximian.com>
13869
13870         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13871         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13872         (mono_method_to_ir): We don't need these macros anymore since
13873         mono_class_get_full() already takes care of it. 
13874
13875 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13876
13877         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13878         use @function (as doesn't accept #function here) and check the return
13879         value of system and stop if fails.
13880
13881 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13882
13883         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13884
13885 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13886
13887         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13888
13889         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13890
13891         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13892         #56223.
13893
13894         * basic-long.cs: Add test for negation of Int64.MinValue.
13895
13896 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13897
13898         * mini-sparc.c: Update status.
13899
13900         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13901
13902         * exceptions-sparc.c: Fix return value in filters.
13903
13904         * inssel-sparc.brg: Fix register allocation in some rules.
13905
13906 2004-03-28  Martin Baulig  <martin@ximian.com>
13907
13908         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13909         if neccessary.  
13910
13911 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13912
13913         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13914         
13915         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13916         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13917         remove unused conv_u4 opcode.
13918
13919         * mini-x86.c: Remove valgrind workaround since it slows down things
13920         even when mono is not run under valgrind.
13921
13922 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13923
13924         * mini-sparc.c: Update status.
13925
13926         * inssel-sparc.brg: Add some optimizations.
13927
13928         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13929         future delay slot filling. Add support for varargs, tail calls and JMP.
13930
13931         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13932         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13933
13934         * inssel.brg: Fix register allocation in OP_ARGLIST.
13935
13936         * inssel.brg: Fix warnings.
13937
13938 2004-03-25  Martin Baulig  <martin@ximian.com>
13939
13940         * mini.c (inflate_generic_field): Removed.
13941         (mini_get_method): Removed, use mono_get_method_full(),
13942         (mini_get_class): Removed, use mono_class_get_full().
13943         (mono_method_to_ir): Pass our generic context to
13944         mono_field_from_token().        
13945
13946 2004-03-25  Martin Baulig  <martin@ximian.com>
13947
13948         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13949         of a `MonoMethod *'.
13950         (mini_get_method): Take a `MonoGenericContext *' instead
13951         of a `MonoMethod *'.
13952         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13953         a new local variable called `generic_context' which holds the
13954         current `MonoGenericContext *'; use it to lookup things.
13955
13956 2004-03-24  Martin Baulig  <martin@ximian.com>
13957
13958         * mini.c (mini_get_class): New static method; if we're inside a
13959         generic instance, inflate the class if neccessary.
13960         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13961
13962 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13963
13964         * iltests.il: New regression test for #55976.
13965
13966         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13967         #55976.
13968
13969 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13970
13971         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13972         output.
13973
13974 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13975
13976         * liveness.c: Consider SSA stores as well as loads when making vars
13977         volatile.
13978
13979         * exceptions.cs: New regression tests for register allocation.
13980         
13981 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13982
13983         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13984         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13985           domain lock only to protect puntual access to data structures.
13986           Added access lock for sighash, jit_icall_hash_name, 
13987           jit_icall_hash_addr and domain->code_mp.
13988
13989 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13990
13991         * driver.c: Print SIGSEGV handling method.
13992
13993         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13994
13995         * mini.c (setup_jit_tls_data): Handle case when this is called
13996         multiple times for a thread.
13997
13998         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13999         is different from fbxx_un. Fixes #54303. Also use constants instead of
14000         magic numbers in a lot of places.
14001
14002 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14003
14004         * exceptions.cs: Fix cctor test when --regression is used.
14005
14006 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14007
14008         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14009         for Linux/ppc.
14010
14011 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14012
14013         * inssel-ppc.brg: fixed register assignments for some rules.
14014
14015 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14016
14017         * exceptions.cs: Add test for exceptions in static constructors.
14018
14019         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14020         static constructors outside the domain lock. Fixes #55720.
14021
14022 2004-03-17  Martin Baulig  <martin@ximian.com>
14023
14024         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14025         (inflate_generic_field): Take the `MonoMethod *' instead of the
14026         `MonoClass *' and added support for generic method.
14027         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14028         have a `field->parent->gen_params', only inflate the field if it's
14029         an open constructed type.
14030
14031 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14032
14033         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14034         exception object instead of the preconstructed ones.
14035
14036 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14037
14038         * mini.c: reverted changed to sigsegv_signal_handler commited
14039         accidentally in the previous patch.
14040
14041 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14042
14043         * mini.c:
14044         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14045         running --aot with an old assembly.
14046
14047 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14048
14049         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14050         point values.
14051
14052         * mini-sparc.c: Add support for v9 branches with prediction.
14053
14054 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14055
14056         * mini.c (mini_init): #warning is GNUC only
14057
14058         * mini-sparc.h: implement __builtin_frame_address
14059         and __builtin_return_address for Sun C compiler
14060
14061 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14062
14063         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14064
14065 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14066
14067         * basic-calls.cs: Add test for unaligned byref long argument passing.
14068
14069         * mini-ops.h: Add sparcv9 compare and branch instructions.
14070
14071         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14072         v9 instructions if we have a v9 cpu.
14073
14074         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14075         registers for global allocation.
14076
14077         * exceptions-sparc.c: Fixes.
14078         
14079 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14080
14081         * liveness.c (mono_analyze_liveness): Optimized version.
14082
14083         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14084
14085         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14086         sparc work.
14087
14088         * basic-float.cs basic-calls.cs: New regression tests.
14089
14090 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14091
14092         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14093         sigaltstack implementation.
14094
14095         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14096         
14097         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14098         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14099
14100 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14101
14102         * mini.c: Fix warnings.
14103         
14104         * mini.c (mono_resolve_patch_target): New function which contains the
14105         arch independent part of the patching process.
14106
14107         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14108         patching code to a separate function.
14109
14110 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14111
14112         * mini.c (add_signal_handler): ifdef out on Windows
14113
14114 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14115
14116         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14117         cpu-sparc.md: Add exception handling support + other fixes.
14118
14119         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14120         typed GC detection in --version.
14121
14122         * basic.cs exceptions.cs: New regression tests.
14123
14124         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14125         the arch specific code can store data during a compilation.
14126
14127         * mini-ops.h: Add OP_SETFRET.
14128
14129         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14130         function, register a separate icall for each arity, so the icalls can
14131         get a wrapper.
14132         
14133         * mini.c (mono_print_tree): Print negative offsets in a more readable
14134         form.
14135         
14136         * mini.c: Make signal handling work on sparc.
14137         
14138         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14139
14140         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14141
14142         * jit-icalls.c: Emulate truncl by aintl on solaris.
14143
14144         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14145
14146 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14147
14148         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14149
14150 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14151
14152         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14153         a MarshalByRef type, inline a method that performs the check, taking into
14154         account that the object can be a proxy. Also implemented tow new opcodes:
14155         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14156         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14157         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14158
14159 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14160
14161         * mini-ppc.c: if a relative branch displacement is too big
14162         but it points to and area reachable with an absolute branch, 
14163         avoid the thunks.
14164
14165 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14166
14167         * mini.c: optimize small copies in cpblk.
14168
14169 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14170
14171         * basic-calls.cs basic-float.cs: New regression tests.
14172
14173         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14174         negative offsets from %fp. Implement localloc. Fix local register 
14175         allocation. Fix the case when the this argument needs to be saved to
14176         the stack. Implement some missing opcodes.
14177
14178 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14179
14180         * mini.c (mini_method_compile): Reenable global regalloc in methods
14181         with exception handlers.
14182
14183         * linear-scan.c (mono_varlist_sort): Fix warning.
14184
14185         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14186
14187         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14188         regalloc costs.
14189
14190         * liveness.c: Make all variables uses in exception clauses volatile, to
14191         prevent them from being allocated to registers. Fixes #42136.
14192
14193 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14194
14195         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14196         causes regressions.
14197
14198         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14199         argument to mono_arch_regalloc_cost.
14200
14201         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14202         precisely.
14203
14204 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14205
14206         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14207         Make the cost of allocating a variable to a register arch dependent.
14208
14209         * basic-calls.cs: Fix compilation of tests.
14210         
14211         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14212         helper function to cut back on the number of #ifdefs needed.
14213
14214         * mini-ppc.c: Fix compilation.
14215
14216         * basic-calls.cs: New regression tests.
14217
14218         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14219
14220         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14221         of l0 since that is callee saved.
14222
14223         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14224         to virtual calls.
14225
14226         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14227         of delay instruction.
14228
14229         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14230
14231         * mini.h (MonoCallInst): Add 'virtual' flag.
14232
14233         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14234
14235 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14236
14237         * *.cs: New regression tests.
14238
14239         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14240         work.
14241
14242         * mini.c (mono_runtime_install_handlers): Fix build.
14243
14244         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14245         'signal_stack_size' members.
14246
14247         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14248         alternate signal stack.
14249
14250         * exceptions-x86.c: Add stack overflow handling.
14251
14252         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14253         functions to arch independent code.
14254
14255         * mini.c (mono_print_tree): Print more detailed info for load_membase
14256         opcodes.
14257         
14258 2004-02-23  Martin Baulig  <martin@ximian.com>
14259
14260         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14261
14262 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14263
14264         * mini-x86.c: fixed reg allocation for div/rem.
14265
14266 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14267
14268         * driver.c (mono_main): Report some configuratio options on --version.
14269
14270 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14271
14272         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14273         low in the address space. Correctly flush memory in thunks where we
14274         output native code.
14275
14276 2004-02-20  Martin Baulig  <martin@ximian.com>
14277
14278         * mini.c (mini_get_method): New static method; inflate all generic
14279         methods and methods in open generic instances.
14280         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14281         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14282
14283 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14284
14285         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14286
14287         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14288
14289 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14290
14291         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14292
14293         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14294         it compile using Sun's compiler.
14295
14296 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14297
14298         * 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.
14299
14300         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14301
14302 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14303
14304         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14305         code.
14306         * mini-ppc.c: handle calls outside of the allowed range with thunks
14307         allocated using the code manager.
14308         * tramp-ppc.c: use the code manager to hold generated native code.
14309         Fixed the magic trampoline to just patch vtable entries.
14310
14311 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14312
14313         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14314         independent file.
14315
14316 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14317
14318         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14319         PPC.
14320
14321         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14322         if we have a working __thread implementation.
14323
14324         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14325         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14326
14327 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14328
14329         * mini-x86.c: Fix compilation under gcc 2.
14330         
14331 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14332
14333         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14334         contains a call to the wrapped function.
14335
14336         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14337         OP_<CALL>_IMM opcodes, and use them under X86.
14338         
14339         * mini.c (mono_jit_find_compiled_method): Fix warning.
14340
14341         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14342
14343         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14344
14345         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14346         functionality to mini.c.
14347
14348         * mini.c (mono_create_jump_trampoline): New function to create a jump
14349         trampoline. Return a compiled method instead of a trampoline if it
14350         exists. Add a cache for jump trampolines.
14351
14352         * mini.c (mono_jit_find_compiled_method): New function to return a
14353         compiled method if it exists.
14354
14355         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14356         mono_arch_create_jit_trampoline.
14357
14358         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14359         a jump trampoline. Fixes #52092.
14360         
14361 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14362
14363         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14364         which is not up-to-date. Add check_corlib_version () instead.
14365
14366         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14367         have to call it.
14368         
14369         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14370         since newer valgrind versions do not need it.
14371
14372         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14373         compile a method with a given set of optimizations.
14374
14375         * mini.c: Compile icall wrappers on-demand instead of at startup.
14376
14377         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14378         wrapper for an icall.
14379
14380 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14381
14382         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14383         #54063.
14384
14385         * iltests.il: Add test for non-empty stack before switch instruction.
14386
14387 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14388
14389         * mini.c: Add support for new stringbuilder marshalling conventions.
14390
14391         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14392
14393 2004-02-01  Martin Baulig  <martin@ximian.com>
14394
14395         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14396         in `ginst->mtype_argv'.
14397
14398 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14399
14400         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14401         facilitate grepping.
14402
14403 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14404
14405         * mini.c: fixed buglet in initobj generic implementation for references.
14406
14407 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14408
14409         * Makefile.am: make the version script conditional.
14410         * jit-icalls.c: handle missing truncl().
14411
14412 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14413
14414         * exceptions.cs: Add more tests for double->int conversion.
14415
14416         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14417         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14418
14419 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14420
14421         * driver.c: make --verbose --version emit an error
14422         if the loaded corlib doesn't match the runtime version.
14423
14424 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14425
14426         * mini-ppc.h: export ppc_patch().
14427         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14428         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14429         on par or better than on MacOSX.
14430
14431 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14432
14433         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14434         mono_lookup_pinvoke_call.
14435
14436         * mini-x86.c: Under windows, the default pinvoke calling convention is
14437         stdcall. Fixes #52834.
14438
14439         * mini.c (optimize_branches): Add an upper bound to the number of
14440         iterations to prevent infinite loops on strange loops. Fixes #53003.
14441
14442 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14445         and ISINST. Fixes #52093.
14446
14447         * objects.cs (test_0_vector_array_cast): New tests.
14448         
14449 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14450
14451         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14452         checking in Array.Set ().
14453
14454         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14455         #52590.
14456
14457         * object.cs (test_0_multi_array_cast): New regression test.
14458
14459 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14460
14461         * exceptions-ppc.c: fix build on Linux/PPC.
14462
14463 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14464
14465         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14466         running under valgrind.
14467         (x86_magic_trampoline): Fix build bustage.
14468
14469         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14470         negative values as well. This is needed for the encoding of the line number
14471         info, since sometimes the line numbers are not in increasing order.
14472
14473 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14474
14475         * cpu-pentium.md (localloc): Increase the size of the localloc 
14476         instruction since it is a loop under Win32.
14477
14478         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14479         allocation.
14480
14481 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14482
14483         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14484         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14485         Max Horn (max@quendi.de). Fix file names in comments.
14486
14487 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14488
14489         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14490         avoid stack overflow.
14491         (replace_usage): Avoid uninitialized variable warnings.
14492
14493         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14494         and taking the address of valuetype variables.
14495
14496 2004-01-03  Patrik Torstensson
14497
14498         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14499         for other purposes than FP later on.
14500
14501 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14502
14503         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14504         of tail calls.
14505
14506 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14507
14508         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14509
14510 2003-12-30  Patrik Torstensson <p@rxc.se>
14511
14512         * mini-x86.h: Decreased number of availiable fp regs.
14513         Solves corner cases with FP spilling.
14514
14515 2003-12-23  Patrik Torstensson <p@rxc.se>
14516
14517         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14518         for floating point stack tracking / spilling on x86. 
14519         Fixes bug #49012.
14520         
14521         * basic-float.cs: added float mul overflow test.
14522
14523 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14524
14525         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14526
14527 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14528
14529         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14530         supports for cond branches that overflow the immediate
14531         overflow offset. mcs can compile simple programs.
14532
14533 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14534
14535         * exceptions-ppc.c: exception handling support wip:
14536         finally handlers get run on exception.
14537
14538 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14539
14540         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14541         profiling.
14542
14543 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14544
14545         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14546         initial support for stack walking and unwinding.
14547
14548 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14549
14550         * driver.c (mono_main): Make corlib-out-of-sync message more 
14551         descriptive. Also remove verify_corlib call.
14552
14553 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14554
14555         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14556         not overlap with other call's arguments, too.
14557
14558 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14559
14560         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14561         move to arch-specific code the choice of arch-specific
14562         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14563         * mini.c: ensure emulation calls will not interleave
14564         with other calls.
14565
14566 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14567
14568         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14569         the magic trampoline stack frame is dropped before executing
14570         the new method.
14571
14572 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14573
14574         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14575         and integer to fp conversions. Added support for overflowing
14576         arguments on the stack. Reserve a couple more registers as temps.
14577         Added support for aot compilation (as output still needs to be
14578         tweaked, though).
14579
14580 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14581
14582         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14583         Don't overwrite return register in some corner cases.
14584
14585 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14586
14587         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14588         static constructors when AOT compiling.
14589
14590         * driver.c (mono_main): Call mono_check_corlib_version.
14591
14592 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14593
14594         * cpu-g4.md, basic.cs: fixed div target register.
14595
14596 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14597
14598         * mini-ppc.c, basic.cs: shl_imm fix with test.
14599
14600 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14601
14602         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14603         structures by value. Misc fixes.
14604         * objects.cs: more tests.
14605
14606 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14607
14608         * mini-ppc.c: lconv.ovf.i implemented.
14609
14610 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14611
14612         * mini.c:
14613         (mini_init): don't error out if someone already called g_thread_init.
14614
14615 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14616
14617         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14618         to be any type per the spec. Fix abnormal memory usage when
14619         the same object is repeatedly thrown.
14620
14621 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14622
14623         * mini.c: check for overruns in IL code.
14624
14625 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14626
14627         * TODO: Add/remove some todo entries.
14628
14629 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14630
14631         * driver.c (mono_main): Call mono_verify_corlib.
14632
14633 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14634
14635         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14636         This has been moved to mini.c
14637         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14638         type being casted is marshalbyref it could be a proxy, so instead of
14639         emitting the type check code, emit a call to a runtime method that will
14640         perform the check by calling CanCastTo if needed.
14641
14642 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14643
14644         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14645         methods with large stack frames under Win32.
14646
14647 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14648
14649         * Makefile.am: Distribute regression tests.
14650
14651         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14652         at the end instead of inserting each variable into the sorted list.
14653
14654         * linear-scan.c (mono_varlist_sort): New helper function.
14655         
14656 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14657
14658         * mini.c: ensure arguments and locals are within bounds.
14659
14660 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14661
14662         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14663         related fixes.
14664
14665 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14666
14667         * mini.c (mono_cprop_copy_values): Fix crash.
14668
14669         * aot.c: Set verbosity back to 0.
14670         
14671 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14672
14673         * regalloc.c: complete memory leak fix by Laurent Morichetti
14674         (l_m@pacbell.net).
14675
14676 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14677
14678         * driver.c (main_thread_handler): Revert the previous patch.
14679
14680         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14681         under valgrind.
14682
14683         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14684         memory from the memory pool.
14685
14686         * driver.c (main_thread_handler): Turn on all optimizations when
14687         --aot is used.
14688
14689         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14690         an array for better performance.
14691
14692         * regalloc.c (mono_regstate_assign): Fix memory leak.
14693
14694         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14695         serialize the debug info.
14696
14697         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14698         debug info from the serialized representation.
14699
14700         * aot.c: Save debug info into the generated file and load it when 
14701         loading a method.
14702
14703         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14704
14705 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14706
14707         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14708         More FP-related fixes.
14709
14710 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14711
14712         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14713         and register allocation buglet. Hello world now runs.
14714
14715 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14716
14717         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14718         * tramp-ppc.c: fixed class init trampoline.
14719         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14720
14721 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14722
14723         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14724         mini.c: more ppc changes/fixes.
14725
14726 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14727
14728         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14729         Also optimize the case when the arguments are the same in the caller 
14730         and in the callee.
14731
14732         * iltests.il: Add tests for tail calls with valuetype arguments.
14733
14734 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14735
14736         * mini-ppc.c: fixes for struct return type.
14737
14738 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14739
14740         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14741         mono_spillvar_offset() to arch-specific code.
14742
14743 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14744
14745         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14746
14747 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14748
14749         * exceptions-x86.c: Fix stack space leaks.
14750         
14751         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14752         registers from the lmf if the method has save_lmf set.
14753
14754 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14755
14756         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14757         of icall wrappers into InvokeInDomain, since these are now per-domain.
14758
14759 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14760
14761         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14762         make some opcode emulation and intrinsic ops enabled/disabled 
14763         according to the architecture. More fixes.
14764
14765 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14766
14767         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14768
14769 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14770
14771         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14772         arch-specific handling for 'this' and struct return type to
14773         arch-specific code.
14774
14775 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14776
14777         * aot.c: prevent divide by zero error when reporting (it happened with
14778         Accessibility.dll).
14779
14780 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14781
14782         * mini.h (inst_switch): Remove unused macro.
14783
14784 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14785
14786         * aot.c:
14787         (load_aot_module): free 'info->methods' and 'info' properly. No more
14788         "free(): invalid pointer blah" messages when you have an old aot
14789         compiled assembly.
14790
14791 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14792
14793         * jit-icalls.c, mini.c: Added support for context static fields.
14794
14795 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14796
14797         * mini.c (mono_method_blittable): Methods which set LastError are not 
14798         blittable either. Fixes #51108.
14799         
14800 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14801
14802         * mini.c: flush icache.
14803         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14804
14805 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14806
14807         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14808
14809 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14810
14811         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14812         safe on IA32.
14813
14814         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14815         vararg calls.
14816
14817         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14818
14819 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14820
14821         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14822         instruction when the result is discarded.
14823
14824         * iltests.il (test_0_div_regalloc): New regression test.
14825
14826         * arrays.cs: Fix compilation error.
14827
14828 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14829
14830         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14831         float rules to inssel-x86.brg: sane architectures with FP registers
14832         don't need to implement these rules.
14833
14834 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14835
14836         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14837
14838 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14839
14840         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14841         implementation of 32 bit systems.
14842
14843 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14844
14845         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14846         (Jeroen Zwartepoorte).
14847
14848 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14849
14850         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14851         the caller and the callee matches.
14852         
14853         * mini.c (mono_method_to_ir): Add comment.
14854
14855         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14856         signbit is missing on some platforms.
14857
14858 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14859
14860         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14861
14862         * mini.c (setup_jit_tls_data): Call the new function.
14863         
14864         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14865
14866         * mini-x86.c: Add experimental support for fast access to the lmf
14867         structure under NPTL/Linux 2.6.x.
14868
14869 2003-11-06  Martin Baulig  <martin@ximian.com>
14870
14871         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14872         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14873         the debugger.
14874
14875 2003-11-02  Martin Baulig  <martin@ximian.com>
14876
14877         * mini.c (inflate_generic_field): New static method.
14878         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14879         generic instance and the field is declared in a generic type, call
14880         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14881
14882 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14883
14884         * mini.h mini.c (mono_method_same_domain): New function to return
14885         whenever the caller and the callee are in the same domain.
14886
14887         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14888
14889 2003-10-30  Martin Baulig  <martin@ximian.com>
14890
14891         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14892         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14893         method parameters.
14894         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14895         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14896
14897 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14898
14899         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14900         propagation.
14901
14902         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14903         object here, so it is in the correct appdomain etc.
14904
14905 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14906
14907         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14908         already done.
14909         (mono_method_to_ir): Avoid freeing the type created returned from
14910         mono_type_create_from_typespec, since it is put into an internal cache
14911         by the function. Fixes pointer.exe.
14912
14913         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14914         trampolines for icalls and pinvokes as well. Fixes #33569.
14915
14916 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14917
14918         * mini.c: Update after appdomain changes.
14919
14920         * mini.c (mono_jit_compile_method_inner): Allways compile native
14921         method wrappers in the root domain, since there can only be one
14922         instance of them, whose address is stored in method->info.
14923
14924 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14925
14926         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14927         environment variable. Instead detect automatically whenever running
14928         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14929         valgrind.h.
14930
14931 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14932
14933         * trace.c, trace.h: New files that implement the new trace option
14934         parsing. 
14935
14936         * driver.c: Document new --trace options.
14937
14938         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14939         mini-x86.c: Apply:
14940
14941         -       if (mono_jit_trace_calls)
14942         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14943
14944         * mini.h: prototypes.
14945         
14946 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14947
14948         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14949
14950         * mini.c inssel.brg: Implement typedefbyref opcodes.
14951
14952         * mini.c (mono_jit_compile_method): Remove unused local variable.
14953
14954         * mini.c (mono_jit_compile_method_inner): Ditto.
14955         
14956 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14957
14958         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14959         
14960         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14961
14962 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14963
14964         * mini.c (mono_no_aot): Remove unused global variable.
14965
14966         * mini.c: Thread safety fixes.
14967
14968 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14969
14970         * mini.c (mono_create_class_init_trampoline): Add a lock around
14971         class_init_hash_addr.
14972
14973         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14974         #30073.
14975
14976         * mini.c: Decompose the NEWARR instruction before decomposing its
14977         arguments. Fixes #30073.
14978
14979 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14982         convention.
14983
14984 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14985
14986         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14987
14988         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14989
14990         * driver.c: Add support for compiling icall wrappers to --compile.
14991
14992 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14993
14994         * inssel.brg: The empty value in class->interface_offsets is -1, not
14995         0. Fixes #49287.
14996
14997 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14998
14999         * objects.cs: New test for 'is' operator on an array of interfaces.
15000
15001 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15002
15003         * tramp-ppc.c: update trampoline code to support jumps
15004         and class initialization.
15005
15006 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15007
15008         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15009
15010         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15011
15012         * inssel.brg (OP_UNBOX): Remove unused rule.
15013
15014         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15015         region instead of one for each method. Fixes #47813.
15016
15017 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15018
15019         * exceptions.cs (test_0_nested_finally): New regression test for
15020         nested exception handlers.
15021
15022         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15023
15024         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15025
15026         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15027         inlining.
15028
15029         * mini.c (mono_method_check_inlining): Make the inlining limit 
15030         configurable by an environment variable.
15031         
15032         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15033
15034         * mini.h: Bump AOT file version.
15035
15036         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15037         token, store the image along with the token, since the token might not 
15038         refer to the same image as the method containing the relocation, 
15039         because of inlining.
15040
15041 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15042
15043         * mini.c (mono_precompile_assemblies): New function to compile
15044         all methods in all loaded assemblies.
15045
15046         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15047
15048         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15049         iassign and fassign to int*, since they can contain large negative
15050         values if the register is spilled. Also added some comments. Fixes
15051         #45817.
15052
15053         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15054         under Win32. Fixes #42964.
15055
15056 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15057
15058         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15059
15060         * aot.c: Added support for AOT compiling methods which contain calls
15061         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15062         handled.
15063         
15064         * driver.c (compile_all_methods): Run the compilation in a thread
15065         managed by mono. Fixes #44023.
15066
15067         * mini.c (mono_codegen): Print full method name in verbose output.
15068
15069         * mini-x86.c (mono_arch_patch_code): Fix warning.
15070         
15071         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15072         jumps, since the method we are jumping to might be domain-specific.
15073
15074         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15075
15076 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15077
15078         * inssel.brg: string chars are unsigned.
15079
15080 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15081
15082         * TODO: New todo item.
15083
15084         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15085         which calls mono_runtime_class_init and patches the call site to
15086         avoid further calls.
15087         (mono_arch_create_class_init_trampoline): New arch specific function 
15088         to create a class init trampoline.
15089         (create_trampoline_code): Generalized so it can create
15090         class init trampolines as well.
15091
15092         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15093         (mono_create_class_init_trampoline): New function to create and cache
15094         class init trampolines.
15095         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15096         vtable given the address of a class init trampoline. Used by the
15097         patching process.
15098         (mono_codegen): Generate a call to a trampoline instead of
15099         mono_runtime_class_init in LDSFLD[A].
15100         (mono_codegen): Add relocations for the new trampoline.
15101         
15102         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15103         MONO_PATCH_INFO_CLASS_INIT.
15104
15105         * mini.h: Bump AOT version number.
15106
15107         * aot.c: Create a copy of the loaded code instead of using the original
15108         so methods which call each other will be close in memory, improving
15109         cache behaviour.
15110         
15111         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15112         patch since it breaks the regression tests.
15113         
15114         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15115         for the register saving instruction sequence since the 
15116         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15117
15118 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15119
15120         * TODO: Fix todo item && remove another.
15121
15122 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15123
15124         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15125         previous checkin.
15126
15127         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15128         function of the module.
15129
15130         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15131         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15132         --no-aot command line option.
15133
15134 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15135
15136         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15137         by Bernie Solomon (bernard@ugsolutions.com).
15138
15139         * inssel.brg: Refactor the interface offset table related code into
15140         its separate functions and add support for the AOT case.
15141
15142 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15143
15144         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15145         
15146         * aot.c: Added mono_aot_verbose variable and made all debugging
15147         output depend on the value of this variable.
15148
15149         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15150         method_label and info_label.
15151
15152         * mini.h mini-x86.c aot.c: Added a new relocation type 
15153         MONO_PATCH_INFO_IID for klass->interface_id.
15154
15155         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15156         the MonoJitInfo structure.
15157
15158         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15159         a non-root appdomain in shared mode.
15160
15161 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15162
15163         * aot.c: make aot loader less verbose. Remove free of unused variable.
15164
15165 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15166
15167         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15168
15169         * .cvsignore: Added *.dll.
15170
15171         * mini.c (mono_print_tree_nl): New function callable while debugging.
15172
15173         * mini.c (mono_print_code): Export this.
15174
15175         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15176         patched code.
15177
15178 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15179
15180         * mini.h (MonoCompile): Added 'jit_info' field.
15181
15182         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15183         the cfg structure, since it is needed by the AOT compiler.
15184
15185         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15186
15187         * aot.c: A major rewrite. Changes include:
15188         - save exception tables for methods which have them.
15189         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15190         to g_module_symbol.
15191         - reworked the file format so it is now much smaller and needs
15192         fewer relocation entries.
15193         
15194 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15195
15196         * aot.c (load_aot_module): Fix build bustage on platforms without
15197         Boehm GC.
15198
15199 2003-09-04  Martin Baulig  <martin@ximian.com>
15200
15201         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15202
15203 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15204
15205         * TODO: Some new optimization ideas.
15206
15207         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15208
15209         * aot.c: Save the optimization flags used to compile the code into
15210         the AOT module.
15211
15212         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15213         support emitting domain specific code.
15214         
15215         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15216         no longer domain neutral. It can be made domain neutral by compiling 
15217         with --optimize=shared.
15218
15219         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15220         between appdomains.
15221
15222         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15223         loading of AOT code.
15224
15225         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15226         
15227         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15228         if there is no domain neutrality information.
15229
15230 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15231
15232         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15233         format version into the generated library.
15234
15235         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15236         callee method into the caller since one of them could be shared.
15237
15238         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15239         system exceptions from AOT code now works.
15240
15241         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15242         method if it is domain neutral and the callee is not.
15243
15244         * graph.c (cfg_emit_one_loop_level): Fix warning.
15245
15246 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15247
15248         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15249         last checkin.
15250
15251 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15252
15253         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15254         is needed  by code which is executed before mono_runtime_init ().
15255         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15256         
15257         * mini.c (mono_thread_abort): Fix warning.
15258         (mono_jit_compile_method): Call static constructor in the AOT case too.
15259
15260         * aot.c (mono_compile_assembly): Fix warning.
15261
15262 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15263
15264         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15265
15266 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15267
15268         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15269
15270         * cpu-pentium.md: Fix the length of call opcodes so they include the
15271         ESP restoring instruction. Fixes #47968.
15272
15273 2003-08-28  Martin Baulig  <martin@ximian.com>
15274
15275         * mini-x86.c (mono_arch_call_opcode): Added support for
15276         MONO_TYPE_GENERICINST.
15277
15278         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15279
15280 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15281
15282         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15283         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15284
15285         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15286         metadata_section.
15287
15288 2003-08-26  Martin Baulig  <martin@ximian.com>
15289
15290         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15291         when reporting an error, set this to the actual error location.
15292         (mono_method_to_ir): Report the correct error location if
15293         get_basic_blocks() returned an error.
15294
15295 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15296
15297         * mini.c (mono_type_blittable): OBJECT is not blittable.
15298         (mono_method_blittable): Methods which have marshalling descriptors
15299         are not blittable either. Fixes #47842.
15300
15301 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15302
15303         * driver.c mini.c: Use an environment variable instead of a global 
15304         variable. Also fix the build.
15305
15306         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15307         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15308         reporting this. 
15309
15310         * driver.c mini.c: Added --with-valgrind option to turn off some
15311         code which prevents mono from running under valgrind.
15312
15313         * mini.c (mono_emit_call_args): Fixed warning.
15314
15315         * mini.c (mono_emulate_opcode): Fixed warning.
15316
15317 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15318
15319         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15320         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15321         regalloc.c, regalloc.h: specify available registers in arch-specific
15322         code and support floats in the regallocator (patch by Laurent Morichetti 
15323         <l_m@pacbell.net>)
15324
15325 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15326
15327         * mini.c: mono_thread_current() can be called only after
15328         mono_runtime_init(): rearrange code to not call it early on.
15329
15330 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15331
15332         * mini.c: allocate jump tables in the code mempools.
15333
15334 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15335
15336         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15337         freed.
15338
15339 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15340
15341         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15342         12 to 16.  This fixes bug #47453.
15343
15344
15345 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15346
15347         * mini-ppc.c: fixed indexed load and unsigned compares.
15348
15349 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15350
15351         * mini.c: reenabled installation of handler for
15352           thread abort signal.
15353
15354 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15355
15356         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15357         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15358         until it's fixed and actually useful.
15359
15360 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15361
15362         * inssel-long32.brg: couple more opcodes implemented.
15363
15364 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15365         
15366         * mini-sparc.c: Even more opcodes implemeted.
15367
15368 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15369
15370         * mini-sparc.c: More opcodes implemented.
15371
15372 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15373
15374         * mini-sparc.c: More opcodes implemented.
15375
15376 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15377
15378         * inssel-sparc.brg: Add some needed rules.  Direct
15379         copy from PPC.
15380         * Makefile.am: Use inssel-sparc.brg
15381         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15382         an assert happy for now.
15383
15384 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15385
15386         * mini-sparc.c: Fixed compile errors.
15387         * exceptions-sparc.c: Same.  We now produce a mono binary 
15388         on sparc-linux.  Yea.
15389
15390 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15391
15392         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15393         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15394         They compile, but do not work.
15395
15396 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15397
15398         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15399         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15400         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15401         (ct@gentoo.org).
15402
15403 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15404
15405         * mini.c: more opcodes implemented and better support for generics.
15406
15407 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15408
15409         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15410         * mini.c, mini.h: first cut at generics support: some new instructions 
15411         added and changed the behaviour of some of the existing ones.
15412
15413 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15414
15415         * mini.c: Removed definition of metadata_shared mutex here.
15416
15417 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15418
15419         * mini-x86.c: make vararg calls work for instance methods.
15420
15421 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15422
15423         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15424         returns the arguments in a separte list, now.
15425
15426 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15427
15428         * aot.c, mini.c: updates for array type representation changes.
15429
15430 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15431
15432         * mini.c: register function to perform jit shutdown.
15433
15434 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15435
15436         * mini.c: use a faster allocator if possible.
15437
15438 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15439
15440         * aot.c: some cleanups and portability changes.
15441
15442 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15443
15444         * mini.c: use faster allocation for CEE_BOX if possible.
15445
15446 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15447
15448         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15449         Moved inlined mempcy code to its own function so that is can be
15450         reused. Added an inline memset function as well (optimized initobj).
15451         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15452
15453 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15454
15455         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15456
15457 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15458
15459         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15460         arch code can setup the cpu for CLR execution, if needed.
15461         We use it on x86 to set the precision of FP operations.
15462
15463 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15464
15465         * mini.c: disable some optimizations if we can guess they'll cost too
15466         much for a given method.
15467
15468 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15469
15470         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15471         
15472 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15473         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15474         info collection support.
15475
15476 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15477
15478         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15479         is now implemented in the profiling API. Get rid of a couple of
15480         unnecessary global variables.
15481
15482 2003-06-15  Nick Drochak <ndrochak@gol.com>
15483
15484         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15485         * cpu-g4.md: add op_bigmul and op_bigmul_un
15486         * cpu_pentium.md: add op_bigmul_un
15487         * inssel-long32.brg: add rule for unsigned bigmul
15488         * mini-ops.h: define OP_BIGMUL_UN
15489         * mini-x86.c: THE BUG: handle (un)signed properly
15490         * mini.c: choose unsigned opcode if needed.
15491         This set of patches fixes bug #44291
15492
15493 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15494
15495         * mini.c (optimize_branches): improved to handle all kinds of
15496         conditional branches.
15497
15498 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15499
15500         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15501         don't raise exceptions.
15502
15503 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15504
15505         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15506         to arch-specific files.
15507
15508 2003-06-09  Martin Baulig  <martin@ximian.com>
15509
15510         * Makefile.am (libs): Added $(LIBGC_LIBS).
15511
15512 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15513
15514         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15515         and OP_ATAN (fixes bug#44293).
15516
15517 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15518
15519         * Makefile.am, mini-x86.c: rename cpu description array to
15520         pentium_desc, since some compilers define the 'pentium' preprocessor
15521         symbol.
15522
15523 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15524
15525         * mini.c (mini_select_instructions): add explicit branch if the
15526         following block is not the false target of a conditional branch -
15527         we need this with any optimization that reorder or remove bblocks
15528
15529         * mini.c (optimize_branches): bug fixes
15530
15531 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15532
15533         * mini.c (mono_method_to_ir): inline static readonly fields
15534
15535         * ssa.c (fold_tree): start cfold support for long (very simple
15536         cases only)
15537
15538         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15539
15540 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15541
15542         * inssel.brg: fixed memcpy (bug #44219).
15543
15544 2003-06-05  Dick Porter  <dick@ximian.com>
15545
15546         * driver.c: Set the glib log levels to not abort if g_message
15547         recurses.
15548
15549         g_set_prgname() has to happen before mini_init() so that the
15550         process handle gets the info.
15551         
15552 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15553
15554         * driver.c: add intrins to the default optimizations to get wider
15555         exposure.
15556
15557 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15558
15559         * mini.h: some large basic blocks will overflow a 16-bit
15560         integers for symbolic registers.
15561
15562 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15563
15564         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15565         (mono_arch_output_basic_block): fix bug 43499 
15566
15567 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15568
15569         * mini.c: kill duplicated definition of mono_debug_format.
15570
15571 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15572
15573         * mini-x86.c, arrays.cs: fixed register allocation bug.
15574
15575 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15576
15577         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15578
15579         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15580
15581 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15582
15583         * mini.c:
15584         (print_method_from_ip): also print source location information if
15585         available.
15586
15587 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15588
15589         * mini.c (mono_find_block_region): bug fix in region code
15590         (mini_method_compile): enable removing unreachable code again, but
15591         only in methods without exception clauses.
15592
15593 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15594
15595         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15596         Implemented arglist opcode and handling of TypedReference type.
15597         Fixed x86 call convention when a structure is returned.
15598         Minimal support for calling static vararg methods.
15599
15600 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15601
15602         * mini.c (mini_method_compile):  always remove unreachable code,
15603         because the code in them may be inconsistent  (access to dead
15604         variables for example).
15605
15606 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15607
15608         * driver.c, debug-mini.c: warning fixes.
15609
15610 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15611
15612         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15613
15614 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15615
15616         * mini.c: thread-static fields are registered in mono_class_vtable(),
15617         so ensure the function is called before checking for them.
15618
15619 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15620
15621         * mini.c (optimize_branches): fix for bug 43586
15622
15623         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15624         overflow (fixes Bug #43639)
15625
15626 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15627
15628         * mini.c, objects.cs: allow the use of stobj for primitive types.
15629
15630 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15631
15632         * mini.c: be less strict about argument checking until we support
15633         running the verifier.
15634
15635 2003-05-27  Nick Drochak <ndrochak@gol.com>
15636
15637         * basic-long.cs: tests for (ulong)int * (ulong)int also
15638         * mini.c: use the same trick for (ulong)int * (ulong)int
15639
15640 2003-05-27  Nick Drochak <ndrochak@gol.com>
15641
15642         * basic-long.cs: add regression test for (long)int * (long)int
15643         * cpu-pentium.md: add op_bigmul specification
15644         * inssel-long32.brg: add OP_BIGMUL rule
15645         * mini-ops.h: add OP_BIGMUL
15646         * mini-x86.c: register allocator: handle case where src1 needs to be
15647         in EAX.
15648         * mini.c: substitute special BIGMUL opcode in the tree for 
15649         (long)int * (long)int
15650
15651 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15652
15653         * jit-icalls.c: call the type ctor on field access if needed.
15654
15655 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15656
15657         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15658         to a method (including results of ldelema, bug#43207).
15659
15660 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15661
15662         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15663         colors to show exception handler blocks.
15664
15665         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15666         (fix for pinvoke7.cs).
15667
15668 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15669
15670         * mini.h, mini.c: ensure correct initialization order for types that
15671         require it. Prepare for lazy compilation of jit icall wrappers.
15672         Provide a name for opcode emulation to reduce unneeded mallocing.
15673
15674 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15675
15676         * mini-x86.c: better register restoring code and profiling
15677         support for tail calls.
15678
15679 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15680
15681         * mini.h, driver.c: prepare for leaf methods optimization.
15682
15683 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15684
15685         * mini.c: get targets of branches before converting a method.
15686
15687 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15688
15689         * mini.c (optimize_branches): added some experimental code (disbaled) 
15690
15691 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15692
15693         * mini.c (optimize_branches): fix branch to branch optimization 
15694
15695         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15696
15697         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15698
15699         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15700
15701         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15702         if needed.
15703
15704 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15705
15706         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15707         enable use of interface variables again.
15708
15709         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15710         I1 to registers because there is no simply way to sign extend 8bit
15711         quantities in caller saved registers on x86.
15712
15713         * inssel-float.brg: set costs of some rules to 2 so
15714         that monobure always select the arch. specific ones if supplied,
15715         regardless of the order we pass the files to monoburg.
15716
15717 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15718
15719         * mini.c, mini-x86.c: since the magic trampoline for jumps
15720         can't patch the code directly, we do it as soon as the
15721         method gets compiled.
15722
15723 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15724
15725         * mini-x86.c, mini.h: introduce a new patching method
15726         to support CEE_JMP and tail calls.
15727         * mini.c: obey tail.call. Don't precompile methods target
15728         of CEE_JMP.
15729         * tramp-x86.c: new trampoline code to handle methods
15730         reached through a jump.
15731
15732 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15733
15734         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15735         bit values to registers
15736
15737 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15738
15739         * mini.c (mono_compile_get_interface_var): share interface
15740         variables if possible.
15741
15742 2003-05-16  Martin Baulig  <martin@ximian.com>
15743
15744         * debug-mini.c (mono_init_debugger): New function to initialize
15745         the debugger.  This is not in the debugger since it needs to
15746         access some of mini's internals.
15747
15748 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15749
15750         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15751
15752 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15755         for value type handling.
15756
15757 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15758
15759         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15760         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15761
15762 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15763
15764         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15765           the constructor through a proxy.
15766
15767 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15768
15769         * jit-icalls.c, inssel.brg: fixes to array element address
15770         calculations.
15771
15772 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15773
15774         * mini-x86.c (is_regsize_var): allocate pointer to registers
15775
15776 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15777
15778         * driver.c: fixed typo, added intrins to the set of optimizations
15779         tested with regressions.
15780
15781 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15782
15783         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15784         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15785         test case.
15786
15787 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15788
15789         * inssel.brg: remove some common pop instructions without side effects
15790
15791 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15792
15793         * inssel-x86.brg: fixed thinko in int to double conversions.
15794
15795 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15796
15797         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15798
15799 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15800
15801         * inssel-long32.brg: two more missing instructions.
15802
15803 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15804
15805         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15806         if not already set.
15807
15808 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15809
15810         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15811         correctly.
15812
15813         * basic-float.cs: Added tests for negative zero.
15814
15815 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15816
15817         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15818         a couple of missing operations for long casts, with test cases.
15819
15820 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15821
15822         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15823
15824 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15825
15826         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15827         code size estimation.
15828
15829 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15830
15831         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15832         abstract methods (fix bug 42542)
15833
15834         * aot.c: add ability to handle array types
15835         
15836 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15837
15838         * mini.c: Call the _specific versions of the object allocation
15839         functions if possible.
15840
15841 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15842
15843         * driver.c: call setlocale ().
15844
15845 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15846
15847         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15848         windows build.
15849
15850 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15851
15852         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15853
15854         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15855         wrappers (fix bug 42122)
15856
15857 2003-05-04  Martin Baulig  <martin@ximian.com>
15858
15859         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15860
15861         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15862         s/mini_set_defaults/mono_set_defaults/g.
15863
15864 2003-05-04  Martin Baulig  <martin@ximian.com>
15865
15866         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15867
15868 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15869
15870         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15871         (reported by Don Roberts).
15872
15873 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15874
15875         * mini.c: temporarily work around two bugs for this release.
15876
15877 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15878
15879         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15880         that contains -export-dynamic and it makes using the ld script
15881         useless.
15882         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15883
15884 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15885
15886         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15887         specific cpu.
15888
15889 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15890
15891         * mini.c: make sure leave calls all the needed finally blocks,
15892         even when the target jumps out of multiple exception clauses.
15893
15894 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15895
15896         * ldscript, Makefile.am: add linker script to reduce the number of
15897         exported symbols (should also fix the issues with libwine defining
15898         some of the same symbols in io-layer).
15899
15900 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15901
15902         * driver.c (mini_main): Avoid assertion when no file name is given on 
15903         the command line.
15904
15905 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15906
15907         * driver.c: added --version/-V command line option.
15908         Added the inline optimization in the regression tests.
15909
15910 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15911
15912         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15913         to the type in the method signature (fixes bug#42134).
15914
15915 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15916
15917         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15918
15919 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15920
15921         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15922
15923 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15924
15925         * driver.c: fixed bug #42100.
15926
15927 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15928
15929         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15930
15931 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15932
15933         * mini.c: moved most of the code required to do inlining to its own
15934         function so it can be reused. Inline also ctors if appropriate.
15935
15936 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15937
15938         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15939         the runtime can call mono API functions.
15940
15941 2003-04-27  Martin Baulig  <martin@ximian.com>
15942
15943         * debug-mini.c (mono_debug_init_method): Added
15944         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15945         send a notification to the debugger.
15946
15947         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15948         running in the Mono Debugger, just pass the breakpoint number to
15949         mono_debug_init_method().
15950
15951         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15952
15953 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15954
15955         * mini.c: allow some more unsafe compares.
15956
15957 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15958
15959         * mini-x86.c, Makefile.am: make distcheck works (partially from
15960         a patch by Richard Lee <r.h.lee@attbi.com>).
15961         * regset.c, regset.h: removed, they are unused.
15962
15963 2003-04-25  Dick Porter  <dick@ximian.com>
15964
15965         * driver.c: Usage reports the name as 'mono' not 'mini'
15966         * exceptions-x86.c: Build and run on freebsd
15967
15968 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15969
15970         * Makefile.am: install the program with the 'mono' name and
15971         the library as libmono instead of mini and libmini.
15972
15973 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15974
15975         * driver.c: provide the APIs for the embedding interface of the old jit.
15976
15977 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15978
15979         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15980
15981 2003-04-23  Martin Baulig  <martin@ximian.com>
15982
15983         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15984
15985         * driver.c: Added `--debug' command line argument to enable
15986         debugging support.
15987
15988 2003-04-23  Martin Baulig  <martin@ximian.com>
15989
15990         * debug.[ch]: Removed.  The code is now in
15991         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15992
15993         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15994         last six months.
15995
15996 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15997
15998         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15999
16000 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16001
16002         * mini.c:
16003         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16004         mono_domain_finalize.
16005         (mini_method_compile): use mono_method_profile* if the the option is
16006         enabled.
16007
16008 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16009
16010         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16011         methods with their wrapper.
16012
16013         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16014         methods with their wrapper.
16015
16016         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16017         their wrapper.
16018
16019         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16020         wrapper.
16021
16022         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16023         methods.
16024
16025 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16026
16027         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16028
16029 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16030
16031         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16032         of the mempool. This is slightly faster and uses less memory
16033
16034 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16035
16036         * mini.c: avoid O(n) allocation for variables.
16037
16038 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16039
16040         * mini.c: handle items on the stack after inlining methods.
16041
16042 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16043
16044         * mini.c: make the method->opcode optimization dependent
16045         on MONO_OPT_INSTRINS and do it lazily.
16046
16047 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16048
16049         * driver.c: print overall results at the end of regression run.
16050
16051 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16052
16053         * inssel.brg: don't overwrite symbolic registers.
16054
16055 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16056
16057         * inssel-x86.brg: fix conversion from long to float.
16058
16059 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16060
16061         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16062
16063 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16064
16065         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16066
16067         * driver.c: Added --print-vtable option as in the old JIT.
16068
16069 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16070
16071         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16072
16073 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16074
16075         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16076
16077 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16078
16079         * mini.c regalloc.c regalloc.h: Fix memory leak.
16080
16081 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16082
16083         * aot.c (mono_aot_get_method): register all used strings
16084
16085 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16086
16087         * mini.c: always intern strings references with ldstr at compile time.
16088
16089 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16090
16091         * Makefile.am: add BUILT_SOURCES.
16092
16093 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16094
16095         * driver.c: give a better error message when the assembly to execute
16096         doesn't have an entry point.
16097
16098 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16099
16100         * Makefile.am: added hack for automake
16101
16102         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16103         correct sematics.
16104
16105         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16106
16107 22003-04-07  Martin Baulig  <martin@ximian.com>
16108
16109         * Makefile.am: Added Makefile.am.
16110
16111         * debugger-main.c: Removed, this is now in the debugger where it
16112         belongs.
16113
16114         * mini.pc.in: Call this package `mini' for the moment.
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128