2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
4
5 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6
7         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
8
9 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
10
11         * basic-simd.cs: Retrofit for API changes.
12
13 2008-10-10  Mark Probst  <mark.probst@gmail.com>
14
15         * mini-ppc.c: Handle integer stack arguments for tail calls.
16
17 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
18
19         * optflags-def.h: Removed sse3 optimization.
20
21         * driver.c: Same.
22
23         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
24         sse3.
25
26         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
27
28         * mini.h: Added enumeration with simd versions.
29
30         * simd-intrinsics.c (emit_intrinsics): Use the new static var
31         for detecting SSE3.
32
33         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
34
35         * mini.c (mini_init): Call mono_simd_intrinsics_init.
36
37 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
38
39         * basic-simd.cs: Added tests for Vector8u and Vector16u.
40
41         * basic-simd.cs: Fixed test naming.
42
43 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
44
45         * mini-ops.h: Added ops for packed and saturated math, shifts
46         and packing/unpacking.
47
48         * cpu-x86.md: Added descriptors for the above ops.
49
50         * mini-x86.c: Added code to emmit the above ops.
51
52         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
53
54 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
55
56         * aot-compiler.c (compile_method): Enable AOT for generic code.
57
58         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
59
60 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
61
62         * mini.c: add a workaround for a common screwup that ends up blamed
63         to mono (other processes blocking signal delivery).
64
65 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
66
67         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
68         in the LDFLD/STFLD opcodes. Fixes #432673.
69
70         * iltests.il.in: Add a new test.
71
72 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
73
74         * mini-arm.c: attach the thread in unmanaged->managed transitions
75         using delegates (bug #433148).
76
77 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
78
79        * basic-simd.cs: Use new ShuffleSel constants.
80
81 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
82
83         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
84
85         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
86         only disable simd intrinsics if no sse2 is detected.
87
88         * optflags-def.h: Added sse3.
89
90         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
91         is disabled.
92
93 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
94
95         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
96         when adding delegate-invoke wrappers.
97
98 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
99
100         * Makefile.am: Reenable the simd tests.
101
102 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
103
104         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
105           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
106           other vreg is allocated to that hreg.
107
108         Contributed under MIT/X11 license.
109
110 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
111
112         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
113         yet checked in.
114
115 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
116
117         * basic-simd.cs: New test suite for SIMD intrinsics.
118
119         * Makefile.am: Added new tests.
120
121 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
122
123         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
124
125         * mini-ops.h: Same.
126
127         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
128
129         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
130         using SSE2 aware opcodes.
131
132         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
133         is enabled, this code path is only reachable if conversion ops are emmited after
134         mono_method_to_ir.
135
136         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
137
138         This optimization saves 6 bytes per conversion against the old version.
139
140 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
141
142         * aot-compiler.c (compile_method): Don't skip methods referencing 
143         generic methods without a corresponding entry in token_info_hash, since
144         encode_method_ref () can handle all generic methods now.
145
146         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
147         generic context is set.
148         
149         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
150         generic sharing of LDTOKEN.
151
152 2008-10-06  Mark Probst  <mark.probst@gmail.com>
153
154         * mini-amd64.h: Temporarily disabled fast virtual generic method
155         calls because it breaks the System.Runtime.Remoting tests.
156
157 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
158
159         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
160
161         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
162         so inlining actually works.
163         (check_inline_caller_method_name_limit): Ditto.
164
165 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
166
167         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
168         64 bit safety (from Olaf Hering and Andreas Färber).
169
170 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
171         
172         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
173         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
174         unused virtual call support code.
175
176         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
177         
178         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
179         which can't use aot trampolines.
180         (decode_patch): Don't create aot trampolines for methods which can't use
181         them.
182
183         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
184         use aot trampolines.
185
186         * mini.h: Bump AOT image format version.
187         
188 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
189
190         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
191         to save_token_info () since cmethod is inflated for constrained calls.
192
193         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
194
195 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
196
197         * Makefile.am: Add build rules for ppc64.
198         This avoids the build failing at pedump with unresolved symbols
199         due to lack of arch_sources. Instead it will now fail earlier
200         due to lack of cpu-ppc64.md.
201
202         Contributed under MIT/X11 license.
203
204 2008-10-04  Mark Probst  <mark.probst@gmail.com>
205
206         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
207         tail calls.
208
209         * iltests.il.in: Add test case for tail call with many arguments.
210
211 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
212
213         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
214         to the fast virtual generic method code until the aot case is fixed.
215
216 2008-10-03  Mark Probst  <mark.probst@gmail.com>
217
218         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
219
220 2008-10-03  Mark Probst  <mark.probst@gmail.com>
221
222         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
223         thunks.
224
225 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
226         
227         * simd-intrinsics.c: Forgot to add this one.
228
229         * mini-codegen.c: Fix macro in case SIMD is not supported.
230
231 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
232         
233         This patch land initial JIT support for simd intrinsics.
234
235         * mini-x86.h: Added new define to make --enable_minimal work on x86.
236
237         * Makefile.am: Added simd-intrinsics.c
238
239         * simd-intrinsics.c: New file with simd instrinsic related
240         code.
241
242         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
243
244         * cpu-x86.md: Add simd related instructions.
245
246         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
247
248         * driver.c: Added two new --regression variants.
249
250         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
251
252         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
253
254         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
255         extract some complicated logic to helper functions.
256
257         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
258
259         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
260
261         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
262         the specialized simplification pass.
263
264         * method-to-ir.c (mono_spill_global_vars): Use new macro.
265
266         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
267
268         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
269         table.
270
271         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
272         if MONO_ARCH_NEED_SIMD_BANK is defined.
273
274         * mini-ops.h: Added the new simd ops.
275
276         * mini-x86.c: Added mono_arch_xregname.
277
278         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
279
280         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
281
282         * mini-x86.h: Define simd related MONO_ARCH macros.
283
284         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
285
286         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
287
288         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
289         MONO_CLASS_IS_SIMD to deal with simd related IR.
290
291         * mini.h (MonoInst): Added spill_var to the backend union.
292
293         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
294
295         * mini.h: Added forward declarations of the new simd fuctions.
296
297         * optflags-def.h: Added new optimization names SIMD.
298
299         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
300
301         * regalloc.h: Added support for working with 3 register banks.
302
303         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
304
305         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
306
307 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
308
309         * mini-exceptions.c: remove 64 bit related ifdef clutter.
310
311 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
312
313         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
314         instead of one on 64 bit systems.
315
316         * method-to-ir.c: Remove unused includes.
317
318 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
319
320         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
321         cfg->used_int_regs, since the two are different on arm.
322
323 2008-10-02  Mark Probst  <mark.probst@gmail.com>
324
325         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
326         mono_method_get_vtable_index() to get the vtable index.
327
328 2008-10-02  Mark Probst  <mark.probst@gmail.com>
329
330         * method-to-ir.c (mono_method_to_ir2): Don't create native
331         wrappers for array methods, because they're never called (and if
332         they were called they wouldn't work).
333
334 2008-10-02  Mark Probst  <mark.probst@gmail.com>
335
336         * method-to-ir.c (mono_method_to_ir2): Array methods are
337         special-cased and must not be invoked indirectly via the (M)RGCTX
338         when generic sharing is turned on.  Fixes #431413.
339
340 2008-10-01  Mark Probst  <mark.probst@gmail.com>
341
342         * method-to-ir.c: When generic sharing is active, call
343         non-interface virtual generic methods via the standard trampoline.
344
345         * mini-trampolines.c: Handle virtual generic shared methods.
346
347         * mini.h, mini-x86.c, mini-x86.h: New argument for
348         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
349         method thunks and which is the trampoline to call if the lookup
350         fails.  Enable the virtual generic method thunk for x86.
351
352         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
353         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
354         argument but assert that it's NULL, because these archs don't yet
355         implement the virtual generic method thunk.  Changes in the IMT
356         thunk data structures.
357
358 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
359
360         * aot-compiler.c (emit_globals): Avoid invalid characters in
361         the static linking symbol.
362
363         * objects.cs: Add a test for the range check optimization. Fix warnings.
364
365         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
366         optimization from the current JIT.
367
368         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
369         later in decompose_array_access_opts () to allow more optimizations.
370
371         * method-to-ir.c (mono_handle_soft_float): Rename this to 
372         mono_decompose_soft_float () for consistency.
373
374         * mini-ops.h: Fix arguments of OP_STRLEN.
375
376         * method-to-ir.c (save_cast_details): Extract the cast details saving code
377         into a separate function.
378         (reset_cast_details): Ditto.
379         (handle_unbox): Save cast details. Fixes #431254.
380
381         * method-to-ir.c: Remove some obsolete FIXMEs.
382
383 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
384
385         * ir-emit.h (alloc_dreg): Write a warning before crashing.
386
387 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
388
389         * mini-codegen.c: More work on macros to make them
390         ready for multiple regbanks.
391
392 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
393
394         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
395
396         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
397
398 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
399
400         * mini-codegen.c (mono_spillvar_offset): Proper support for
401         multiple regbanks.
402
403 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
404
405         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
406         the stack overflow changes.
407
408 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
409
410         * mini-codegen.c: Make all bank macros depend on reg_bank.
411
412         * mini-codegen.c (mono_local_regalloc): Make free mask
413         initialization regbank aware.
414
415 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
416
417         * mini-codegen.c (mono_local_regalloc): Extract callee
418         mask selection to a function and make it regbank aware.
419
420 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
421
422         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
423         code to deal with many regbanks.
424
425 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
426
427         * mini-codegen.c: More fp->regbank changes.
428
429 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
430
431         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
432         of a hardcoded constant.
433
434 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
435
436         * method-to-ir.c (type_from_stack_type): Fix typo.
437
438 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
439
440         * mini-ia64.c (emit_move_return_value): Convert float return values to
441         double.
442
443         * objects.cs: Add a new test.
444         
445         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
446         VARARG methods to fix an assert later.
447
448         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
449         end so it at least compiles.
450
451 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
452
453         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
454
455 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
456
457         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
458         optimization to a new function (emit_optimized_ldloca_ir) and enable
459         it for both ldloca and ldloca_s.
460
461 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
462
463         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
464         gshared CASTCLASS code.
465
466         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
467         amd64, where the libc stack unwinder encounters stack frames referring to
468         native code in unmapped memory.
469
470         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
471         sharing.
472
473         * generics.cs: Add new test.
474
475 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
476
477         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
478         add a check that one of the ARM_FPU_ constants is defined.
479
480         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
481         
482         * mini-exceptions.c: Fix build on non-altstack platforms.
483
484         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
485         sharing of vtypes.
486
487         * ir-emit.h: Add a comment to NEW_PCONST.
488
489         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
490
491         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
492
493         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
494         after the changes to MonoJitDomainInfo.
495
496 2008-09-27  Mark Probst  <mark.probst@gmail.com>
497
498         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
499
500 2008-09-27  Mark Probst  <mark.probst@gmail.com>
501
502         * mini-ppc.c: Compiler warning fixes.
503
504 2008-09-27  Mark Probst  <mark.probst@gmail.com>
505
506         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
507         for pinvokes.
508
509 2008-09-27  Mark Probst  <mark.probst@gmail.com>
510
511         * exceptions-ppc.c, mini-ppc.h: Compile
512         mono_arch_handle_altstack_exception() on Darwin, too.
513
514 2008-09-27  Mark Probst  <mark.probst@gmail.com>
515
516         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
517         work on archs which don't have generic sharing implemented, only
518         without the vtable_arg.
519
520 2008-09-26  Mark Probst  <mark.probst@gmail.com>
521
522         * mini.c: Added comment explaining why delegate ctor icall
523         wrappers are compiled.
524
525 2008-09-26  Mark Probst  <mark.probst@gmail.com>
526
527         * mini.c: Don't produce trampolines to delegate ctor icall
528         wrappers but compile them upfront.
529
530 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
531
532         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
533         runtime-set function when going back to managed code. Currently this
534         is used to set back the protection on the soft ovf pages and/or to
535         throw the stack overflow exception that happened in unmanaged code.
536
537 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
538
539         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
540         runtime-set function when going back to managed code. Currently this
541         is used to set back the protection on the soft ovf pages and/or to
542         throw the stack overflow exception that happened in unmanaged code.
543
544 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
545
546         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
547         the support code for restoring stack protection after stack overflows
548         that happen in unmanaged code. Don't set the exec permission on the
549         soft overflow area.
550
551 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
552
553         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
554         delegate->method_ptr is set. Fixes #428054.
555
556 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
557
558         * tests.cs: Rename to ratests.cs.
559
560         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
561         emit_get_rgctx_... functions.
562
563 2008-09-25  Mark Probst  <mark.probst@gmail.com>
564
565         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
566
567 2008-09-25  Mark Probst  <mark.probst@gmail.com>
568
569         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
570         before asserting that method is sharable.
571
572 2008-09-25  Mark Probst  <mark.probst@gmail.com>
573
574         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
575         whether method needs a static RGCTX wrapper used instead of
576         complex conditions.
577
578         * generic-sharing.c, mini.h: A few functions moved to
579         metadata/generic-sharing.c.
580
581 2008-09-25  Mark Probst  <mark.probst@gmail.com>
582
583         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
584         Generic code sharing for value types, which essentially means
585         treating value type methods like static methods.  The RGCTX is
586         passed in the same way.
587
588 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
589
590         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
591         opcode when creating multi-dimensional arrays of open types.
592
593         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
594         open generic types.
595
596         * generics.cs: Add a test.
597
598         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
599
600 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
601
602         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
603
604         * mini.c (mini_method_compile): Set it when running under the debugger. 
605
606         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
607         vreg optimization if the flag is set.
608
609         * driver.c (mono_main): Add --attach= option to pass options to
610         the attach agent.
611
612         * mini.c (sigquit_signal_handler): Start the attach agent.
613
614         * ssapre.c: Disable this to save space since it is not yet ported to
615         linear IR.
616
617         * regalloc2.c: Disable this to save space.
618
619         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
620
621 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
622
623         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
624         the -v option useful again.
625
626 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
627
628         * mini-amd64.c (mono_arch_output_basic_block): Add support for
629         --break-at-bb.
630
631         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
632         arrays of arrays. Fixes #428406.
633
634         * method-to-ir.c (mini_emit_castclass): Ditto.
635
636         * objects.cs: Add new test.
637         
638 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
639
640         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
641         was wrong at it choked against target_type_is_incompatible for byref types.
642
643 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
644
645         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
646         places.
647
648 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
649
650         * mini-exceptions.c: update a few more exceptions-related counters.
651
652 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
653
654         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
655         new functions to allocate from persistent mempools.
656
657 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
658
659         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
660         multiple register banks in the future.
661
662         * mini-codegen.c (mono_local_regalloc): Fix a warning.
663
664 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
665
666         * mini.c (type_to_eval_stack_type): Remove duplicated function.
667
668         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
669
670         * mini.h: Export type_to_eval_stack_type.
671
672         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
673         is only ins->klass of byref types.
674
675 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
676
677         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
678         (mini_emit_memcpy2): Ditto.
679
680         * mini-amd64.c: Fix a warning.
681
682 2008-09-21  Mark Probst  <mark.probst@gmail.com>
683
684         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
685         linking.
686
687 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
688
689         * method-to-ir.c: Extract stloc micro-optimization to a
690         function and apply it to all cases.
691
692 2008-09-19  Mark Probst  <mark.probst@gmail.com>
693
694         * method-to-ir.c: Don't fail generic code sharing in cases we
695         already support.
696
697 2008-09-18  Mark Probst  <mark.probst@gmail.com>
698
699         * mini-ppc.c: Handle structs in tailcalls on Darwin.
700
701 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
702
703         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
704         implementation.
705
706 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
707
708         * trace.c: make tracing more useful and correct, with per-thread
709         id and indent info.
710
711 2008-09-15  Mark Probst  <mark.probst@gmail.com>
712
713         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
714         doing a method call and the argument is an R4.
715
716 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
717
718         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
719         generic methods.
720
721 2008-09-13  Mark Probst  <mark.probst@gmail.com>
722
723         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
724
725 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
726
727         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
728         (MONO_JUMP_TABLE_FROM_INS): Ditto.
729
730 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
731
732         * driver.c: Add a --agent argument (not supported yet) to load managed
733         agent assemblies before loading the main assembly, similarly to how the
734         Java VM handles agents.
735
736 2008-09-11  Mark Probst  <mark.probst@gmail.com>
737
738         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
739         function to do stack layout of local variables.
740
741 2008-09-11  Mark Probst  <mark.probst@gmail.com>
742
743         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
744         calculation.
745
746 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
747
748         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
749         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
750         JIT if DISABLE_JIT is defined.
751
752         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
753         defined.
754
755 2008-09-10  Mark Probst  <mark.probst@gmail.com>
756
757         * iltests.il.in: Disable the fconv test on PPC (the result is
758         undefined according to ECMA).
759
760 2008-09-10  Mark Probst  <mark.probst@gmail.com>
761
762         * iltests.il.in: Enable tail call tests for PPC.
763
764         * mini.h: Add variable for storing incoming valuetype argument
765         addresses for tail calls.
766
767         * mini-ppc.c: Implement valuetype arguments and return values for
768         tailcalls on Linux.
769
770 2008-09-09  Mark Probst  <mark.probst@gmail.com>
771
772         * mini-ppc.c: Partially implement tail calls (struct arguments and
773         return values not supported).
774
775         * method-to-ir.c: Enable tail calls on PPC.
776
777 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
778
779         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
780         runtime-invoke wrappers to work around the problem of them getting
781         assigned to a random class.
782
783         * aot-runtime.c (mono_aot_get_method): Ditto.
784         
785 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
786
787         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
788         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
789
790 2008-09-07  Mark Probst  <mark.probst@gmail.com>
791
792         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
793         until they're implemented properly.
794
795         * exceptions-ppc.c: Use arch-independent exception-handling code
796         instead of custom one.
797
798         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
799         for Linear IR.
800
801         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
802
803         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
804         applies when __powerpc__ is defined.
805
806 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
807
808         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
809         methods to their code to avoid computing the full name of wrappers and
810         doing a lookup in a string hash table.
811
812 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
813
814         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
815         we identify bblocks before method_to_ir () is ran.
816
817         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
818         Also avoid optimizing branches pointing to themselves.
819
820         * mini.c (mini_method_compile): Ditto. Fixes #422947.
821
822 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
823
824         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
825
826 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
827
828         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
829         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
830         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
831         'buf'.
832
833         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
834         jumped to the same entry in plt_jump_table.
835
836 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
837
838         * method-to-ir.c (initialize_array_data): Handle field with RVA from
839         dynamic images.
840
841 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
842
843         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
844         other assignment can be if converted. Saves 1.5% on corlib size and fixes
845         #421807.
846
847 2008-08-29  Geoff Norton  <gnorton@novell.com>
848
849         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
850         segment, and doesn't properly handle .space as .text.  Fixes
851         AOT Mach/ARM
852
853 2008-08-29  Geoff Norton  <gnorton@novell.com>
854
855         * mini.c: Disable the mach exception handler when running on 
856         ARM
857
858 2008-08-29  Geoff Norton  <gnorton@novell.com>
859
860         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
861         globals on Darwin/ARM
862
863 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
864
865         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
866         since too many things depend on it. Instead, call 
867         mono_runtime_set_no_exec ().
868         
869         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
870         the new JIT.
871
872         * aot-compiler.c: Add an 'asm-only' AOT option.
873
874         * mini.c: Avoid initializing the runtime when doing AOT compilation.
875                 
876         * aot-compiler.c (compile_method): Disable gshared support for now as it
877         doesn't yet work.
878
879 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
880
881         * mini-amd64.h : Fix a compiler warning.
882
883         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
884           Changed to use a callback function to retrieve the unwind info.
885           This avoids problems observed when code blocks were removed by
886           unloading an app domain.
887
888         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
889           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
890           to work properly.
891
892         Contributed under MIT/X11 license.
893
894 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
895
896         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
897           case to keep the stack aligned to 8.
898
899         Contributed under MIT/X11 license.
900
901 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
902
903         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
904         avoid repeated linear searches.
905
906 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
907
908         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
909         methods it can't handle.
910         
911         * aot-compiler.c (add_method): Avoid adding a method twice.
912         (add_wrappers): Add runtime invoke wrappers for all methods.
913
914         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
915         function to create an aot-compatible version of this trampoline.
916
917         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
918
919 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
920
921         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
922
923         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
924         with a generic sharing failure.
925
926         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
927
928         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
929         CEE_RETHROW. Fixes #419634.
930
931         * mini.c (mono_method_to_ir): Ditto.
932
933         * exceptions.cs: Add a new test.
934         
935         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
936         to mono_type_stack_size_internal () since some callers might not pass in
937         an rgctx.
938
939         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
940         instrument_prolog. Fixes #419878.
941
942         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
943         doubles in soft float mode volatile.
944
945 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
946
947         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
948
949         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
950         to handle soft float correctly.
951
952         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
953         the fast path.
954
955         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
956
957         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
958         to sp, since the generics catch code requires it.
959
960         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
961         copying.
962
963         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
964         mono_arch_emit_imt_argument ().
965
966         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
967
968         * mini-arm.c tramp-arm.c: Generic sharing updates.
969
970 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
971
972         * mini-arm.c: Fix the arm build.
973
974         * generic-sharing.c (mini_type_get_underlying_type): New helper function
975         handling enums, generic instances and generic sharing.
976         (mini_type_stack_size_full): Ditto.
977
978         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
979         
980         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
981
982         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
983
984         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
985         trampolines.
986
987         * mini-arm.c: Various small generic sharing changes.
988
989         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
990         this for x86.
991         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
992         custom code.
993
994         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
995         helper function to return a generic class init trampoline.
996
997         * method-to-ir.c mini.c: Use it.
998         
999         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1000         arch-specfic function to return a generic class init trampoline.
1001
1002         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1003         the GENERIC_CLASS_INIT custom code.
1004
1005         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1006         a fatal error, not a sharing failure.
1007
1008         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1009         needed.
1010
1011         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1012         trampoline argument from MONO_ARCH_VTABLE_REG.
1013
1014         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1015         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1016         argument, and pass the vtable in VTABLE_REG.
1017
1018         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1019         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1020         argument, and pass the vtable in VTABLE_REG.
1021         (mono_arch_create_trampoline_code_full): Remove some special casing for
1022         the rgctx fetch trampoline.
1023
1024         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1025         Fixes #419273.
1026
1027         * iltests.il: Add a test for it.
1028
1029 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1032
1033         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1034         no longer needed.
1035
1036         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1037         use mono_jit_info_table_find () to avoid recursion.
1038         (mono_delegate_trampoline): Add a sync wrapper here.
1039
1040         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1041         here.
1042
1043         * mini.c (mono_method_to_ir): Ditto.
1044         
1045         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1046         add_sync_wrapper argument. Don't add a sync wrapper here.
1047         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1048
1049         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1050         
1051 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1052
1053         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1054           of nonvolatile registers back from MonoContext to CONTEXT.
1055
1056         Contributed under MIT/X11 license.
1057
1058 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1059
1060         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1061           arguments on Winx64 there are only 4 argument registers.  For this
1062           logic to work the last argument must be pulled from the stack.  
1063
1064         Contributed under MIT/X11 license.
1065
1066 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1067
1068         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1069
1070         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1071         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1072         encode/decode_method_ref ().
1073
1074         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1075
1076         * aot-runtime.c (decode_patch): Ditto.  
1077
1078         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1079         MONO_PATCH_INFO_METHOD.
1080
1081         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1082         MonoGenericJitInfo.
1083
1084         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1085         MonoGenericJitInfo.
1086
1087         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1088
1089         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1090         one from the caller.
1091
1092         * aot-runtime.c (decode_generic_inst): New function to decode and
1093         return a interned generic inst.
1094         (decode_klass_ref): Use it.
1095         (decode_method_ref): Ditto.
1096
1097         * aot-compiler.c (emit_exception_debug_info): Save 
1098         jinfo->has_generic_jit_info too.
1099
1100 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1101
1102         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1103
1104         * iltests.il.in: Add a test for fconv_to_i.
1105
1106         * liveness.c: Disable the liveness2 pass for now to save space.
1107
1108         * regalloc2.c: Include mempool-internals.h to fix warnings.
1109
1110         * aot-compiler.c (encode_method_ref): Encode the context of generic
1111         instance methods.
1112
1113         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1114         the context saved in the aot file.
1115
1116         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1117
1118         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1119
1120         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1121         volatile so they won't be optimized away.
1122
1123 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1124
1125         * ssa.c:
1126         * ssa2.c:
1127         * mini.c:
1128         * regalloc2.c:
1129         * dominators.c: Remove duplicated functions that now are in
1130         mempool-internals.h.
1131
1132 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * aot-compiler.c: Fix warnings.
1135
1136         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1137
1138         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1139
1140         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1141         as the patch type.
1142
1143         * mini.c (mono_resolve_patch_target): Ditto.
1144         
1145         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1146         (encode_klass_ref): Add support for encoding VARs/MVARs.
1147
1148         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1149
1150         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1151         the handling of the got entries into a separate 'decode_got_entry' function.
1152         Add support for RGCTX_FETCH.
1153
1154         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1155         clobbered by the trampoline code.
1156
1157         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1158         not clobbered by the indirect calling code.
1159
1160 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1161
1162         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1163         to fix the build.
1164
1165 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1166
1167         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1168         signature using the compilation mempool otherwise we would leak it.
1169
1170 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1171
1172         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1173         mono_emit_abs_call ().
1174
1175         * patch-info.h: Add GENERIC_CLASS_INIT.
1176
1177         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1178
1179         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1180         as their target as a near call.
1181
1182         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1183         ABS handling code.
1184         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1185
1186         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1187         call to a runtime function described by a patch.
1188
1189         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1190         mono_emit_abs_call, this has the advantage that the ABS handling code in
1191         mono_codegen () can handle them both, and can handle other stuff in the
1192         future without additional code.
1193
1194         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1195         entry.
1196         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1197         abs addresses.
1198
1199         * mini.h: Add missing bblock related prototypes.
1200
1201         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1202         reverse_inst_list_len fields.
1203
1204         * mini.c: Refactor this file a bit by moving branch optimizations to 
1205         branch-opts.c.
1206
1207         * method-to-ir.c: Merge generic sharing changes missed earlier.
1208
1209         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1210
1211         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1212         shared patches. Process METHODCONST as a shared patch.
1213
1214         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1215         as it crashes on the 2.0 mscorlib.
1216
1217         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1218         to cause crashes.
1219         
1220         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1221         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1222         by IMT.
1223
1224         * aot-compiler.c: Reorganize the got handling code to be a bit more
1225         understandable.
1226
1227 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1228
1229         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1230         mono_patch_info_equals/hash, and use it to massively simplify
1231         get_plt_index ().
1232
1233         * mini.c (mono_patch_info_hash): Simplify this and add support for
1234         more patch types.
1235
1236         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1237
1238         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1239         handling code, since an offset is not enough to identify a trampoline.
1240
1241         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1242
1243 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1244
1245         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1246
1247         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1248
1249         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1250
1251         * decompose.c: PPC decompositions for various ops.
1252
1253         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1254
1255 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1256
1257         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1258         call the generic trampoline code using a call, instead of a jump, to
1259         remove some special casing from the generic trampoline code.
1260
1261         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1262         (mono_codegen): Ditto.
1263
1264         * aot-compiler.c aot-runtime.c: Ditto.
1265
1266         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1267
1268         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1269         helper function to find the offset corresponding to a lazy fetch trampoline.
1270
1271         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1272         when doing generic sharing.
1273
1274         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1275         places.
1276         
1277         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1278         mini-trampolines.c to be with the other trampoline creation functions.
1279
1280         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1281         as it is equal to method->signature in most cases, add a 
1282         mono_emit_method_call_full variant which takes a signature and an imt
1283         argument as well.
1284
1285 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1286
1287         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1288         to this function, since it could be computed easily from the method 
1289         argument.
1290         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1291         more.
1292
1293         * method-to-ir.c mini.c: Remove references to 
1294         compile_generic_method_wo_context.
1295
1296         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1297         generic method calls.
1298         
1299         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1300         dimensional non-szarrays.
1301
1302         * mini.c (mini_init): Register mono_array_new_1.
1303
1304         * jit-icalls.c (mono_array_new_1): New jit icall.
1305
1306         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1307         pointing to the method.
1308
1309         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1310         method addresses belonging to METHOD_JUMP patches in the 
1311         jump_target_got_slot_hash.
1312         (mono_aot_load_method): Ditto.
1313
1314         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1315         METHOD_JUMP patches.
1316
1317         * mini.c (mini_create_jit_domain_info): New helper function which 
1318         initializes/frees domain->runtime_info.
1319         (mini_free_jit_domain_info): Ditto.
1320         (mini_init): Install the domain hook functions with the runtime.
1321
1322         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1323         information maintained by the JIT.
1324
1325         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1326         insertion into jump_table_hash into mono_codegen (), also implement proper
1327         locking.
1328
1329         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1330         tail calls, it is already done by the aot code.
1331         
1332         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1333         mechanism on amd64.
1334
1335         * iltests.il.in: Make the jmp test a bit more complex.
1336
1337         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1338         generic instances which doesn't have a token.
1339
1340         * aot-runtime.c (decode_method_ref): Ditto.
1341         
1342         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1343         can handle this case now.
1344         (handle_box): Ditto.
1345
1346 2008-08-15  Geoff Norton  <gnorton@novell.com>
1347
1348         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1349         debugging check.
1350
1351 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1352
1353         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1354         calling generic methods.
1355
1356         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1357
1358         * aot-runtime.c (decode_patch_info): Ditto.
1359
1360         * mini.c (mono_resolve_patch_target): Ditto.
1361         
1362         * patch-info.h: Add METHOD_RGCTX.
1363
1364         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1365
1366 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1367
1368         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1369         arguments in registers.
1370
1371         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1372         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1373
1374         * mini.c (mini_method_compile): Abort aot compilation for generic
1375         methods if generic sharing is disabled.
1376         
1377         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1378         an mrgctx.
1379
1380         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1381         requiring an mrgctx.
1382
1383         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1384         store instructions when converting a vcall to a normal call.
1385
1386         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1387         mono_arch_find_jit_info.
1388
1389 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1390
1391         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1392         avoid calling mono_method_full_name () for every method even if the
1393         env var is not set.
1394         (check_inline_caller_method_name_limit): Ditto.
1395
1396 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1397
1398         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1399         assemblies in one run.
1400
1401         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1402         skipped methods if it is not 0.
1403
1404         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1405
1406 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1407
1408         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1409           MONO_ARCH_HAVE_UNWIND_TABLE.
1410
1411         Contributed under MIT/X11 license.
1412
1413 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1414
1415         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1416           from default optimizaton list on Winx64.
1417
1418         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1419
1420         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1421           the LMF from the MonoJitTlsData structure.
1422
1423         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1424
1425         Contributed under MIT/X11 license.
1426
1427 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1428
1429         * mini.c (sigsegv_signal_handler): Fix the build.
1430
1431         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1432         assembly->aot_module.
1433
1434         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1435         hash table. This simplifies and speeds up a lot of code, and fixes support
1436         for .netmodules.
1437
1438         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1439         with the runtime.
1440
1441         * mini-exceptions.c: Ditto.
1442         
1443         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1444         'native_offset' argument, since these are computed in the 
1445         mono_find_jit_info () function.
1446
1447         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1448         is used by exceptions-ppc.c.
1449
1450         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1451         mono_arch_find_jit_info ().
1452         
1453         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1454         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1455         generic code in mini-exceptions.c.
1456
1457 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1458
1459         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1460
1461         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1462         
1463         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1464         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1465         called while holding the loader lock. Fixes #415608.
1466         (mono_aot_get_method_from_token_inner): Ditto.
1467
1468 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1469
1470         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1471         to reduce differences between this and the generic implementation in
1472         mini-exceptions.c.
1473         (ves_icall_get_frame_info): Ditto.
1474
1475         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1476
1477         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1478         longer neccesarry.
1479
1480         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1481         mono_arch_get_call_filter () and make it non-static, for consistency with the
1482         other architectures.
1483
1484 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1485
1486         * mini.c:
1487         * local-propagation.c:
1488         * mini-x86.c: Correct the name of arch defines.
1489
1490 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1491
1492         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1493         NO_EMULATE_LONG_SHIFT_OPS define.
1494
1495 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1496
1497         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1498         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1499
1500         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1501         MACH fixes. Merged from the 2.0 branch.
1502
1503         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1504
1505         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1506         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1507
1508         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1509
1510         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1511         mono_marshal_get_native_wrapper () signature changes.
1512
1513 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1514
1515         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1516         conversion bug under arm.
1517
1518 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1519
1520         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1521
1522         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1523         with overflow checking.
1524
1525 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1526
1527         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1528         to the genmdesc.pl file
1529
1530 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1531
1532         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1533         arg_array in the soft-float versions of the LOAD/STORE macros.
1534
1535         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1536         implementation.
1537
1538         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1539
1540 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1541
1542         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1543         a float HFA. Fixes #413621.
1544
1545 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1546
1547         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1548         frame_size to args_size. Fixes build.
1549
1550 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1553         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1554
1555         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1556         the stack are not unaligned. Fixes #413247.
1557         
1558 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1559
1560         * mini.c: update jitted methods performance counters.
1561
1562 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1563
1564         * mini-exceptions.c: increase the exceptions thrown performance
1565         counter in mono_handle_exception ().
1566
1567 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1568
1569         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1570         can work with netmodules.
1571
1572 2008-07-28  Geoff Norton  <gnorton@novell.com>
1573
1574         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1575         regression tests.
1576
1577 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1578
1579         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1580         correct place.
1581
1582 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1583
1584         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1585           The float param registers and other param registers must be the 
1586           same index on Windows x64.
1587
1588         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1589           ArgValuetypeAddrInIReg argument case.  Setting the argument
1590           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1591
1592         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1593           variable computed above as the copy length for arguments of storage
1594           type ArgValuetypeAddrInIReg.
1595
1596         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1597           ArgValuetypeAddrInIReg argument case.  This case will rely on
1598           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1599
1600         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1601           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1602           jump and tail call instructoins as they do not follow the typical call behavior.
1603
1604         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1605           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1606           local variable and pass the local variable by reference to the called method.
1607
1608         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1609           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1610           of a struct is passed in a register it must be saved with the other
1611           volatile argument on the stack.
1612
1613         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1614           frame pointer the stack adjustment value must be saved to the unwind 
1615           info structure.
1616
1617         Contributed under MIT/X11 license.
1618
1619 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1620
1621         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1622         which got lost in the merge.
1623
1624 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1627         build.
1628
1629         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1630         
1631         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1632         icalls, since they won't be patched.
1633
1634         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1635         different code sequence when running under valgrind to prevent some valgrind
1636         errors.
1637
1638         * iltests.il.in: Add new regression test.
1639
1640         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1641         end with a throw.
1642
1643         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1644         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1645
1646         * iltests.il.in: Add new test.
1647
1648         * aot-compiler.c: Fix some warnings.
1649
1650         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1651         Fixes #412494.
1652
1653 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1654
1655         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1656         (mini_usage_jitdeveloper): Add a missing --wapi option.
1657
1658 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * mini-codegen.c: Simplify the is_fp macros.
1661         (free_up_ireg): Remove, use free_up_reg instead.
1662         (free_up_reg): Fix the fp case.
1663
1664 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1665
1666         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1667         lowered earlier.
1668
1669         * exceptions-x86.c: Merge some changes which seemed to have got lost
1670         in the linear-ir merge.
1671
1672         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1673
1674         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1675         long vreg volatile even if the variable was already created.
1676
1677         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1678         volatile variables.
1679
1680 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1683
1684         * mini.c (mono_jit_compile_method_inner): Add support for 
1685         MONO_EXCEPTION_BAD_IMAGE.
1686
1687         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1688         mini_method_get_context () returns NULL. Fixes #356531.
1689
1690         * mini.c (mono_method_to_ir): Ditto.
1691         
1692         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1693         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1694
1695 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1696
1697         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1698         in the LDFTN implementation.
1699
1700 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1701
1702         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1703         code, patch calls to icalls, too, even if they're not in the
1704         shared generic code hash.  Fixes #411962.
1705
1706 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * cpu-x86.md: Increase the length of the fcall opcodes.
1709
1710         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1711         calls returning floats.
1712
1713         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1714         on NEWARR.
1715         
1716         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1717         missed earlier.
1718
1719         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1720         into the domain->method_code_hash.
1721
1722         * aot-compiler.c: Fix win32 build.
1723
1724         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1725         
1726         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1727         gshared NEWARR implementation.
1728
1729         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1730
1731         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1732         can be used outside of method_to_ir.
1733
1734         * mini.h (MonoCompile): Add arg_types field.
1735
1736         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1737         
1738         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1739         the values of the local arg_array and param_types array.
1740
1741 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1744         got accesses might only get generated later when NEWOBJ is decomposed.
1745         
1746         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1747         looking up the native code of the target method when a delegate is called
1748         for the first time.
1749
1750         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1751         optimization.
1752
1753         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1754
1755         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1756         AOT work on platforms without a working dlsym implementation.
1757
1758         * mini.h: Bump AOT image format version.
1759         
1760 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1761
1762         * mini-exceptions.c: Free a MonoType with
1763         mono_metadata_free_type() instead of g_free().
1764
1765         * aot-runtime.c: Free a MonoType.
1766
1767 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1768
1769         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1770         optimization.
1771
1772         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1773         fp stack on x86.
1774
1775 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1776         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1777         profiler hook.
1778
1779 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1780
1781         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1782         NEWOBJ calls on valuetypes.
1783
1784         * iltests.il.in: Add new test.
1785
1786         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1787
1788 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1789
1790         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1791         is no longer needed.
1792
1793         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1794         non register sized integer arguments.
1795         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1796         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1797         emit_memcpy2 ().
1798
1799         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1800         CEE_MONO_RETOBJ.
1801         
1802         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1803         two a binop with different sized arguments is emitted.
1804
1805         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1806         instruction in the ins==NULL case.
1807
1808 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1809
1810         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1811
1812         * mini-x86.c: Fix osx build.
1813
1814         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1815         opcodes as well.
1816
1817         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1818         instruction for non int sized variables.
1819
1820         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1821         implementation.
1822
1823 2008-07-23  Robert Jordan  <robertj@gmx.net>
1824
1825         * method-to-ir.c: Fix MSVC build.
1826
1827 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1828
1829         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1830         a non int sized type, widen it to an int since newer versions of gcc seem to
1831         generate code which needs this.
1832
1833         * ssa2.c abcremoval2.c: Fix warnings.
1834
1835         * *: Merge the Linear IR branch.
1836
1837         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1838         the ChangeLog file there describes all the changes done over the years. 
1839         Further documentation can be found at www.mono-project.com/Linear_IL.
1840
1841 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1842
1843         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1844           The float param registers and other param registers must be the 
1845           same index on Windows x64.
1846
1847         Contributed under MIT/X11 license.
1848
1849 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1850
1851         * mini.c: Make the previous fix GC safe.
1852
1853 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1854
1855         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1856
1857 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1858
1859         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1860           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1861           ArgValuetypeAddrInIReg instead.
1862
1863         Contributed under MIT/X11 license.
1864
1865 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1866
1867         * mini-codegen.c (get_register_spilling): Fix a warning.
1868
1869 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1870
1871         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1872         for types which the initialization fails. Raises the provided exception
1873         at the right stop after cleanup.
1874
1875 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1876
1877         * aot-compiler.c: Free most of the memory allocated during compilation.
1878
1879         * mini.c (mini_parse_debug_options): Fix a leak.
1880         
1881         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1882         during aot compilation.
1883
1884 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1887         it has too much register pressure.
1888
1889 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1890
1891         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1892
1893 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1894
1895         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1896         on x86.
1897
1898         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1899         on amd64 similar to the way it is done on arm.
1900
1901         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1902
1903         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1904         consistency, normalize error messages, avoid loading aot-only modules in
1905         normal mode.
1906
1907         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1908         for consistency.
1909
1910         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1911
1912 2008-07-11  Martin Baulig  <martin@ximian.com>
1913
1914         * debug-debugger.h
1915         (MonoDebuggerInfo): Add `interruption_request'.
1916
1917 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1918
1919         * aot-compiler.c (emit_plt): Remove some dead code.
1920
1921         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1922
1923         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1924         return the plt info offset belonging to a given plt entry.
1925
1926         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1927         mono_aot_get_plt_info_offset.
1928         
1929         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1930         similar to the amd64 code by makeing jumps through a separate jump table 
1931         instead of embedding the jump addresses into the code.
1932
1933 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1934
1935         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1936         method.
1937
1938 2008-07-10  Martin Baulig  <martin@ximian.com>
1939
1940         * mini.c (mini_method_compile): Disable generics sharing when
1941         running in the debugger.
1942
1943 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1946
1947         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1948         the local register allocator from running out of registers on x86 when 
1949         using aot.
1950
1951 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1952
1953         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1954         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1955         C4146.
1956
1957         Contributed under MIT/X11 license.
1958
1959 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1960
1961         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1962         speed up the assembler.
1963
1964 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1965
1966         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1967         support.
1968
1969         * mini.c: Move the soft float handling macros a bit earlier, add 
1970         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1971         place.
1972
1973         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1974
1975         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1976         read-only to help catch code allocation requests.
1977         
1978         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1979         and turn it off when using --aot-only or when compiling with --aot=full.
1980
1981         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1982         jump table for switches from the normal domain mempool, not the code
1983         manager.
1984
1985         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1986         unbox trampoline which handles aot-only mode too.
1987
1988         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1989         an AOTed unbox trampoline.
1990
1991         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1992
1993 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1994
1995         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1996         ""
1997
1998         Contributed under MIT/X11 license.
1999
2000 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2001
2002         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2003           the unwind information for the method at the end of the allocated block.
2004           
2005         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2006           MonoCompileArch to hold the unwind info for SEH on Winx64
2007         
2008         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2009           frame pointer info for the method being compiled.
2010           
2011         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2012           the call to mono_exception_from_token.
2013           
2014         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2015           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2016           information is stored a the end of the method block because it is all 32-bit offset based.
2017
2018         Contributed under MIT/X11 license.
2019
2020 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2021
2022         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2023
2024         * wapihandles.c: Fix warnings.
2025
2026         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2027         mode.
2028
2029         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2030         mono_jit_compile_method in aot-only mode since that calls the type 
2031         initializer.
2032         
2033         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2034         get_delegate_invoke_impl in aot-only mode.
2035
2036         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2037
2038 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2039
2040         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2041
2042         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2043         is on by default.
2044
2045         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2046
2047         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2048         init trampoline from the AOT file as well.
2049
2050         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2051         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2052         code.
2053
2054         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2055         mono_init.
2056
2057         * exceptions-amd64.c: Add _full variants for the remaining exception code
2058         creation functions as well, allow emission of relocatable code, remove
2059         caching since that is now done by the caller.
2060
2061         * mini-exceptions.c: Add _full variants for the remaining exception code
2062         creation functions as well, add aot-only support.
2063
2064         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2065         if we can determine a proper token for them.
2066         (add_wrappers): Add a few more wrappers.
2067         (emit_method_code): Remove some dead code.
2068         (emit_trampolines): Emit exception code too.
2069
2070         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2071
2072         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2073         mono_array_new_va which avoids varargs.
2074
2075         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2076
2077         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2078         mono_arch_create_specific_trampoline () in all places.
2079
2080         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2081         a bit so it can be used for other things as well.
2082         
2083         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2084         on demand as well.
2085
2086         * exceptions-amd64.c: Rename the caching from the exception code creation
2087         functions, it is done by the caller instead.
2088         
2089         * exceptions-amd64.c: Change the signature of the exception code creation 
2090         functions to allow the creation of relocatable code later.
2091
2092         * mini-exceptions.c: Add a set of functions to query the various 
2093         runtime-generated exception functions.
2094
2095         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2096         mono_arch_.. () functions.
2097         
2098 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2099
2100         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2101
2102         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2103
2104         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2105         (mini_get_vtable_trampoline): Ditto.
2106
2107         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2108         code in the AOT case by returning the code size and a list of relocations to
2109         the caller.
2110
2111         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2112
2113 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2114
2115         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2116           clean the stack.
2117
2118         Contributed under MIT/X11 license.
2119
2120 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2121
2122         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2123         so the buffer size can be computed correctly. Fixes #404735.
2124
2125         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2126         normally as cfg->debug_info is already freed.
2127
2128 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2129
2130         * mini-amd64.c: For calls returning vtypes in registers, don't store
2131         the return address on the stack, instead allocate a separate local for
2132         it. Fixes #404729.
2133
2134 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2135
2136         * mini-trampolines.c, mini.h: Add an argument to
2137         mono_create_jit_trampoline_in_domain() for turning off the adding
2138         of the sync wrapper.
2139
2140         * mini.c: Use the JIT trampoline without sync instead of
2141         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2142         be patched.
2143
2144 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2145
2146         * driver.c: Turn on GSHARED optimization by default.
2147
2148 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2149
2150         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2151         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2152
2153         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2154         create a variant of the generic trampoline code callable from AOTed trampolines.
2155
2156         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2157         trampoline code callable from AOTed trampolines.
2158
2159         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2160
2161 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2162
2163         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2164         pass-through manner.
2165
2166         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2167         and don't fail sharing for them anymore.
2168
2169         * mini-exceptions.c: Handle exceptions in shared generic methods.
2170
2171         * generic-sharing.c: When checking the context of a generic
2172         method, also check its class's context.  Don't treat wrappers as
2173         sharable.
2174
2175         * mini-trampolines.c: Some code factored out to
2176         metadata/generic-sharing.c.  Handle the MRGCTX case.
2177
2178         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2179         we must deal with the method being of another instantiation of the
2180         class.  Add static rgctx invoke wrappers to generic methods.
2181
2182 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2183
2184         * mini.c: Provide all jit infos of generic shared methods with a
2185         generic jit info.
2186
2187         * mini-exceptions.c: Handle the new situation that a generic info
2188         might be available, but not info about the this/vtable/mrgctx
2189         variable.
2190
2191 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2192
2193         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2194         generic methods.
2195
2196 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2197
2198         * dominators.c (check_dominance_frontier): Fix a warning.
2199
2200         * mini.h: Add some missing prototypes.
2201
2202         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2203
2204         * driver.c (mono_jit_init_version): Correct the comments since the first
2205         argument should be the name of the root domain, not a filename.
2206
2207         * aot-runtime.c (make_writable): Error out if this is called while running
2208         with --aot-only.
2209         (load_aot_module): Ditto.
2210
2211         * aot-compiler.c: Really fix the computation of method indexes.
2212
2213         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2214         optimizations as this is no longer called frequently.
2215
2216         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2217         method and the invoke impl code and pass it to the delegate trampoline instead of
2218         just the delegate class.
2219
2220 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2221
2222         * aot-compiler.c: Fixup the computation of method indexes.
2223         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2224         the method builder infrastructure.
2225
2226         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2227         has no header.
2228
2229         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2230         mode, load the method right away instead of creating a trampoline.
2231
2232         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2233
2234         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2235         some checks a bit.
2236
2237 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2238
2239         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2240         (mono_aot_load_method): Use method_index instead of method->token.
2241
2242         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2243         can handle icalls etc. properly.
2244
2245         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2246
2247         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2248
2249         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2250         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2251         JIT_ICALL_ADDR patch type.
2252
2253         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2254
2255         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2256         request flag.
2257         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2258
2259         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2260
2261 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2262
2263         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2264         domain->jit_code_hash.
2265
2266 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2267
2268         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2269
2270 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2271
2272         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2273         get_this_arg_from_call, let it compute it when needed.
2274
2275         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2276         gsctx from code only when needed.
2277
2278         * mini-trampolines.c (get_generic_context): Rename this to 
2279         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2280         it can be called by the arch backends.
2281
2282         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2283
2284 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2285
2286         * driver.c (mono_main): Add experimental --aot-only command line option.
2287
2288         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2289         set.
2290
2291 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2292
2293         * driver.c (DllMain): Remove mono_module_handle.
2294
2295         Contributed under MIT/X11 license.
2296
2297 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2298
2299         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2300         for emitting methods which are not in the source assembly. Detect and report
2301         failure of assembling+linking.
2302         
2303         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2304
2305         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2306
2307 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2308
2309         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2310
2311 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2312
2313         * mini.h: Remove some obsolete prototypes.
2314
2315         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2316
2317 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2318
2319         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2320         supported by Visual Studio, so use alloca().
2321
2322 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2323
2324         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2325         Fixes #402585.
2326
2327 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2328
2329         * mini.c: Fail sharing of a generic method if it contains an open
2330         catch clause (because we don't pass MRGCTXs yet).
2331
2332 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2333
2334         * mini.c: When compiling a method with generic sharing, insert the
2335         method instantiated with an all-Object generic context into the
2336         jit info table, instead of the context of the first instantiation
2337         of the method we happen to compile.
2338
2339 2008-06-18  Martin Baulig  <martin@ximian.com>
2340
2341         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2342         `major_version' and `minor_version'.
2343
2344 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2345
2346         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2347         mono_method_is_generic_sharable_impl() takes an additional
2348         argument specifying whether to treat type variables as reference
2349         types.
2350
2351 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2352
2353         * mini.h: Removed obsolete prototypes.
2354
2355 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2356
2357         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2358         already handle them.
2359
2360 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2361
2362         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2363         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2364         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2365         tramp-x86.c: Added a MonoGenericContext* argument to
2366         mono_arch_get_unbox_trampoline() so that it can call other
2367         functions which require it.
2368
2369 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2370
2371         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2372         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2373         mono_arch_get_this_arg_from_call() takes a
2374         MonoGenericSharingContext* as well.
2375
2376 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2377
2378         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2379         implement generic sharing of unbox.
2380
2381 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2382
2383         * mini.c: Don't compute the vtable to determine whether a field is
2384         special static, because it might not work for open types.
2385
2386 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2387
2388         * mini.c: Removed the unused token_type and token_source arguments
2389         from get_runtime_generic_context_ptr().
2390
2391 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2392
2393         * mini.c (ADD_BINOP): fix the build
2394
2395 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2396
2397         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2398         a widening op.
2399
2400 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2401
2402         * mini.h: Removed class relations enum that's not used anymore.
2403
2404 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2405
2406         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2407
2408         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2409         the lazy fetch trampoline access code.
2410
2411 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2412
2413         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2414
2415 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2416
2417         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2418
2419         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2420
2421         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2422
2423 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2424
2425         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2426         intrinsics.
2427
2428         * mini-ops.h: Add MIN/MAX_UN opcodes.
2429
2430         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2431         intrinsics.
2432
2433         * basic-math.cs: Add more min/max tests.
2434
2435         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2436
2437 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2438
2439         * mini.c: Small fix in the prologue of emit_castclass.
2440
2441 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2442
2443         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2444
2445         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2446         do not work even for unsigned types. Fixes #400014.
2447
2448         * basic-math.cs: Add regression tests for unsigned Min/Max.
2449
2450 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2451
2452         * mini.c: Added additional context_used argument to several
2453         functions, which will be needed for sharing generic methods.  Use
2454         GET_RGCTX macro wherever appropriate.  Declare only one
2455         context_used in mono_method_to_ir().
2456
2457 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2458
2459         * mini.c, generic-sharing.c: Removed generic class relations.
2460
2461         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2462         functions due to MRGCTX changes.
2463
2464 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2465
2466         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2467         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2468         with calculated IMT.
2469
2470         * mini.c: Generic sharing of calls via generic interfaces.
2471
2472         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2473         generic method with non-constant MonoGenericContext*.  Instead,
2474         the context is taken out of the method itself.
2475
2476 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2477
2478         * mini.c: Generic sharing of ldvirtftn.
2479
2480 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2481
2482         * mini.c: Generic sharing of ldftn.
2483
2484 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2485
2486         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2487
2488 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2489
2490         * mini.c: Generic sharing of the special case of ldtoken followed
2491         by a call to GetTypeFromHandle.
2492
2493 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2494
2495         * mini.c: Generic sharing of box for nullable types.
2496
2497 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2498
2499         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2500         are passed on the stack. Fixes #324807.
2501
2502 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2503
2504         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2505         for the ArgValuetypeAddrInIReg case.
2506
2507         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2508         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2509
2510         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2511         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2512         local variable and pass the local variable by reference to the called method.
2513           
2514         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2515         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2516
2517         Contributed under MIT/X11 license.
2518
2519 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2520
2521         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2522
2523         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2524         everything.
2525
2526 2008-06-10  Martin Baulig  <martin@ximian.com>
2527
2528         * debug-mini.c
2529         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2530
2531 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2532
2533         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2534         possible error when no arguments are passed.
2535
2536         Contributed under MIT/X11 license.
2537
2538 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2539
2540         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2541         where the file name is NULL.
2542
2543 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2544
2545         * mini.c: Fix s390 build.
2546
2547 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2548
2549         * trace.c (mono_trace_parse_options): Fix warnings.
2550
2551         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2552
2553 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2554
2555         * mini.c (remove_block_if_useless): Avoid printing the method name.
2556         
2557         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2558         MONO_INST_NEW.
2559
2560         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2561         LMF. Not yet used.
2562
2563         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2564         translated code after it has been patched.
2565
2566 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2567
2568         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2569         avoid problems during code patching on SMP systems.
2570         (emit_call): Avoid adding a patch info which is already added by 
2571         emit_call_body.
2572         (mono_arch_emit_exceptions): Ditto.
2573
2574 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2575
2576         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2577         MONO_TYPE_ISSTRUCT already checks for it.
2578
2579 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2580
2581         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2582           structs with floats on Winx64 the float registers are not used.  
2583           The integer registers are always used..
2584         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2585           only one register will be used and only if the size of the struct 
2586           is 1,2,4, or 8 bytes.
2587
2588         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2589           to work for Winx64.
2590
2591         Contributed under MIT/X11 license.
2592
2593 2008-06-05  Martin Baulig  <martin@ximian.com>
2594
2595         * debug-debugger.c (debugger_lookup_class): Also call
2596         mono_class_setup_methods() here; we're only called from RTI.
2597
2598 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2599
2600         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2601         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2602         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2603         Post-process object files and add dtrace-generated object, if necessary.
2604
2605         Contributed under MIT/X11 license.
2606
2607 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2608
2609         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2610         element class.
2611
2612         * mini.c: Generic sharing for unbox.any and castclass.
2613
2614 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2615
2616         * mini.c: Ignore tailcall prefix in shared generic code and when
2617         doing calls which require a vtable/rgctx argument.
2618
2619 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2620
2621         * mini.c: Don't free the JIT info.
2622
2623         * driver.c: Changes in the JIT info table testing code.
2624
2625 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2626
2627         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2628         interruption. Fix some warnings.
2629
2630         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2631         interruption_checkpoint.
2632
2633 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2634
2635         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2636         from embedding applications.
2637
2638 2008-06-02  William Holmes  <billholmes54@gmail.com>
2639
2640         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2641           reserving 32 bytes on the stack when making calls. 
2642
2643         Contributed under MIT/X11 license.
2644
2645 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2646
2647         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2648         the linear IL branch.
2649
2650         * driver.c: Print out more information for --version on arm.
2651
2652 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2655         bb_exit instead, since out of line bblocks might not actually be emitted
2656         out-of-line.
2657         
2658         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2659         maximum epilog size for out of line bblocks if tracing is enabled.
2660
2661         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2662
2663 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2664
2665         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2666
2667 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2670         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2671         opcodes.
2672
2673 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2674
2675         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2676         the 'value' to store is a constant.
2677
2678         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2679
2680         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2681         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2682
2683 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2684
2685         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2686         for accessing method->generic_container.
2687
2688 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2691         
2692         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2693
2694         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2695
2696         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2697         fails.
2698
2699 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2702
2703         * mini.c: Handle the case when mono_class_vtable () fails.
2704
2705 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2706         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2707         the stat profiler.
2708
2709 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2710
2711         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2712         together with domain sharing.
2713
2714 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2715
2716         * mini.c: Treat callvirts to final methods like non-virtual calls
2717         when doing generic sharing, i.e. look them up in the runtime
2718         generic context.
2719
2720 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2721
2722         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2723         with computed types (for generic sharing).
2724
2725         * mini.c: Generic sharing for mkrefany and refanyval.
2726
2727 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2728
2729         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2730         possible.
2731
2732         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2733         the generic sharing code.
2734         
2735         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2736         when needed.
2737
2738 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2741
2742 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2743
2744         * driver.c: updated copyright date
2745
2746 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2747
2748         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2749         needed.
2750
2751 2008-05-19  Martin Baulig  <martin@ximian.com>
2752
2753         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2754         pointing to the new `_mono_debug_using_mono_debugger' variable.
2755
2756         * driver.c
2757         (mono_main): Check mono_debug_using_mono_debugger() rather than
2758         the `MONO_INSIDE_MDB' environment variable to check whether we're
2759         inside the debugger.
2760
2761 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2762
2763         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2764         argument.
2765
2766 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2767
2768         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2769
2770         * mini.c: Added mini_assembly_can_skip_verification. This
2771         function checks if the assembly requested to skip verification. 
2772         Fixes part of #387274.
2773
2774 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2775
2776         * mini.c (mini_get_method): Disable the check for open generic classes when
2777         using generic sharing.
2778
2779         * generics.cs: Add a test for #387034.
2780
2781         * mini.c (mini_get_method): Check whenever the method class is an open generic
2782         type, and return NULL in that case, causing a verification error. Fixes
2783         #384123.
2784
2785 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2786
2787         * driver.c (mono_main): Revert r102623. The right
2788         thing to do is to enable the verifier under verifiable
2789         unless a --security flag was passed.
2790
2791         We need this non-trivial behavior for --verify-all otherwise
2792         mcs-compileall won't be able to use it. As it needs everything to
2793         be verified under validil.
2794
2795 2008-05-06  Martin Baulig  <martin@ximian.com>
2796
2797         Fix #383749.
2798
2799         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2800         (mono_debugger_thread_cleanup): Likewise.
2801         (mono_debugger_extended_notification): Likewise.
2802
2803 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2804
2805         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2806         against both inflated and non-inflated methods. We need to check against the
2807         generic definition for cases where the instantiated method is not visible.
2808         We need to check against the inflated types for cases where the instantiation
2809         changes any super type. This fixes #382986.
2810
2811         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2812         that check for visibiliy as generic params only appears as the type subject
2813         of tokens on call opcodes. Field manipulation and ldftn must always
2814         target an exact type.
2815
2816 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2817
2818         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2819         if no related --security flag is passed.
2820
2821 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2822
2823         * mini-arch.h: Prepare support for ppc64.
2824
2825         Contributed under MIT/X11 license.
2826
2827 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2828
2829         * aot-runtime.c: Prepare support for ppc64.
2830
2831         Contributed under MIT/X11 license.
2832
2833 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2834
2835         * mini-ops.h: Prepare support for ppc64.
2836
2837         Contributed under MIT/X11 license.
2838
2839 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2840
2841         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2842
2843         Contributed under MIT/X11 license.
2844
2845 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2846
2847         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2848         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2849         assemblies on windows.
2850
2851 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2852
2853         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2854         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2855         * main.c: Use UTF-8 encoded command line instead of Windows default code
2856         page on Windows to support Unicode.
2857         * driver.c (DllMain): New function for mixed-mode assembly support.
2858         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2859         export __stdcall functions without decoration.
2860
2861         Contributed under MIT/X11 license.
2862
2863 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2864
2865         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2866         saving it very early.
2867
2868 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2869
2870         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2871         deleted.  The only way to access the new RGCTX is via the
2872         trampline.
2873
2874         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2875         vtable instead of the RGCTX to static methods.
2876
2877         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2878         accessing the new RGCTX.
2879
2880         * generic-sharing.c: There is no separation between self, type
2881         arguments and other types in the RGCTX anymore.
2882
2883 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2884
2885         * mini-amd64.c (add_general): Remove previous stack adjustment.
2886         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2887         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2888         for 32 bytes of stack space reserved for all calls.
2889         
2890         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2891         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2892         adjustment.
2893         
2894         Code contributed under MIT/X11 license.
2895
2896 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2897
2898         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2899         against the root definition, peeling out method and type instantiations.
2900         Cache verify success results, code that fails verification is still
2901         checked multiple times.
2902
2903 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2904
2905         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2906
2907 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2908
2909         * mini-amd64.c (add_general): Always increment stack on Win64.
2910         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2911         on Win64.
2912         
2913         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2914         stack based argument handling on Win64.
2915         
2916         Code contributed under MIT/X11 license.
2917
2918 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2919
2920         * Makefile.am (version.h): Add support for git-svn.
2921
2922 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2923
2924         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2925         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2926         avoiding allocations and libc functions which might deadlock.
2927         
2928         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2929         'no-gdb-backtrace' option is set.
2930
2931         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2932
2933         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2934
2935 2008-04-21  Martin Baulig  <martin@ximian.com>
2936
2937         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2938         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2939
2940 2008-04-21  Martin Baulig  <martin@ximian.com>
2941
2942         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2943         `thread_vtable', `event_handler_ptr' and `event_handler'.
2944
2945 2008-04-21  Martin Baulig  <martin@ximian.com>
2946
2947         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2948         allows delayed initialization of the `executable_code_buffer' when
2949         attaching.
2950
2951 2008-04-21  Martin Baulig  <martin@ximian.com>
2952
2953         * mini.h (mono_debugger_create_notification_function): Removed.
2954         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2955
2956         * mdb-debug-info64.s
2957         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2958
2959         * mdb-debug-info32.s
2960         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2961
2962         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2963         currently only works on x86 and x86_64, so don't create it on ppc.
2964
2965 2008-04-21  Martin Baulig  <martin@ximian.com>
2966
2967         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2968
2969         * mini.c
2970         (mini_method_compile): In the fp elimination check, check
2971         `debug_options.mdb_optimizations' in addition to
2972         mono_debug_using_mono_debugger().       
2973
2974         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2975         disable some JIT optimizations which are only disabled when
2976         running inside the debugger.
2977         Added `--help-debug' option to describe the debugging options.
2978         (parse_debug_options): New static function to parse the `--debug'
2979         options, so we can easily add more stuff in future.
2980
2981 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2982
2983         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2984         the method has no body.
2985
2986 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2987
2988         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2989         assembly is not allowed in MSVC 64-bit compiler. 
2990         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2991         as we get floating point exceptions everywhere.
2992         
2993         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2994         correctly align arguments for call to throw_exception.
2995         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2996         
2997         Code contributed under MIT/X11 license.
2998
2999 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3002
3003 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3004
3005         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3006
3007         * mini-amd64.c (NEW_INS): Set cil_code.
3008
3009         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3010         from mini-amd64.c so all debugger related logic is in one place.
3011
3012         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3013         later won't have a random ip assigned to them.
3014
3015 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3016
3017         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3018         the arch specific function initializes code_size.
3019         (mono_create_delegate_trampoline): Ditto.
3020
3021         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3022         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3023         platforms.
3024
3025         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3026         running under the debugger.
3027
3028         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3029         debugger.
3030
3031         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3032         debugger. Also move the disabling of optimizations here from driver.c.
3033         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3034         debugger.
3035
3036         * mini.h (MonoCompile): Add a few new flags.
3037
3038 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3039
3040         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3041         so the cil_code field of created MonoInst's is properly set.
3042         (mini_select_instructions): Ditto.
3043
3044         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3045         (MONO_INST_NEW_CALL): Ditto.
3046
3047         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3048         in many places so the ins->cil_code field is properly initialized.
3049
3050         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3051         place.
3052
3053 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3054
3055         * mini.c (mini_method_compile): Print a different message when compiling a 
3056         shared method.
3057         
3058         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3059         > 1.
3060
3061 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3062
3063         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3064         SSE2 instructions.
3065
3066         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3067         
3068 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3069
3070         * mini.c (handle_stack_args): Make this return void since its return value was
3071         never used. Also set cfg->unverifiable for invalid IL instead of calling
3072         G_BREAKPOINT ().
3073
3074 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3075
3076         * mini.c: Make sure "this" is live in catch clauses with type
3077         variables in shared generic code.
3078
3079 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3080
3081         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3082         generic_class_is_reference_type() to ensure the proper behaviour
3083         when sharing generic code and the type in question is a type
3084         argument.
3085
3086 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3087
3088         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3089         race conditions when printing thread dumps. Fixes #377738.
3090
3091 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3092         
3093         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3094         shows up when both MonoInst arguments can cause aliasig.
3095         There is likely no way in the current JIT to trigger this problem, but
3096         it showed up in the development of generics sharing, when in a new
3097         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3098         When the generics sharing code will be committed, its tests will be
3099         valid also for this bug.
3100
3101 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3104         PATCH_INFO_METHOD.
3105
3106         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3107         NULL.
3108
3109 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3110
3111         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3112         use a more detailed exception message for InvalidCastException.
3113
3114         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3115
3116         * driver.c (mono_main): Add --debug=casts option to turn on better 
3117         InvalidCastException message details.
3118
3119         * mini.c (mini_get_debug_options): New helper function to return the address of
3120         the debug_options variable.
3121
3122         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3123         the jit_tls TLS variable.
3124
3125         * mini.c (mono_jit_tls): New TLS variable.
3126
3127         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3128         option is used.
3129
3130 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3131
3132         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3133
3134         * mini.c: Removed verifer related stuff, code moved to verify.c.
3135
3136         * driver.c: Using code from verify.c instead of mini.c.
3137
3138 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3139
3140         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3141         longer valid.
3142
3143 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3144
3145         * mini.c (check_for_method_verify): Enabling verification of
3146         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3147         have been fixed.
3148
3149 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3150
3151         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3152         caller saved registers as well.
3153         
3154         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3155         saved registers as well.
3156
3157 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3158
3159         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3160
3161         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3162         code.
3163
3164 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3165
3166         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3167         to get_call_info.
3168         (get_call_info): Take a gsctx argument instead of 'cfg'.
3169
3170 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3171
3172         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3173         mono_verify_all is set.
3174
3175         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3176
3177         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3178
3179 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3180
3181         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3182         an exception.
3183
3184         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3185         verifier and the code generated by the compiler.
3186
3187 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3188
3189         * mini.c: Generic sharing of the non-nullable case of the box
3190         instruction.
3191
3192 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3193
3194         * inssel.brg: Fix the build.
3195
3196         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3197
3198 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3199
3200         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3201         Array:Address. Fixes #372410.
3202
3203         * iltests.il.in: New tests for readonly prefix.
3204
3205 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3206
3207         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3208         mini-trampolines.c.
3209
3210         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3211         mini-exceptions.c.
3212
3213         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3214         
3215         * mini.c (mono_decompose_op_imm): New helper function.
3216
3217         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3218         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3219         return value.
3220
3221         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3222         mono_arch_output_basic_block. Fix warnings.
3223
3224         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3225         for now.
3226
3227 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3230         since the extra frame is now detected automatically inside the loop.
3231
3232         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3233         opts which are now in mono_peephole_ins ().
3234         
3235         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3236
3237         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3238         frames and skip duplicate managed-to-native frames. Fixes #367665.
3239
3240         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3241         opts which are now in mono_peephole_ins ().
3242         (mono_arch_peephole_pass_2): Ditto.
3243
3244         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3245
3246         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3247         arch independent peephole optimizations.
3248
3249         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3250         opts which are now in mono_peephole_ins ().
3251
3252         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3253         
3254         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3255
3256         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3257         pattern.
3258
3259         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3260         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3261         opcode. 
3262
3263 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3264
3265         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3266         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3267         return value.
3268
3269         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3270         mono_arch_output_basic_block. Fix warnings.
3271
3272 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3273
3274         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3275         conv.ovf.u.un.
3276
3277 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3280         conv.ovf.u.un.
3281
3282         * iltests.il: Add new tests.
3283
3284 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3285
3286         * mini.c: Removed Windows version macros.
3287
3288 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3289
3290         * generic-sharing.c: Put reflection types in the extensible part
3291         of the runtime generic context.
3292
3293         * mini.c: Generic sharing of the GetTypeHandle special case of the
3294         ldtoken instruction.
3295
3296 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3297
3298         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3299
3300         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3301         
3302         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3303         consistency with the other version on the linear IR branch.
3304
3305         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3306
3307         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3308
3309         * iltests.il.in: Add new tests.
3310
3311 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3312
3313         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3314
3315         * iltests.il.in: Add new tests.
3316
3317 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3318
3319         * mini.c: Two variables with the same name were declared in
3320         nesting contexts and one wasn't initialized.  Fixed.
3321
3322 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3323
3324         * mini.c: Generic sharing of the initobj instruction.
3325
3326 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3327
3328         * mini.c: make the test to optimize ldtoken from typeof() more
3329         precise.
3330
3331 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3332
3333         * mini.c: Generic sharing of the initobj instruction for reference
3334         types.
3335
3336 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3337
3338         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3339         the mono_breakpoint_clean_code() code to perform bound checks.
3340
3341 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3342
3343         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3344         mono_arch_patch_callsite() to include the start of the managed method
3345         to be able to perform bound checks.
3346
3347 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3348
3349         * mini.c: Generic sharing for the isinst instruction.
3350
3351 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3352
3353         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3354         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3355         with the runtime generic context argument.
3356
3357         * mini.c: Share calls to several types of unsharable methods by
3358         putting the address of the method code in the runtime generic
3359         context and doing an indirect call.
3360
3361         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3362         to switches.
3363
3364 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3365
3366         * generic-sharing.c: Change due to a change in the runtime genric
3367         context API.
3368
3369 2008-03-15  Martin Baulig  <martin@ximian.com>
3370
3371         * tramp-x86.c
3372         (mono_arch_nullify_class_init_trampoline): Add call to
3373         mono_breakpoint_clean_code() to make things work when running
3374         inside the debugger.
3375
3376         * tramp-amd64.c
3377         (mono_arch_nullify_class_init_trampoline): Add call to
3378         mono_breakpoint_clean_code() to make things work when running
3379         inside the debugger.
3380
3381 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3382
3383         * inssel-long.brg (reg): Fix 64 bit build.
3384
3385 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3386
3387         * mini.c, mini.h: Share static generic code by passing it an
3388         implicit argument pointing to the runtime generic context.
3389
3390         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3391         inssel-long32-mips.brg: New opcodes for calling shared static,
3392         which need to be passed the runtime generic context.
3393
3394         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3395         argument on the stack in the prologue if needed.  New function for
3396         finding the runtime generic context argument from the registers
3397         saved by the trampoline.
3398
3399         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3400         runtime generic context argument.
3401
3402         * tramp-amd64.c: Also restore the register used for the runtime
3403         generic context argument.
3404
3405         * mini-trampoline.c: Resolve shared static calls by consulting the
3406         runtime generic context via the new argument.
3407
3408         * generic-sharing.c: Add an argument to sharability-checking
3409         functions that specifies whether type variables should be treated
3410         as sharable type arguments.
3411
3412         * inssel-x86.brg: Removed a superfluous, buggy rule.
3413
3414         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3415         to switches.
3416
3417 2008-03-14  Martin Baulig  <martin@ximian.com>
3418
3419         * debug-debugger.c (main_thread_handler): Call
3420         mono_runtime_run_main() without sending any notifications.
3421
3422         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3423
3424 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3425
3426         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3427
3428 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3429
3430         * tramp-x86.c: Fixed register restore offsets in the trampoline
3431         code for ECX and EDX.
3432
3433 2008-03-12  Geoff Norton  <gnorton@novell.com>
3434
3435         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3436         different ucontext_t implementations.
3437         * exceptions-arm.c: Use the above defines to get exceptions working on 
3438         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3439         * mini-arm.c: Implement iPhone icache support (based on a patch by
3440         Luke Howard lukeh@padl.com)
3441
3442 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3443
3444         * mini.c: Enable generic sharing of calls to non-static
3445         non-interface non-generic non-value-type methods.
3446
3447         * mini-trampolines.c: Resolve calls from shared generic code.
3448
3449 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3450
3451         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3452
3453         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3454
3455 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3456
3457         * mini.c: some fixes for the AOT compiler.
3458
3459 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3460
3461         * cpu-amd64.md: Add clob:1 to some float opcodes.
3462
3463 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3464
3465         * mini.h: Added MiniVerifierMode enumeration.
3466
3467         * mini.c: Added mini_verifier_set_mode to control
3468         the usage of the new verifier.
3469
3470         * mini.c (mono_method): Integrated the new verifier.
3471
3472         * driver.c: Extended --security option with validil and
3473         verifiable options to activate the new verifier.
3474
3475 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3476
3477         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3478         optimization to ctors taking 0 or 2 arguments too.
3479
3480         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3481         a bit.
3482
3483         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3484
3485         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3486
3487 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3488
3489         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3490         non-aot case as well.
3491
3492         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3493
3494         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3495         changes.
3496
3497         * aot-compiler.c (encode_patch): Ditto.
3498
3499         * mini.h (G_MININT32): Fix the definition of this.
3500
3501 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3502
3503         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3504
3505         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3506
3507 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3508
3509         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3510         methods returning vtypes in registers.
3511         (mono_arch_allocate_vars): Ditto.
3512
3513         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3514
3515         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3516
3517         * generics.cs: Add a test from the linear IR branch.
3518
3519         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3520
3521         * mini.c (inline_method): Cache failed inline attempts.
3522
3523 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3524
3525         * mini.c: For shared methods of generic classes put the location
3526         of "this" into the MonoGenericJitInfo.
3527
3528         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3529         register out of a MonoContext by register number.  Add the generic
3530         sharing context as an argument to mono_arch_find_this_argument().
3531
3532         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3533         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3534         for new arch function.
3535
3536         * mini-exception.c: Handle open exception clauses in shared
3537         generic code.
3538
3539         * mini-trampolines.c: Supply additional argument to
3540         mono_arch_find_this_argument().
3541
3542 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3543
3544         * Makefile.am (regtests): Run the bench.exe tests last.
3545
3546 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3547
3548         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3549         a bit.
3550
3551 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3552
3553         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3554         with MS.
3555
3556         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3557         
3558         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3559
3560         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3561         whose class has no cctor.
3562
3563         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3564
3565 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3566
3567         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3568         unverified.
3569
3570 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3571
3572         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3573         to be in sync with the code on the linear IR branch.
3574
3575         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3576
3577         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3578
3579 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3582
3583         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3584
3585         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3586
3587         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3588
3589         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3590         
3591         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3592         body.
3593
3594 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3595
3596         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3597         OP_LOADR4_MEMBASE emission.
3598
3599         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3600         (mono_spillvar_offset_float): Ditto.
3601
3602         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3603
3604         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3605         emission.
3606
3607         * basic-long.cs: Add regression tests for them.
3608
3609         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3610         use.
3611         (mono_arch_allocate_vars): Fix representation of single-precision float
3612         argument.
3613         (mono_arch_output_basic_block): Ditto.
3614
3615         * inssel-mips.brg: Ditto, remove duplicate items.
3616
3617         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3618         arguments of tail calls as on other platforms.
3619         (mono_arch_output_basic_block): Handle tail calls.
3620
3621         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3622         register.
3623
3624         * objects.cs (test_5_pass_static_struct): Add test for it.
3625
3626         Contributed under MIT/X11 license.
3627
3628 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3629
3630         * Makefile.am: Use gmcs for compiling the regression tests.
3631
3632         * *.2.cs *.2.il: Rename to *.cs and *.il.
3633
3634 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3635
3636         * regalloc.h: Make the vassign array smaller.
3637
3638         * mini.c (mini_method_compile): Remove an unused field in cfg.
3639
3640         * mini-codegen.c: Add a bunch of micro optimizations.
3641
3642 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3643
3644         * regalloc.h: Remove some unused fields.
3645
3646 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3647
3648         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3649
3650         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3651
3652 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3653
3654         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3655
3656         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3657         trampoline: Fetch an entry from the runtime generic context.  If
3658         it's NULL, jump to the actual trampoline to fill the runtime
3659         generic context.  Otherwise, return it.
3660
3661         * mini.c: Call the lazy fetch trampoline to get entries out of the
3662         runtime generic context.
3663
3664         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3665         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3666         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3667
3668 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3669
3670         * mini.c: Fetch data out of the extensible part of the runtime
3671         generic context instead of calling a helper function.
3672
3673         * generic-sharing.c: Some functions moved into
3674         metadata/generic-sharing.c.  Helper function for fetching other
3675         types now checks and asserts against extensible rgctx (just for
3676         debugging purposes - the helper function isn't called anymore
3677         unless for debugging).
3678
3679 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3680
3681         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3682         for tail calls up to the point that the tests in iltests.exe run. Also add a
3683         dummy CKFINITE implementation.
3684         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3685         needed for trampoline LMF frames.
3686
3687         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3688         trampoline LMF frames.
3689
3690 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3691
3692         * mini.c (inline_method): clean any pending loader error when inlining fail.
3693         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3694
3695 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3696
3697         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3698
3699         * aot-runtime.c (decode_patch_info): Ditto.
3700
3701         * mini.c (mono_resolve_patch_target): Ditto.
3702         
3703         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3704         icall wrappers.
3705
3706         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3707         
3708         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3709         if it references an icall address.
3710
3711 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3712
3713         * cpu-s390x.md: Remove some more unused opcodes.
3714         
3715         * cpu-s390x.md: Remove some unused opcodes.
3716
3717         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3718         mono_op_imm_to_op ().
3719
3720         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3721         instead of a switch statement.
3722         
3723         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3724         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3725
3726         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3727         
3728         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3729
3730         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3731         -1.
3732
3733 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3734
3735         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3736         opened. Fixes #362607.
3737
3738         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3739
3740         * iltests.il.in: Add a test for static methods in interfaces.
3741
3742 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * genmdesc.c (build_table): Fix a crash on older glib versions.
3745
3746         * cpu-sparc.md: Remove some unused opcodes.
3747         
3748         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3749         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3750
3751         * cpu-amd64.md: Remove some unused opcodes.
3752
3753         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3754         like the other opcodes.
3755
3756 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3757
3758         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3759
3760         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3761
3762         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3763         variables 'cfg' instead of 'm' for consistency.
3764
3765         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3766
3767         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3768         argument holding the vtype return address, to avoid the ambigious use of
3769         cfg->ret for this purpose.
3770
3771         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3772
3773         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3774         
3775         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3776         new mono_print_ins () function which only takes one argument.
3777
3778 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3779
3780         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3781         macro arguments.
3782
3783 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3784
3785         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3786
3787         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3788
3789         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3790         opcodes and other small changes.
3791
3792         * mini-ops.h: Add some new opcodes from the linear IR branch.
3793
3794         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3795
3796         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3797         opcodes, use the REG_MEMBASE opcodes instead.
3798         
3799         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3800         opcodes, use the REG_MEMBASE opcodes instead.
3801         
3802         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3803         linear IR branch.
3804
3805         * mini.c (mono_op_imm_to_op): New helper function.
3806
3807         * mini-ops.h: Add some opcodes from linear IR branch.
3808
3809 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3810
3811         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3812         <tsv@solvo.ru>.
3813
3814 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3815
3816         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3817         OP_ICONV_TO_R4/R8.
3818
3819         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3820
3821 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3822
3823         * aot-compiler.c (emit_method_code): Add an assert.
3824
3825         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3826         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3827         methods.
3828
3829 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3830
3831         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3832         some load/store opcodes so they are consistent. 
3833         (mono_arch_emit_prolog): Simplify some code.
3834
3835         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3836
3837         * objects.cs: Add tests for large argument offsets on ARM.
3838
3839         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3840         stack offsets. Fixes #359651.
3841
3842         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3843
3844         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3845
3846         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3847
3848         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3849
3850         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3851
3852         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3853         rid of CEE_CONV_R_UN.
3854
3855         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3856
3857 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3858
3859         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3860
3861         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3862
3863         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3864
3865         * cpu-amd64.md: Remove some unused opcodes.
3866
3867         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3868
3869         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3870
3871         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3872         arch specific functions for its parts. Call the peephole pass after local
3873         regalloc so the prolog can compute a more accurate max_offset.
3874         
3875         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3876         the corresponding OP_I/OP_L opcodes.
3877
3878         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3879
3880         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3881
3882 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3883
3884         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3885         as they are handled in mini.c.
3886
3887         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3888         
3889         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3890         case since it is handled in mini.c.
3891
3892         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3893
3894         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3895
3896         * *.c: Use the new opcodes in the IR and back end code.
3897
3898         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3899
3900         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3901
3902 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3903
3904         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3905         an assert because it has a race condition.
3906
3907 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3908
3909         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3910
3911         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3912
3913         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3914
3915         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3916         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3917
3918 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3919
3920         * cpu-amd64.md (move): Correct the maximum size of move.
3921
3922 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3923
3924         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3925         the generic class init trampoline to return quickly if the class
3926         is already inited.
3927
3928 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3929
3930         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3931         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3932
3933 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3934
3935         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3936         branch.
3937
3938 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3939
3940         * objects.cs: Add some soft-float tests.
3941
3942         * mini.c: Fix a couple more soft-float issues.
3943
3944         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3945
3946         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3947         avoid a REX prefix.
3948
3949 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3950
3951         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3952         exception happens while compiling a virtual method.
3953
3954 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3955
3956         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3957         
3958         * mini-sparc.c: Fix build.
3959
3960         * mini-sparc.c (get_call_info): Add support for generic sharing.
3961
3962         * mini-exceptions.c: Add a FIXME.
3963
3964 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3965
3966         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3967         altstack handling code.
3968
3969         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3970         
3971         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3972
3973         * mini-s390.c: Add support for generic sharing.
3974
3975         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3976         Fix CAS on s390.
3977         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3978
3979         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3980
3981         * mini-s390x.c: Add support for generic sharing.
3982         
3983         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3984         Fix CAS on ia64.
3985         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3986
3987         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3988         can be used since it takes a 16 bit signed immediate.
3989
3990         * inssel-s390x.brg: Fix OP_SETRET.
3991
3992         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3993
3994         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3995
3996         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3997
3998         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3999
4000         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4001         in one place.
4002
4003         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4004         stuff.
4005
4006         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4007         of the unused mono_arch_patch_delegate_trampoline stuff.
4008
4009 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4010
4011         * basic-long.cs: Move the fp related tests to basic-float.cs.
4012
4013         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4014
4015         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4016
4017         * basic-calls.cs: Add a test for proper float argument passing.
4018
4019         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4020         if the context corresponds to an exception received through a signal.
4021
4022         * exceptions.cs: Add a test for nullref handling at the start of a try
4023         clause.
4024
4025         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4026
4027         * jit-icalls.c (mono_break): New JIT icall.
4028
4029         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4030
4031         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4032
4033 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * cpu-*.md: Get rid of unused opcodes.
4036
4037         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4038
4039         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4040         by all platforms.
4041
4042         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4043         define.
4044
4045         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4046         the arch independent trampoline code in mini-trampolines.c.
4047
4048         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4049
4050         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4051
4052         * mini-s390.h: Remove an unused define.
4053         
4054         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4055         the arch independent trampoline code in mini-trampolines.c.
4056
4057         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4058
4059 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4060
4061         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4062
4063         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4064
4065         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4066
4067         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4068
4069         * cpu-amd64.md: Use smaller sizes for int opcodes.
4070
4071         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4072
4073         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4074         objects.cs.
4075
4076         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4077         debugging.
4078
4079         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4080         instead of though a pointer to save an indirection when accessing elements of
4081         the array.
4082
4083         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4084         some typos.
4085         (NOT_IMPLEMENTED): New helper macro.
4086         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4087         of a bb.
4088
4089         * *.c: Use the new helper macro.
4090
4091 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4092
4093         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4094
4095 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4096
4097         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4098         stack slots.
4099
4100 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4101
4102         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4103         profiling is enabled.
4104         
4105         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4106         the end.
4107         (mono_arch_emit_prolog): Add more first bblock optimizations.
4108
4109         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4110         in order if possible.
4111         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4112         bblock, since the arguments are still in their original registers.
4113
4114         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4115
4116 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4117
4118         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4119         as well.
4120
4121         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4122         offset 0.
4123
4124         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4125
4126         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4127         process async exceptions received while in unmanaged code.
4128
4129         * mini.c (mini_init): Install a callback with the runtime which will be called
4130         when a thread receives an async exception while in unmanaged code.
4131
4132         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4133
4134         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4135
4136 2008-01-16  Wade Berrier  <wberrier@novell.com>
4137
4138         * cpu-g4.md:
4139         * cpu-arm.md:
4140         * cpu-s390x.md:
4141         fix build
4142
4143 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4144
4145         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4146         compilation with sun cc.
4147
4148         * cpu-*.md: Fix the build.
4149
4150         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4151
4152         * mini-amd64.h: Add some comments to the MonoLMF structure.
4153
4154         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4155         
4156         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4157         in the LMF structure if possible. This saves two instructions in the
4158         managed->native wrappers.
4159
4160         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4161
4162 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4163
4164         * generic-sharing.c: New type argument lookup code which uses the
4165         runtime generic context template.
4166
4167 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4168
4169         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4170
4171         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4172         (mono_arch_output_basic_block): Fix localloc implementation.
4173
4174         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4175
4176         * mini-ia64.c (peephole_pass): Fix ia64 build.
4177
4178         * mini-amd64.c (peephole_pass): Fix a warning.
4179         
4180         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4181         at a constant offset from sp/fp.
4182
4183         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4184         instead of obtaining it from *lmf in the managed method case.
4185
4186 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4187
4188         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4189
4190 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4191
4192         * mini.h (MonoInstList): New type.
4193         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4194         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4195         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4196         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4197         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4198         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4199         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4200         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4201         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4202         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4203         MONO_INST_LIST_FOR_EACH_ENTRY,
4204         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4205         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4206         mono_inst_list_first, mono_inst_list_last,
4207         mono_inst_list_next, mono_inst_list_prev): New instruction
4208         list handling interfaces.
4209         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4210         list head 'ins_list'.
4211         (MonoInst): Replace next pointer with list head 'node'.
4212         (MonoCallInst): Make 'out_args' a MonoInstList.
4213         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4214         (MonoCompile): Delete reverse_inst_list and
4215         reverse_inst_list_len.
4216         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4217         mono_arch_lowering_pass, mono_arch_local_regalloc,
4218         mono_arch_output_basic_block, mono_arch_emit_prolog):
4219         Convert to new instruction lists.
4220         (insert_after_ins): Delete.
4221         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4222         instruction lists.
4223         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4224         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4225         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4226         mono_emulate_opcode, mono_emit_load_got_addr,
4227         inline_method, mono_method_to_ir, mono_print_bb_code,
4228         print_dfn, decompose_pass, nullify_basic_block,
4229         replace_out_block_in_code, remove_block_if_useless,
4230         merge_basic_blocks, move_basic_block_to_end,
4231         try_unsigned_compare, optimize_branches, mono_print_code,
4232         mini_select_instructions, remove_critical_edges): Likewise.
4233         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4234         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4235         mono_arch_output_basic_block, mono_arch_emit_prolog):
4236         Likewise.
4237         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4238         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4239         mono_arch_output_basic_block): Likewise.
4240         (inst_list_prepend, insert_after_ins): Delete.
4241         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4242         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4243         instruction lists.
4244         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4245         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4246         mono_arch_emit_prolog): Likewise.
4247         * cfold.c (mono_constant_fold): Likewise.
4248         * liveness.c (visit_bb, mono_analyze_liveness,
4249         optimize_initlocals): Likewise.
4250         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4251         * graph.c (mono_draw_code_cfg): Likewise.
4252         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4253         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4254         mono_ssa_cprop): Likewise.
4255         * abcremoval (get_relations_from_previous_bb, process_block):
4256         Likewise.
4257         * local-propagation (mono_cprop_invalidate_values,
4258         mono_local_cprop_bb): Likewise.
4259         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4260         peephole_pass, mono_arch_output_basic_block,
4261         mono_arch_emit_prolog): Likewise.
4262         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4263         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4264         mono_arch_emit_prolog): Likewise.
4265         (insert_after_ins): Delete.
4266         * aliasing.c (print_code_with_aliasing_information,
4267         mono_build_aliasing_information, mono_aliasing_deadce):
4268         Convert to new instruction lists.
4269         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4270         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4271         mono_arch_local_regalloc, mono_arch_output_basic_block):
4272         Likewise.
4273         (insert_after_ins): Delete.
4274         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4275         peephole_pass, mono_arch_output_basic_block): Convert to
4276         new instruction lists.
4277         * mini-codegen (InstList, inst_list_prepend,
4278         insert_after_ins): Delete.
4279         (insert_before_ins, get_register_force_spilling,
4280         get_register_spilling, free_up_ireg, free_up_reg,
4281         create_copy_ins, create_spilled_store, alloc_int_reg,
4282         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4283         to new instruction lists.
4284         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4285         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4286         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4287         (insert_after_ins): Delete.
4288         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4289         mono_arch_local_regalloc, mono_arch_output_basic_block,
4290         mono_arch_call_opcode): Convert to new instruction lists.
4291         (insert_after_ins): Delete.
4292         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4293         peephole_pass, mono_arch_output_basic_block,
4294         mono_arch_emit_prolog): Convert to new instruction lists.
4295
4296 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4297
4298         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4299
4300         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4301         Fixes #353182.
4302
4303         * Makefile.am (version.h): Make this work with non-bash shells.
4304
4305 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4306
4307         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4308
4309 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4310
4311         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4312         the InitializeArray optimization.
4313
4314 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4315
4316         * mini.c driver.c: Don't include os/gc_wrapper.h.
4317
4318 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4319
4320         * mini.c (print_jit_stats): Print GC statistics if available.
4321
4322 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4323
4324         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4325
4326 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4327
4328         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4329
4330 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4331
4332         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4333         
4334         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4335
4336         * driver.c (mono_main): Ditto.
4337
4338 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4339
4340         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4341
4342         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4343         in the vtable can't be encoded.
4344         (compile_method): Ditto.
4345
4346 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4347
4348         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4349         defined.
4350
4351         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4352         lmf->rbp.
4353
4354         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4355         the top LMF entry belongs to the current method.
4356
4357         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4358
4359 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4362         
4363         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4364
4365         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4366
4367         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4368
4369         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4370
4371         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4372         implementation.
4373
4374         * basic-float.cs: Add an ulong->double cast test.
4375
4376 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4377
4378         * mini.c (mono_method_to_ir): Fix a warning.
4379
4380 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * mini-ops.h: Add OP_SWITCH.
4383
4384         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4385         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4386
4387 2007-12-11  Geoff Norton  <gnorton@novell.com>
4388
4389         * mini-s390x.c: Minor change to the MAX() define to allow
4390         it to compile with other gcc versions.
4391
4392 2007-12-11  Geoff Norton  <gnorton@novell.com>
4393
4394         * cpu-s390x.md:
4395         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4396
4397 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4398
4399         exceptions-arm.c (mono_arch_get_restore_context): Restore
4400         the frame pointer.
4401
4402         exceptions-arm.c (throw_exception): Save the frame pointer.
4403         This is a partial fix for #323747. Only the client side is
4404         fixed.
4405
4406 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4407
4408         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4409         was using an unrelated variable to log the class which
4410         needed the cctor to be called. This was crashing on arm.
4411
4412 2007-12-09  Robert Jordan  <robertj@gmx.net>
4413
4414         * mini-x86.c (mono_arch_emit_epilog):
4415         Consider all kinds of 64-bit types. Fixes #323114.
4416
4417 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4420
4421 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4422
4423         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4424
4425 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4426
4427         * mini.c: run type ctor before allocating an object, not only
4428         when running it's constructor method (fixes at least part of bug #342507).
4429
4430 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4431         
4432         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4433         
4434         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4435         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4436         function.
4437
4438         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4439         mono_generic_class_init_trampoline () the same as it is done with the other
4440         trampolines.
4441
4442         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4443         aot-runtime.c aot-compiler.c: Implement AOT support.    
4444
4445 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4446
4447         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4448         build for archs which don't have the vtable trampoline defined
4449         yet.
4450
4451 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4454
4455         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4456
4457         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4458
4459         * tramp-<ARCH>.c: Use the new helper function.
4460
4461 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4462
4463         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4464         trampoline call, which takes a vtable argument.
4465
4466         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4467         OP_TRAMPCALL_VTABLEs like other calls.
4468
4469         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4470         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4471         call.  Implemented a support function which fetches the vtable
4472         from a register set.
4473
4474         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4475         Implemented a generic class init trampoline, using the
4476         OP_TRAMPCALL_VTABLE opcode.
4477
4478         * mini.c: Implemented static field access when sharing generic
4479         code.  This implies initing the class using the new
4480         OP_TRAMPCALL_VTABLE call.
4481
4482 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4483
4484         * mini.c: Don't compile methods with sharing enabled if their
4485         classes are disabled for sharing.
4486
4487 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4488
4489         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4490         opcodes. Fixes #346563.
4491
4492         * objects.cs: Add a new test.
4493
4494         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4495
4496         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4497         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4498
4499 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4502
4503 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4506         code stream.
4507
4508 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4509
4510         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4511
4512         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4513         optimization in the AOT case.
4514         
4515 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4516
4517         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4518         
4519         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4520
4521         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4522
4523         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4524
4525         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4526         is created by the inlined delegate ctor.
4527
4528         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4529
4530         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4531
4532 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4533
4534         * cpu-x86.md: Fix the length of ckfinite.
4535
4536 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4537
4538         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4539         
4540         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4541         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4542
4543         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4544
4545         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4546         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4547
4548 2007-11-28  Martin Baulig  <martin@ximian.com>
4549
4550         * mini-x86.c
4551         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4552         after creating the trampoline.
4553
4554 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4555
4556         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4557
4558         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4559         the same version.
4560
4561         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4562         instead of the calling method to help AOT.
4563
4564         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4565
4566 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4567
4568         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4569         is defined.
4570
4571 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4572
4573         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4574         
4575         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4576         (encode_method_ref): No need to handle generic method definitions specially.
4577
4578         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4579
4580         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4581         decode_klass_info.
4582
4583         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4584         encode_klass_info.
4585         (compile_method): Enable generic sharing.
4586
4587 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4588
4589         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4590         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4591
4592         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4593         generic code.
4594
4595         * mini-trampolines.c: Fix a warning.
4596
4597         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4598         NEW_PCONST.
4599         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4600         (generic_class_is_reference_type): Remove unused function.
4601
4602         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4603         in the generic vtable trampoline case.
4604
4605         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4606         
4607         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4608         return an AOT method based on a vtable slot.
4609
4610         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4611
4612         * mini.c (mini_get_vtable_trampoline): Export this.
4613
4614 2007-11-22  Martin Baulig  <martin@ximian.com>
4615
4616         * debug-debugger.h
4617         (MonoDebuggerInfo): Move `debugger_version' up.
4618
4619 2007-11-22  Martin Baulig  <martin@ximian.com>
4620
4621         * mini-amd64.c
4622         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4623
4624         * mini-trampolines.c
4625         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4626         after compiling the method.
4627
4628 2007-11-20  Martin Baulig  <martin@ximian.com>
4629
4630         * debug-mini.c
4631         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4632         (mono_debugger_remove_breakpoint): Likewise.
4633         (mono_debugger_check_breakpoints): Likewise.
4634
4635         * debug-debugger.c: Implement the new breakpoint interface here.
4636
4637 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4638
4639         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4640         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4641
4642         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4643
4644 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4645
4646         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4647
4648         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4649         mini.c.
4650
4651         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4652         mini.c.
4653
4654         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4655         returning a vtype in a register.
4656
4657         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4658         here from the arch specific code.
4659
4660         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4661         mini.c.
4662
4663         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4664         (mono_arch_emit_prolog): Increment maximum prolog size.
4665
4666         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4667         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4668
4669         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4670         MonoGenericSharingContext.
4671
4672         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4673         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4674
4675 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4676
4677         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4678         which extract fields out of the runtime generic context.  Full
4679         sharing of the NEWARR opcode.
4680
4681 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4682
4683         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4684         --enable-minimal=ssa.
4685
4686 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4687
4688         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4689         mono_marshal_get_delegate_invoke () signature change.
4690
4691 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4692
4693         * mini.c: Removed the shared context in favor of the generic
4694         sharing context.  Allocate the MonoJitInfo structure with room for
4695         the generic sharing context if it's needed.
4696
4697         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4698         domain-internals.h now.
4699
4700         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4701
4702         * generic-sharing.c: Several changes for working without a shared
4703         context and instead operating on open types instead.
4704
4705 2007-11-12  David S. Miller  <davem@davemloft.net>
4706
4707        * inssel-sparc.brg: Fix double instruction emit.
4708
4709 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4710
4711         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4712         Get/Set/Address methods.
4713         
4714         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4715         mono_marshal_get_delegate_invoke signature change.
4716
4717 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4718
4719         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4720         This can happens with dynamic methods. Fixes the other bug in #322722.
4721
4722 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4723
4724         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4725         BX call sequence.
4726
4727         * mini-arm.c (arm_patch): Implement patching of BX call
4728         sequence. Fixes one of the bugs in #322722.
4729
4730 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4731
4732        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4733        under Linux.  We only need to flush every 32-byte cache line.    
4734
4735 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4736
4737         * mini.c:
4738         move_basic_block_to_end: Add branches when needed, eventually creating
4739         a new BB.
4740         optimize_branches: added a parameter that tells if it's ok to create
4741         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4742         and avoid calling move_basic_block_to_end when it's not ok.
4743         Fixes bug 318677.
4744
4745 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4746
4747         * mini.c: Abort inlining call to InitializeArray if something
4748         looks wrong.  Let the icall handle it, which now has proper safety
4749         checks.
4750
4751 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4752
4753         * mini.c (mono_spill_call): add support for soft-float.
4754
4755         * mini.c (mono_method_to_ir): add support for soft-float
4756         to inlined functions that return float.
4757
4758         * mini.c (mono_method_to_ir): add support for soft-float
4759         to cee_stsfld opcode on float fields.
4760
4761 2007-11-05  Geoff Norton  <gnorton@novell.com>
4762
4763         * mini-x86.h: Fix the structure access for X86 Leopard.
4764
4765
4766 2007-11-05  Martin Baulig  <martin@ximian.com>
4767
4768         * mini-trampolines.c
4769         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4770         after compiling the method to notify the debugger.
4771
4772 2007-11-05  Martin Baulig  <martin@ximian.com>
4773
4774         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4775
4776 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4777
4778         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4779         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4780
4781 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4784         native-to-managed wrappers.
4785         
4786 2007-11-01  Geoff Norton  <gnorton@novell.com>
4787
4788         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4789         members.
4790
4791 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4792
4793         * mini.c, mini-x86.c: when getting back from unmanaged code
4794         to managed via a marshaled delegate we also need to set the
4795         right domain.
4796
4797 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4798
4799         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4800         for amd64.
4801
4802 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4803
4804         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4805         let the debugger or other external agents to tell the JIT when
4806         a sw breakpoint has been inserted in the code that the JIT needs
4807         to be able to inspect.
4808
4809 2007-10-31  Martin Baulig  <martin@ximian.com>
4810
4811         * debug-debugger.h
4812         (MonoDebuggerInfo): Remove `runtime_class_init'.
4813
4814 2007-10-30  Martin Baulig  <martin@ximian.com>
4815
4816         * debug-mini.h
4817         (mono_debugger_thread_created): Added `MonoThread *' argument.
4818         (mono_debugger_extended_notification): New public method.
4819         (mono_debugger_trampoline_compiled): New public method.
4820
4821         * debug-mini.c
4822         (MonoDebuggerThreadInfo): Added `thread' and
4823         `extended_notifications' fields.
4824
4825         * debug-debugger.c
4826         (debugger_executable_code_buffer): New static variable.
4827
4828         * debug-debugger.h
4829         (MonoDebuggerInfo): Added `executable_code_buffer',
4830         `executable_code_buffer_size', `breakpoint_info_area',
4831         `breakpoint_table' and `breakpoint_table_size'.
4832
4833 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4834
4835         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4836         that IP  either is an unused value or the vtable pointer. IMT 
4837         calls use vtable + offset now. Reduced by almost half the size
4838         of IMT entries.
4839
4840 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4841
4842         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4843         defines to access param registers. Replace long usage with
4844         gsize as sizeof(long) != sizeof(void*) on Win64.
4845
4846         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4847         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4848         instead of non-existant _GetAddressOfReturnAddress.
4849
4850         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4851         param registers. Save/restore %rdi and %rsi in MonoLMF.
4852
4853         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4854         param registers. Modify (throw_exception) signature to take 
4855         %rdi and %rsi on Win64. 
4856
4857         Code is contributed under MIT/X11 license.
4858
4859 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4860
4861         * helpers.c: unlink debugging output files.
4862
4863 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4864
4865         * mini.c: Move mono_create_ftnptr () to object.c.
4866
4867 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4868
4869         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4870         optional. This function can now be used to disassemble code generated
4871         outside the JIT such as trampolines and IMT thunks.
4872
4873         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4874
4875         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4876         vtable pointer from a ldr instruction.
4877
4878         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4879         new IMT call sequence.
4880
4881         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4882         call sequence for interface invocations.
4883
4884         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4885         for imt support. This function is empty since IMT on ARM requires no
4886         special handling on the IR side.
4887
4888         * mini-arm.c (mono_arch_find_imt_method): added, required for
4889         imt support.
4890
4891         * mini-arm.c (mono_arch_find_this_argument): added, required
4892         for imt support.
4893
4894         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4895         a ldr instruction to load a value stored in the code stream.
4896
4897         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4898         for imt support.
4899
4900
4901 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * mini.c (mini_init): Install the jump trampoline callback.
4904
4905 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4906
4907         * mini-trampolines.c: handle synchronized methods with the common
4908         vtable trampoline (bug #335601).
4909
4910 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4911
4912         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4913
4914         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4915         64 bit platforms.
4916
4917         * mini-ia64.h mini-ia64.c: Add support for IMT.
4918
4919         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4920         prolog. Fixes #331958.
4921
4922 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4925
4926 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4927
4928         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4929         trampoline.
4930
4931 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4932
4933         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4934         trampoline.
4935
4936 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4937
4938         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4939         trampoline.
4940
4941 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4942
4943         * mini-trampolines.c: changed the magic rampoline to understand
4944         the common vtable trampoline method: the method to invoke is
4945         determined by the vtable displacement of the call.
4946
4947 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4948
4949         * mini.c, mini.h: register the common vtable trampoline if the
4950         architecture supports it.
4951
4952 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4953
4954         * cpu-amd64.md: use the correct max length for tls_get.
4955
4956 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4959         CEE_STELEM_ANY. Fixes #333696.
4960
4961 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4962
4963         * exceptions-x86.c: provide more graceful handling of the case where
4964         we followed a bogus function pointer from managed code (bug #332866).
4965
4966 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4967
4968         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4969         replaces the generic_shared flag and will carry more information
4970         in the future.
4971
4972         * generic-sharing.c: Added mini_type_stack_size() which allows
4973         allows open types if given a generic sharing context.
4974         mini_get_basic_type_from_generic() takes a
4975         MonoGenericSharingContext* instead of a MonoCompile* now.
4976
4977         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4978         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4979         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4980         changes above.  Just passing arguments through to the right
4981         places.
4982
4983 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4984
4985         * mini-arm.c: unify the call emission to emit_code_seq().
4986
4987 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4988
4989         * tramp-arm.c: reduced the trampoline size.
4990
4991 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4992
4993         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4994         variable handling out of arch-specific code.
4995
4996 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4997
4998         * mini-arm.c: implemented fast delegate dispatch.
4999
5000 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5001
5002         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5003         that fp elimination is turned off if the space required by locals is too
5004         big. Fixes #331958.
5005
5006 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5007
5008         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5009         ARM to the new style trampoline.
5010
5011 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5012
5013         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5014
5015         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5016
5017 2007-10-09  Martin Baulig  <martin@ximian.com>
5018
5019         * debug-debugger.h
5020         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5021         `field_info_offset_offset'.     
5022
5023 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5024
5025         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5026         removed more internal usage of the r11 register and made it available
5027         to the register allocator.
5028
5029 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5030
5031         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5032         when sharing generics and treat type variables as references.
5033
5034 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5035
5036         * mini-ppc.c: started removing the internal uses of register r11
5037         to eventually allow the register allocator to manage it as an
5038         additional available register.
5039
5040 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5041
5042         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5043
5044 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5045
5046         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5047         specific trampolines as they are not performance critical as a jump
5048         target (maybe align as before only for AOT code?). This saves about
5049         200 KB of native code on x86 for monodevelop startup.
5050
5051 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5052
5053         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5054         monodevelop startup.
5055
5056 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5057
5058         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5059
5060         * mini-sparc.h mini-sparc.c: Implement IMT support.
5061
5062         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5063         its smaller and doesn't clobber sparc_g1.
5064
5065         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5066
5067 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5068
5069         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5070
5071 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5072
5073         * mini-ppc.c: implemented fast delegate invocation.
5074
5075 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5076
5077         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5078
5079 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5080
5081         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5082         code to the new style trampoline in preparation for IMT support.
5083
5084 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5085
5086         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5087         systems already. This also reduces the specific trampiline sizes and
5088         prepares for the use of r12 as the IMT identifier register.
5089
5090 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5091
5092         * mini-mips.h: endianess fix (simplified from a patch by
5093         Thomas Kunze <thommy@tabao.de>, bug #323737).
5094
5095 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5096
5097         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5098         to access ucontext fields and enable netbsd support
5099         (partially from Magnus Henoch <mange@freemail.hu>).
5100
5101 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5102
5103         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5104         use the preprocessor from the CPP env var if it is set.
5105
5106 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5107
5108         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5109         code, before interface_offset gets used.
5110
5111 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5112
5113         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5114         mono_class_setup_vtable () before accessing klass->vtable.
5115
5116 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5117
5118         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5119         hackish.
5120
5121 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5122
5123         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5124         IMT slots (this saves hundreds of KB of memory in programs like
5125         IronPython and Monodevelop).
5126
5127 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5128
5129         * mini.c: print the delegate counter.
5130
5131 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5132
5133         * mini-x86.c: make it easier to enable the debugging code for IMT
5134         slots.
5135
5136 2007-09-28  Martin Baulig  <martin@ximian.com>
5137
5138         * debug-debugger.h
5139         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5140         `mono_method_klass_offset' and `mono_method_token_offset'.
5141
5142 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5143
5144         * mini.c: First generics sharing implementation.  Can only share
5145         in very simple cases.  If sharing doesn't work it falls back to
5146         dedicated compilation.
5147
5148         * mini.h: Flag in MonoCompile to specify whether generic
5149         compilation is shared.  Flags enum for marking which generic inst
5150         of a context is used.  Prototypes for helper functions.
5151
5152         * generic-sharing.c: Helper functions for generic method sharing.
5153
5154         * optflags-def.h: Optimization flag (gshared) for enabling generic
5155         method sharing added.
5156
5157         * Makefile.am: generic-sharing.c added.
5158
5159 2007-09-19 Daniel Nauck <dna@mono-project.de>
5160
5161         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5162
5163 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5164         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5165         fixes bug 325507.
5166
5167 2007-09-19  Martin Baulig  <martin@ximian.com>
5168
5169         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5170         mono_debug_cleanup() is now part of mono_cleanup().
5171
5172 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * driver.c (mono_main): Fix a warning.
5175
5176 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5177
5178         * aot-compiler.c: Optimize various parts when processing large assemblies.
5179         Fixes ##325568.
5180
5181         * mini.c (mono_patch_info_hash): Improve hash function.
5182
5183 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5184
5185         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5186         
5187         Code is contributed under MIT/X11 license.
5188
5189 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5190
5191         * mini.c (mini_init): Fix a leak.
5192
5193         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5194
5195 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5196
5197         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5198
5199 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5200
5201         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5202
5203 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5204
5205         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5206         variance tests.
5207
5208         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5209
5210         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5211
5212         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5213
5214         * aot-runtime.c (decode_patch_info): Ditto.
5215
5216 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5217
5218         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5219         static case. Cache delegates in architecture specific code, 
5220         based on number of parameters.
5221         
5222         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5223         in architecture specific code, based on number of parameters.
5224         
5225         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5226         caching happen in architecture specific code now.
5227         
5228         Code is contributed under MIT/X11 license.
5229
5230 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5231
5232         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5233         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5234         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5235
5236         Code is contributed under MIT/X11 license.
5237
5238 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5239         * mini.c: (mono_thread_abort) Fixed bug #82416.
5240
5241 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5242
5243         * mini.: hook the new managed GC allocation feature into the JIT.
5244
5245 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5246
5247         * mini.c: implementation for the new runtime tls opcode.
5248
5249 2007-09-11  Martin Baulig  <martin@ximian.com>
5250
5251         * debug-debugger.h
5252         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5253         `mono_method_inflated_offset'.
5254
5255 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5256
5257         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5258         async exceptions into a method.
5259
5260         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5261         purpose of testing whenever the unwinder works at every instruction.
5262
5263 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5264
5265         * mini.c: check accessibility of method used in ldftn (fixes
5266         bug #82635).
5267
5268 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5269
5270         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5271
5272         * inssel.brg: Fix a warning.
5273
5274 2007-09-03  Martin Baulig  <martin@ximian.com>
5275
5276         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5277         now takes the `main_method' as argument.
5278
5279 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5282
5283 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5284
5285         * driver.c: include the cil-coff.h header on Windows.
5286         
5287         Code is contributed under MIT/X11 license.
5288
5289 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5290
5291         * mini.c, driver.c: don't include the cil-coff.h header.
5292
5293 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5294
5295         * mini.c: flag places that needs fixes fo soft-float support.
5296
5297 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5298
5299         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5300         endian systems (partially from Dean Jenkins, bug #81924).
5301
5302 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5303
5304         * mini.c (check_linkdemand): Remove embedded reference object in
5305         call to LinkDemandSecurityException.
5306         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5307         with an IntPtr instead of a reference object.
5308
5309 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5310
5311         * mini.c (handle_initobj): Handle alignment properly.
5312
5313         * inssel.brg (mini_emit_memset): Ditto. 
5314
5315         * inssel.brg (mini_emit_memcpy): Ditto. 
5316
5317         * inssel-sparc.brg: Ditto.              
5318
5319         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5320
5321 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5322
5323         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5324         exceptions raised in unmanaged code. Fixes part of #82594.
5325
5326 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5327
5328         * mini.c (mono_method_to_ir), declsec.c
5329         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5330
5331 2007-08-22  Martin Baulig  <martin@ximian.com>
5332
5333         * debug-mini.h
5334         (MonoDebuggerThreadInfo): New typedef.
5335         (mono_debugger_thread_table): New global variable.
5336         (mono_debugger_thread_created): New public function.
5337         (mono_debugger_thread_cleanup): New public function.
5338
5339         * debug-debugger.h
5340         (MonoDebuggerInfo):
5341         - removed `get_current_thread' and `lookup_assembly'.
5342         - removed `data_table'.
5343         - added `thread_table'.
5344
5345         * mini.c
5346         (mono_thread_start_cb): Call mono_debugger_thread_created().
5347         (mono_thread_attach_cb): Likewise.
5348         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5349         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5350         initial domain.
5351
5352         * driver.c (mono_main): Move mono_debug_init() up, before calling
5353         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5354
5355 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5356
5357         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5358         together when passing several arguments of type double (gives a small
5359         speedup and saves a few bytes of generated code).
5360
5361 2007-08-20  Jb Evain  <jbevain@novell.com>
5362
5363         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5364
5365 2007-08-20  Jb Evain  <jbevain@novell.com>
5366
5367         * mini.c (mono_method_to_ir): throw MethodAccessException
5368         and FieldAccessException instead of InvalidProgramException.
5369
5370 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5371
5372         * mini.c: CoreCLR security checks.
5373
5374         * mini.h: Removed MonoSecurityMode (moved to
5375         metadata/security-manager.h) and mono_security_mode global var
5376         (replaced by set/get functions in security-manager.h).
5377
5378         * driver.c: Added "core-clr-test" security mode for testing.  Used
5379         set-function for setting security mode.
5380
5381 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5382
5383         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5384         the new jit_info_table.
5385
5386         * driver.c: Test code for the new jit_info_table (enabled by the
5387         define MONO_JIT_INFO_TABLE_TEST).
5388
5389 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5390
5391         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5392         detection of call <REG> instruction sequence. Fixes build on freebsd.
5393
5394 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5395
5396         * mini-exceptions.c: Fix a warning.
5397
5398 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5399
5400         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5401         stack overflow handling code on amd64 too.
5402
5403         * mini-exceptions.c (mono_setup_altstack): Make this use 
5404         mono_thread_get_stack_bounds ().
5405
5406         * mini-x86.h: Disable sigaltstack on solaris x86.
5407
5408 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5409
5410         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5411
5412 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5413
5414         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5415
5416 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5419
5420         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5421
5422 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5423
5424         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5425         due to alignment.
5426
5427 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5428
5429         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5430         to be emitted (bug #82281).
5431
5432 2007-08-01  Martin Baulig  <martin@ximian.com>
5433
5434         Merged the `debugger-dublin' branch.
5435
5436         * debug-debugger.h (MonoDebuggerInfo):
5437         Removed the `old_*' compatibility entries.
5438         Added `debugger_version' and `data_table'.
5439         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5440         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5441
5442         * debug-mini.c
5443         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5444         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5445         instead of a `gconstpointer'.
5446         (mono_debugger_insert_method_breakpoint): Return a
5447         `MonoDebugMethodAddressList *'.
5448
5449 2007-06-28  Martin Baulig  <martin@ximian.com>
5450
5451         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5452
5453 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5454
5455         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5456         __builtin_frame_address () since it is broken on older gcc versions.
5457
5458 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5459
5460         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5461         on the stack overflow handling and made the managed stack overflows
5462         catchable in most cases using soft guard pages.
5463         * exceptions-x86.c: added code to restore the protection in the soft
5464         guard pages at the end of exception handling.
5465
5466 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5467
5468         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5469
5470 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5471
5472         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5473         exception handling.
5474
5475 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5476
5477         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5478         signal handling support until it has been ported to the new mechanism.
5479         * mini.c: fixed stack overflow detection and use the new
5480         architecture code  to handle signals on the altstack.
5481
5482 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5483
5484         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5485         stack overflows on the alt stack.
5486
5487 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5488
5489         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5490         stack overflows on the alt stack.
5491
5492 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5493
5494         * exceptions-ppc.c: cleanup preparing for altstack support.
5495
5496 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5497
5498         * exceptions-arm.c: cleanup preparing for altstack support.
5499
5500 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5501
5502         * mini.c (print_jit_stats): Output hazard pointer stats.
5503
5504 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5505
5506         * driver.c, mini.c: Replaced security mode flags with a single
5507         enum variable.
5508
5509 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5510
5511         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5512
5513 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5514
5515         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5516         (which doesn't do anything yet) for activating Core CLR
5517         (Silverlight) security.
5518
5519 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5520
5521         * mini-codegen.c: work around a possible gcc bug on arm.
5522
5523 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5524
5525         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5526         message for platforms that don't support AOT compilation.
5527
5528 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5529
5530         * mini.h, mini.c, driver.c: temporary smcs hack.
5531
5532 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5533
5534         * mini-arm.h, mini-arm.c: arm EABI fixes.
5535
5536 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5537
5538         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5539         case.
5540
5541         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5542         trampolines taking a method argument.
5543
5544         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5545
5546         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5547         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5548
5549         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5550         JIT compilation throws an exception. Fixes #82050.
5551
5552 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5553
5554         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5555         with the MONO_EXCEPTION_ defines.
5556
5557 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5558
5559         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5560         #82117.
5561         
5562         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5563         the cause of an assertion.
5564
5565 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5566
5567         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5568         removed.
5569
5570 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5571
5572         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5573         assert. Should fix #82103.
5574
5575 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5576
5577         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5578         here too. Fixes #82095.
5579
5580         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5581         addresses.
5582
5583         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5584
5585         * mini-amd64.h: Enable IMT for amd64.
5586         
5587         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5588
5589 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5592
5593 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5594
5595         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5596         as soon as check_linkdemand sets an exception_type.
5597
5598 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5599
5600         * mini-x86.c: fixed offsets for IMT call sequence.
5601         * mini-x86.h: enable IMT again.
5602
5603 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5604
5605         * trace.c (mono_trace_enter_method): Decode MonoType too.
5606
5607         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5608
5609         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5610
5611         * mini-amd64.c: Add preliminary IMT implementation.
5612         
5613 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5614
5615         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5616         understand the new IMT-base interface invocation (thanks to
5617         Daniel Nauck for the report and the remote debugging session).
5618
5619 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5620
5621         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5622
5623 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5626
5627 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5628
5629         * mini-trampolines.c: implement AOT IMT support.
5630         * mini-x86.h: enable IMT support for wider testing.
5631
5632 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5633
5634         * inssel.brg (emit_imt_argument): Add aot support here.
5635
5636         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5637
5638 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5639
5640         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5641         of the IMT implementation, partially from massi, with my
5642         implementation of the bsearch sequence. Disabled by default until
5643         the AOT code is implemented.
5644
5645 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5646
5647         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5648
5649         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5650
5651 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5652
5653         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5654         arch-independent IMT JIT code from Massimiliano
5655         Mantione (massi@ximian.com) with small cleanups from me.
5656
5657 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5658
5659         * Makefile.am: fix svn invocation to get the svn revision to be
5660         independent of the local language (build fix).
5661
5662 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5663
5664         * mini.c (inline_method): Reset cfg->exception_type if the
5665         inlining is aborted.  Fixes: 82049.
5666
5667 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5668
5669         * mini.c: remove assert from exception handling code when exception_ptr
5670         is not set.
5671
5672 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5673
5674         * mini.c (mono_codegen): Add an assert.
5675
5676         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5677         enter and leave code.
5678         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5679
5680 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5681
5682         * mini-ppc.c: fixed memory corruption for localloc(0)
5683         (bug #81852).
5684
5685 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5686         
5687         * mini.c: Fix warnings.
5688
5689 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5690
5691         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5692         to emit better double->int conversions.
5693
5694 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5695
5696         * mini.c: the provided Min/Max optimizations are valid for unisgned
5697         ints.
5698
5699 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5700
5701         * 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
5702
5703 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5704
5705         * mini.c (mono_running_on_valgrind): Add support for reporting the
5706         method and  its boundaries to valgrind.
5707
5708 2007-06-28  Martin Baulig  <martin@ximian.com>
5709
5710         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5711
5712 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5715
5716         * generic.2.cs: Add new test case.
5717
5718 2007-06-25  Martin Baulig  <martin@ximian.com>
5719
5720         Merged the `debugger-dublin' branch.
5721
5722         * debug-mini.c
5723         (mono_debugger_insert_method_breakpoint): New public method.
5724         (mono_debugger_remove_method_breakpoint): Likewise.
5725         (mono_debugger_check_breakpoints): New static method.
5726         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5727
5728         * debug-debugger.h (MonoDebuggerInfo):
5729         Renamed (to keep backward compatibility in the vtable):
5730         `insert_breakpoint' -> `old_insert_breakpoint'.
5731         `remove_breakpoint' -> `old_remove_breakpoint'.
5732         `create_string' -> `old_create_string'.
5733         `lookup_class' -> `old_lookup_class'.
5734         `lookup_type' -> removed; changed into a dummy field.
5735         `lookup_assembly' -> `old_lookup_assembly'.
5736         Added (same functionality, but different signature):
5737         `create_string', `lookup_class', `lookup_assembly'
5738         Added new:
5739         `get_method_addr_or_bpt', `remove_method_breakpoint',
5740         `runtime_class_init'.
5741
5742         * debug-debugger.c: Merged the `debugger-dublin' branch.
5743
5744 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5745
5746         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5747         well.
5748         (peephole_pass): Likewise.
5749
5750 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5751
5752         * driver.c: hopefully make setaffinity work also for ancient
5753         versions of linux.
5754
5755 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5756
5757         * driver.c : win32 build fix.
5758
5759 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5760
5761         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5762         processor if it is set.
5763
5764 2007-06-21  Martin Baulig  <martin@ximian.com>
5765
5766         * debug-mini.h: New file.
5767
5768         * debug-mini.c
5769         (mono_debugger_insert_breakpoint_full): Moved here from
5770         ../metadata/mono-debug-debugger.c.
5771         (mono_debugger_remove_breakpoint): Likewise.
5772         (mono_debugger_breakpoint_callback): Likewise.
5773
5774 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5775
5776         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5777         changes in MonoGenericClass.
5778
5779 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5780
5781         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5782
5783 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5784
5785         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5786         removal of MonoGenericMethod.
5787
5788 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5789
5790         * mini-exceptions.c: hooks for the exception events profiling API.
5791
5792 2007-06-14  Randolph Chung  <tausq@debian.org>
5793
5794         * Makefile.ma: Add hppa target.
5795         * mini-arch.h: Include mini-hppa.h
5796         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5797         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5798         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5799
5800 2007-06-14  Randolph Chung  <tausq@debian.org>
5801
5802         * inssel.brg: Add rules for "chained" compare-branch operations so that
5803         a single compare op can affect multiple branches.  Adjust cost for
5804         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5805         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5806         cost for some rules so that they can more easily be overridden by
5807         per-arch rules (with fixes from lupus).
5808         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5809
5810 2007-06-13  Randolph Chung  <tausq@debian.org>
5811
5812         * mini-ops.h: Reorder branch ops so that they match the order of the
5813         corresponding CEE_* ops.  The code expects them this way.
5814         Add new ops for HPPA target.
5815         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5816
5817 2007-06-13  Randolph Chung  <tausq@debian.org>
5818
5819         * mini-exceptions.c: Handle cases where the stack grows towards
5820         larger addresses.
5821         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5822
5823 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5824
5825         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5826         counter.
5827         * driver.c: explain where a non-matching corlib is found.
5828
5829 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5830
5831         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5832
5833 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5834
5835         * mini-exceptions.c: Generate a method profile leave event during
5836         an exception to ensure that the profiler gets notified.
5837
5838 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5839
5840         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5841         branch.
5842
5843         * cpu-amd64.md: Add long_and/or/xor opcodes.
5844
5845 2007-06-06  Wade Berrier  <wberrier@novell.com>
5846
5847         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5848         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5849         length of instruction shr_imm (expected 8, got 10)
5850
5851 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5852
5853         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5854
5855 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5856
5857         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5858         MonoInternalHashTable again (fixed bug in the internal hash table
5859         code).
5860
5861 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5862
5863         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5864         Have to figure out what makes it crash the SWF regression.
5865
5866 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5867
5868         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5869
5870 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5871
5872         * mini.c: optimize out the type check when storing null in a
5873         reference array.
5874
5875 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5876
5877         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5878         MonoInternalHashTable.
5879
5880 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5881
5882         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5883         signed integer methods.
5884
5885 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5886
5887         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5888         permanently since the current approach doesn't work.
5889
5890 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5891
5892         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5893         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5894
5895 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5896
5897         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5898         the sreg2==rdx case.
5899         
5900         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5901         account if it contains a rex prefix.
5902         (peephole_pass): Handle OP_FMOVE as well.
5903
5904 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5905
5906         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5907         as it causes regressions.
5908
5909 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5910
5911         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5912         static case as well.
5913
5914         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5915
5916         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5917         (mono_arch_get_this_arg_from_call): Ditto.
5918
5919         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5920
5921         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5922         invoke_impl field.
5923
5924         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5925         (mono_arch_get_this_arg_from_call): Ditto.
5926
5927         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5928         
5929         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5930         try to create optimized invoke code and use that for further invocations. 
5931         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5932
5933         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5934
5935 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5936
5937         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5938         sealed classes or methods.
5939         *devirtualization.cs: tests for the new optimization
5940
5941 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5942
5943         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5944         by the update_volatile () function.
5945
5946 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5947
5948         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5949         require it.
5950
5951         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5952
5953 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5954
5955         * mini.c: Add configure checks for header files.
5956         * mini-x86.c: Add configure checks for header files.
5957         * trace.c: Add configure checks for header files.
5958         * aot-runtime.c: Add configure checks for header files.
5959         * aot-compiler.c: Add configure checks for header files.
5960         * driver.c: Add configure checks for header files.
5961         * mini-codegen.c: Add configure checks for header files.
5962         
5963         Code is contributed under MIT/X11 license.
5964
5965 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5966
5967         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5968         icompare_imm -128 + op_iclt. Fixes #81703.
5969
5970 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5971
5972         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5973
5974 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5975
5976         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5977         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5978         so that all isinst checks now use "interface_bitmap".
5979
5980 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * cpu-amd64.md (jmp): Fix a warning.
5983
5984         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5985
5986         * basic.cs: Add new regression test.
5987
5988         * basic.cs: Remove test which is now in basic-long.cs.
5989
5990         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5991
5992         * basic-long.cs: Add new test.
5993         
5994 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5995
5996         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5997
5998 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5999
6000         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6001
6002         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6003         places.
6004         
6005         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6006         throwing code a bit.
6007
6008         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6009         the exception throwing code a bit.
6010
6011         * mini-x86.c (get_call_info): Allocate result from a mempool.
6012
6013 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6016
6017         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6018
6019         * mini.h (MonoCompile): Add 'token_info_hash' field.
6020
6021         * mini.c: Save token->method associations during compilation so the AOT 
6022         compiler can use it.
6023         
6024         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6025         which reference generic classes and methods.
6026
6027 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6028
6029         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6030
6031         * aot-compiler.c (compile_method): Fix a typo in a comment.
6032
6033         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6034
6035         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6036         everything generic.
6037
6038         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6039
6040 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6041
6042         * mini.h (MonoCompile): Add 'args' field.
6043
6044         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6045         into cfg->args.
6046
6047         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6048
6049 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6050
6051         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6052
6053         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6054
6055         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6056         opcodes for some opcodes.
6057
6058         * mini.h *.brg *.c: Use the new opcodes.
6059
6060 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6061
6062         * mini.h: Bumped aot revision.
6063
6064         * inssel.brg: modified code generation of type checks for interfaces
6065         to use the new "MonoClass.interface_bitmap" instead of the old
6066         "MonoClass.interface_offsets".
6067
6068 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6069
6070         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6071
6072 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6073
6074         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6075         64 bit platforms.
6076
6077 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6078
6079         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6080
6081 2007-04-27  Wade Berrier  <wberrier@novell.com>
6082
6083         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6084         mini.h) to fix build.
6085
6086 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6087
6088         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6089         
6090         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6091         causes the corlib unit tests to fail.
6092
6093 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6094
6095         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6096
6097         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6098
6099         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6100         opcodes to the comparison relations.
6101
6102         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6103         opcodes to their types.
6104         
6105         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6106
6107         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6108         it in cfg->arch.cinfo.
6109
6110         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6111
6112         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6113         cfg->cil_offset_to_bb.
6114
6115 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6116
6117         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6118         created becase of initlocals.
6119
6120 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6121
6122         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6123         Sergey Tikhonov <tsv@solvo.ru>.
6124
6125 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6126
6127         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6128
6129 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6130
6131         * cpu-s390.md (break): Correct the length of break instruction.
6132
6133 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6134
6135         * mini.c: fix a couple of soft-float issues and comments.
6136
6137 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6138
6139         * trace.c (is_filenamechar): - is also a filename char.
6140
6141 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6142
6143         * mini-s390.c: Correct checking for enum type in return value processing.
6144
6145 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6146
6147         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6148         (version.h): Makefile is in the build directory.
6149
6150 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6151
6152         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6153
6154 2007-04-11  Martin Baulig  <martin@ximian.com>
6155
6156         * mini.c (can_access_member): Fix handling of generic classes;
6157         fixes #81259.
6158
6159 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6160
6161         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6162
6163 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6164
6165         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6166
6167 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6168
6169         * mini-codegen.c: make sure the right spill amount is
6170         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6171
6172 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6173
6174         * mini-ppc.c: fixes for the fp_branch_nan test.
6175
6176 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6177
6178         * basic.cs: Comment out new test which still fails on ia64.
6179
6180 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6181
6182         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6183
6184 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6185
6186         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6187
6188 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6189
6190         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6191         on 64 bit machines. Fixes part of #80738.
6192
6193         * basic.cs: Add regression test.
6194
6195 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * inssel.brg basic.cs: Revert previous change to fix build.
6198
6199         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6200         platforms.
6201         
6202         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6203
6204         * basic.cs: Add new regression test.
6205
6206 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6207
6208         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6209         many arguments.
6210
6211 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6212
6213         * cpu-s390x.md: Correct length of break instruction.
6214
6215 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6216
6217         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6218         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6219
6220 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6221
6222         * *.c: Begin WIN64 port.
6223         * mini.c:  Use correct register in profiler.
6224         * mini-amd64.c: No inline assembly on Win64.
6225         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6226         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6227         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6228         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6229         mono_arch_ip_from_context for Win64.
6230         
6231         Contributed under MIT/X11 license.
6232
6233 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6234
6235         * exceptions-amd64.c (seh_handler): Ditto.
6236
6237         * exceptions-x86.c (seh_handler): Fix a memory leak.
6238
6239 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6240
6241         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6242         mini-s390x.c: fixed peephole optimizations to deal
6243         correctly with 1 and 2 byte reload avoidance.
6244
6245 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6246
6247         * cpu-s390.md, cpu-s390x.md: update localloc length.
6248
6249 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6250
6251         * cpu-g4.md: added missing descriptions.
6252
6253 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6254
6255         *  Makefile.am: Add support so the tail tests are not executed on
6256         PowerPC as that is a known limitation of the PowerPC port.
6257
6258 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6259
6260         * runmdesc.bat:  Move to msvc directory.
6261         
6262 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6263
6264         * runmdesc.bat:  Run executable that was produced by the current
6265         target and sent via an argument.
6266         
6267 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6268
6269         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6270         #81102.
6271
6272         * generics.2.cs: Add regression test.
6273
6274 2007-03-09  Wade berrier  <wberrier@novell.com>
6275
6276         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6277
6278 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6279
6280         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6281         AOT code depends on this.
6282
6283 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6284
6285         * mini.c: more precise tracking of types in the eval stack
6286         (part of fix for bug #81044).
6287
6288 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6289
6290         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6291
6292         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6293
6294 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6295
6296         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6297
6298         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6299
6300 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6301
6302         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6303         a pointer on 64 bit systems. Fixes #80190.
6304
6305         * iltests.il: Add new regression test.
6306
6307 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6308
6309         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6310
6311 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6312
6313         * trace.c: Remove an erroneous alignemnt check when tracing.
6314           Fixes --trace on OSX86.
6315
6316 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6317
6318         * mini-$(arch).h: initialize SP in context for all the archs.
6319
6320 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6321
6322         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6323         regressions in the thread tests.
6324
6325 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6326
6327         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6328         - fixed implementation of LOCALLOC opcode
6329         - implemented non-un compare for floats
6330         - code cleanup
6331         - implementation of FDIV and CKFINITE opcodes
6332         - fixes for latest mono updates
6333         - additional arch opcodes
6334
6335 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6336
6337         * Makefile.am: simplify and merge rules for cross-compilation.
6338
6339 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6340
6341         * local-propagation.c: Actually *apply* the fix for bug 80591...
6342
6343 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6344
6345         * mini-exceptions.c: backuot part of the last change
6346         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6347
6348 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6349         * inssel.brg: Fix bug 59286.
6350
6351
6352 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6353
6354         * mini-exceptions.c: patch from Zoltan to correctly check for
6355         stack boundaries (using the stack register, not the frame register),
6356         fixes bugs #80724, #79717.
6357
6358 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6359
6360         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6361         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6362
6363         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6364         presence of frame pointer elimination.
6365
6366 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6367         
6368         * mini-x86.h: NetBSD UCONTEX_REG defines.
6369
6370 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6371
6372         * inssel-amd64.brg: Fix amd64 build.
6373
6374 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6375
6376         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6377         on amd64.
6378
6379 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6380
6381         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6382         ends.
6383
6384         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6385
6386 2007-01-30 Mark Mason <mason@broadcom.com>
6387
6388            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6389            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6390            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6391            beginning support for CEE_JMP [not quite working yet]
6392            * tramp-mips.c: LMF handling now works
6393         
6394 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6395
6396         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6397
6398         * mini.h (NULLIFY_INS): New macro.
6399
6400 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6401
6402         * mini.c: statistical profiler fix for windows, patch
6403         from Tor Lillqvist (tml@novell.com).
6404
6405 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6406         * local-propagation.c: Fix bug 80591.
6407
6408 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6409
6410         * Makefile.am: put back the --export-dynamic option as with
6411         the previous gmodule flags (thanks to Robert Jordan).
6412
6413 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6416
6417         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6418         simplify and speed up the local register allocator. Also rename some fields
6419         like iassign->vassign.
6420         
6421         * regalloc.c: Remove some functions which are no longer used since their
6422         inlined version is in mini-codegen.c.
6423         
6424         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6425
6426         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6427
6428 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6429
6430         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6431         narrowing. Fixes #80622.
6432
6433         * iltests.il: Add new regresssion test. 
6434
6435 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6436
6437         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6438         debug-debugger.c, debug-debugger.h: warning fixes.
6439         * driver.c: updated copyright year and made it fit in one line.
6440
6441 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6442
6443         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6444
6445 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6446
6447         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6448
6449         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6450
6451         * iltests.il: Add new test for bug #80507.
6452
6453 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6454
6455         * mini-arm.h: use soft-float also on vfp for now.
6456
6457 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6458
6459         * mini.c: fix some more soft-float issues.
6460
6461 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6462
6463         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6464
6465 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6466         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6467         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6468         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6469
6470 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6471
6472         * mini-arm.c: typo fix.
6473
6474 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6475
6476         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6477
6478 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6479
6480         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6481         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6482
6483         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6484
6485         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6486
6487         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6488         
6489         * inssel.brg: Fix a warning.
6490
6491         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6492
6493         * abcremoval.c ssa.c ssapre.c: Update after this change.
6494         
6495         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6496
6497         * dominators.c (df_set): Use mono_bitset_union_fast.    
6498
6499 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6500
6501         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6502         mini-codegen.c: reduce relocations and memory usage for the cpu
6503         description.
6504
6505 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6506
6507         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6508
6509         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6510         to reduce their size.
6511
6512 2007-01-19 Mark Mason <mason@broadcom.com>
6513
6514         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6515         * mini-mips.c: more configuration macros, support long conditional branches, additional
6516         asserts, fix epilog instrumentation.
6517         * mini-mips.h: use standard stack walk
6518         * cpu-mips.md: increase size of div, rem and conditional branches
6519         
6520 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6521
6522         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6523         to cpu spec data.
6524
6525 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6526
6527         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6528         (compile_method): Ditto.
6529
6530         * aot-runtime.c (decode_klass_info): Ditto.
6531
6532         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6533         needed by the code generated by inssel.brg. Also fix a warning.
6534
6535 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6536
6537         * mini.c: deal with enums that become genericinsts by
6538         being nested in a generic class (bug #79956).
6539
6540 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6541
6542         * mini.c: match the generic definition to check for
6543         private access with generic types (bug #78431).
6544
6545 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6546
6547         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6548         to make life easier for people cross-compiling that insist on not
6549         using scratchbox.
6550
6551 2007-01-17 Mark Mason <mason@broadcom.com>
6552
6553         * inssel-long.brg: patch to deal with mips missing flags
6554         * inssel-long32-mips.brg: implement overflow checks
6555         * insset-mips.brg: implement overflow checks
6556         * mini-mips.h: implement conditional exception handling
6557         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6558           Remove unused code, minor cleanups.
6559         * exceptions-mips.c: minor cleanups
6560         * mini-ops.h: add mips conditional exception ops
6561         * cpu-mips.md: add mips conditional exception ops
6562
6563         
6564 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6565
6566         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6567         to deal with mips missing of flags.
6568
6569 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6570
6571         * exceptions-ppc.c: execute fault handlers.
6572
6573 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6574
6575         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6576
6577 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6578
6579         * mini.c: handle also floating point values in initialize_array.
6580
6581 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6582
6583         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6584         array initialization and make it conditional on the intrins option.
6585
6586 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6587
6588         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6589         relocations and put the patch info names close to the enum definition.
6590
6591 2007-01-15 Mark Mason <mason@broadcom.com>
6592
6593         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6594
6595 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6596
6597         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6598
6599 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6600
6601         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6602
6603 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6604
6605         * Makefile.am: distribute the mips sources.
6606
6607 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6608
6609         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6610         directly.
6611
6612 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6613
6614         * cpu-x86.md: back out for now as this triggers other regressions.
6615
6616 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6617
6618         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6619         to eax:edx, so ecx can't get allocated to them (bug #80489).
6620
6621 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6622
6623         * mini.c, mini-exceptions.c: enabled running fault handlers
6624         (bug #80469).
6625
6626 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6627
6628         * driver.c: If nothing fail, do not use the string "failed",
6629         because it makes it very annoying to view test result logs on the
6630         web. 
6631
6632 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6633
6634         * debug-debugger.c (mono_debugger_main): Rename "main" to
6635         "main_method" to prevent a warning.
6636
6637         Remove a warning for unused field.
6638
6639 2006-12-28  Martin Baulig  <martin@ximian.com>
6640
6641         * debug-debugger.c
6642         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6643
6644 2006-12-22  Martin Baulig  <martin@ximian.com>
6645
6646         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6647         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6648         seperate `.mdb_debug_info' section, so we can access it from the
6649         debugger even if the binary is stripped.
6650
6651         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6652         from the `.mdb_debug_info' here to prevent the linker from
6653         removing that section.
6654
6655         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6656         mdb-debug-info64.s.
6657
6658 2006-12-19  Robert Jordan  <robertj@gmx.net>
6659
6660         * mini-x86: enable the code to return small structures in
6661         registers for FreeBSD as well. Fixes bug #80278.
6662         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6663
6664 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6665
6666         * mini-x86.c: align the stack when calling the profiler
6667         function instrumenting the prolog (on OSX).
6668
6669 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6670
6671         * mini.c: emit a break opcode where Debugger.Break () is called.
6672
6673 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6674
6675         * mini.c (mono_method_to_ir): Provide useful information on this
6676         assert, to prevent others from debugging like I did.
6677
6678 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6679
6680         * mini.c: enable code which was incorrectly commented
6681         (bug #80235).
6682
6683 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6684
6685         * mini-x86.c: enable on OSX, too, the code to return small
6686         structures in registers.
6687
6688 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6689
6690         * mini-x86.c: remove the use of the dynamic code manager here, too.
6691
6692 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6693
6694         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6695         mono_debugger_create_notification_function() to use
6696         mono_global_codeman_reserve () instead of a dynamic code manager.
6697
6698 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6699
6700         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6701         ves_array_element_address() jit icall and use a generated
6702         managed method instead (which is about 4 times faster for a rank 3
6703         array access).
6704
6705 2006-11-29  Mark Mason  <mason@broadcom.com>
6706
6707         * basic-calls.cs: additional tests for passing
6708         structures as function arguments.
6709
6710 2006-11-29  Mark Mason  <mason@broadcom.com>
6711
6712         * mini-mips.h: disable custom exception handling
6713         * mini-mips.c: throw/rethrow should use jalr to call
6714         exception stubs.  Fixed bug with passing structures
6715         by value. More support for tracing floating point
6716         functions.
6717
6718 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6719
6720         * mini.c: fixed typo in the soft-float ldind.r4 handling
6721         (bug #80086).
6722
6723 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6724
6725         * mini.c, mini.h, driver.c: added --runtime command line
6726         option to select a different runtime than the autodetected one.
6727         * jit.h: added API for embedders to initialize with a specific
6728         runtime version.
6729
6730 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6731
6732         * mini.c: handle also boxing of r4 values (bug #80024).
6733
6734 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6735
6736         * mini-ppc.c: force indirect calls until we reserve
6737         enough address space for all the generated code.
6738
6739 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6740
6741         * exceptions-arm.c: workaround bugs in the libc definition
6742         of struct ucontext.
6743
6744 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6745
6746         * inssel.brg: fixes from me and Mark Mason.
6747
6748 2006-11-23  Dick Porter  <dick@ximian.com>
6749
6750         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6751         semaphore display now we've fixed the initial value
6752
6753 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6754
6755         * inssel.brg: partially revert the last change to fix the build.
6756
6757 2006-11-21  Mark Mason  <mason@broadcom.com>
6758
6759         * inssel.brg: Add and use compare-and-branch macros to support
6760         architectures that do not have condition code registers (ie. MIPS).
6761         * *-mips.{c,brg,md}: Fix copyright statements
6762
6763 2006-11-20  Mark Mason  <mason@broadcom.com>
6764
6765         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6766         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6767         * mini.h: Added declaration for mono_print_ins()
6768         * mini-codegen.c: added ins_spec initializer for MIPS
6769         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6770         vreg to be virtual and hreg to be non-virtual.
6771         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6772         is not yet working/implemented correctly.
6773         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6774         non-static, fixup calls to print_ins() from other parts in the file.
6775
6776 2006-11-20  Mark Mason  <mason@broadcom.com>
6777
6778         * basic-calls.cs: added tests for passing structures as arguments
6779         to calls.
6780
6781 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6782
6783         * inssel-long32.brg: optimize signed division by power of two.
6784
6785 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6786
6787         * mini-arm.c: added support for interworking with thumb code
6788         (mono must be still be built using the ARM instruction encoding).
6789
6790 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6791
6792         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6793         verifier has different rules for it.   Fixes a few verifier issues
6794         in the test suite.
6795
6796         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6797         at the end, so people know what happened.
6798
6799 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6800
6801         * brach-opts.c: in optimize_exception_target() make sure we
6802         are in a catch clause (fixes bug #79871).
6803
6804 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6805
6806         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6807         more soft-float support fixes.
6808
6809 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6810
6811         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6812         that are passed half on the stack and half in registers.
6813
6814 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6815
6816         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6817         more mips integration work from Mark E Mason 
6818         <mark.e.mason@broadcom.com>.
6819
6820 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6821
6822         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6823         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6824         tramp-mips.c: added sources for the mips port, not
6825         integrated in the build yet. Contributed by
6826         Mark E Mason <mark.e.mason@broadcom.com>.
6827
6828 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6829
6830         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6831
6832 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6833
6834         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6835         put the soft-float rules in its own file since it seems to
6836         break s390 compilation.
6837
6838 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6839
6840         * mini-arm.c: fixed wrnings.
6841
6842 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6845         inssel-arm.brg: ARM support for soft-float.
6846
6847 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6848
6849         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6850         loads and stores of 32 bit fp values.
6851
6852 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6853
6854         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6855
6856         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6857         works. Fixes #79852 and #79463.
6858
6859 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6860
6861         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6862         more soft-float support WIP and fixes.
6863
6864 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6865
6866         * mini-arm.c: some VFP updates.
6867
6868 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6869
6870         * mini-exceptions.c: 0 is a valid local var offset in some
6871         architectures, don't assert (bug #78508).
6872
6873 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6874
6875         * exceptions-arm.c: fixed off by one error in stack walk code.
6876
6877 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6878
6879         * mini.h, mini.c: more precise tracking of type load exceptions.
6880
6881 2006-11-03  Robert Jordan  <robertj@gmx.net>
6882
6883         * Makefile.am: [WIN32] Add monow.exe target.
6884         * driver.c: [WIN32] Don't detach the console when debugging.
6885         Fixes bug #79797.
6886         
6887 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6888
6889         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6890
6891 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6892
6893         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6894
6895         * driver.c (mini_regression): Fix --regression with AOT.
6896
6897         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6898
6899 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6900
6901         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6902
6903         * mini-sparc.h: Don't use sigaction on sparc/linux.
6904
6905         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6906
6907         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6908
6909         * mini-exceptions.c: Add proper include files for getpid ().
6910
6911 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6912
6913         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6914         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6915         method.
6916
6917         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6918         name cache to reduce its size.
6919
6920         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6921
6922 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6923
6924         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6925         the mono_lmf TLS variable.
6926
6927         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6928         trampoline lmf frames.  
6929
6930         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6931
6932 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6933
6934         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6935         the mono_lmf TLS variable.
6936
6937         * mini-exceptions.c: Access the LMF structure through accessors.
6938
6939         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6940         variable instead of in jit_tls->lmf.
6941
6942         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6943         
6944         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6945         trampoline lmf frames.
6946
6947         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6948
6949 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6950
6951        * mini.c trace.c mini-x86.c: Revert these too.
6952         
6953        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6954        signature change.
6955
6956 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6957
6958         * genmdesc.c: removed now dead code.
6959
6960 2006-10-09  Robert Jordan <robertj@gmx.net>
6961
6962         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6963
6964 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6965
6966         * mini.h: do not leave gaps in the opcode values.
6967
6968 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6969
6970         * jit-icalls.h: flag functions as internal here, too.
6971
6972 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6973
6974         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6975         functions with the internal attribute.
6976
6977 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6978
6979         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6980
6981 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6982
6983         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6984         for soft-float.
6985
6986 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6987
6988         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6989         tail calls as on other platforms.
6990
6991         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6992
6993         * iltests.il: Add a few tailcall tests.
6994
6995 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6996
6997         * driver.c: fix loop for old compilers (bug #79521).
6998
6999 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7000
7001         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7002
7003         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7004
7005         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7006         metadata without any code.
7007
7008         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7009         more precise debugging information using gdb.
7010
7011 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7012
7013         * inssel-ia64.brg: Make the helper methods static.
7014
7015 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7016
7017         * inssel-x86.brg: make the helper methods static.
7018
7019 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7020
7021         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7022
7023 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7024
7025         * mini.c: updates for monoburg changes.
7026         * inssel.brg: make a few helper functions static as they should.
7027
7028 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7029
7030         * Makefile.am: Move mini-codegen.c to common_sources.
7031
7032 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7033
7034         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7035         instructions.
7036         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7037         mini-ppc.h: port to use the common local register allocator.
7038
7039 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7040
7041         * mini.h: Remove the comment too then.
7042
7043 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7044
7045         * mini.h: put back backend.data which is to be used shortly and
7046         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7047         pointers on 4 byte boundaries it'd have much bigger issues running
7048         and you can ifdef it out anyway.
7049
7050 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7051
7052         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7053         MonoInst size by 4 bytes on 64 bit machines.
7054
7055 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7056
7057         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7058         replacement with more meaningful field names. Arch maintainers, please
7059         check the assigned names are good enough for your arch.
7060
7061 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7062
7063         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7064         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7065
7066 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7067
7068         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7069         relocations and memory requirements, put the optimization flags
7070         definitions in their own file.
7071
7072 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7073
7074         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7075
7076         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7077
7078 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7079
7080         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7081
7082 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7083
7084         * inssel.brg: use the correct function to get the size of an item
7085         in an array, given an element class.
7086         * aot-compiler.c: do not access class->class_size directly.
7087
7088 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7089
7090         * mini.h, debug-mini.c: added a debugging function to print
7091         info about local variables and arguments in a jitted method.
7092
7093 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7094
7095         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7096
7097         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7098
7099 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7100
7101         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7102         inner and outer loops when passing vtypes.
7103
7104 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7105
7106         * mini-ppc.c: take into account the cpu errata for cache flushing
7107         which caused some random errors (bug #79381).
7108
7109 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7110
7111         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7112         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7113
7114 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7115
7116         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7117         loaded.
7118
7119         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7120         freebsd ports tree.
7121
7122         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7123         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7124
7125         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7126         displacement.
7127
7128 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7129
7130         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7131
7132 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7133
7134         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7135         macro does not have to be changed during debugging.
7136
7137         * 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>.
7138
7139         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7140
7141         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7142         
7143         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7144         MONO_ARCH_NO_EMULATE_MUL is defined.
7145
7146         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7147
7148         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7149
7150         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7151
7152         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7153         
7154 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7155
7156         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7157         stuff to mini-exceptions.c where it is used.
7158
7159         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7160         setup code, the real one is in mini-exceptions.c.
7161
7162         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7163         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7164         some changes from the freebsd ports tree.
7165
7166         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7167         constants.
7168         
7169         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7170
7171 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7172
7173         * mini.c: on Linux, check for /proc to be mounted
7174         (bug# 79351, novell bug#201204).
7175
7176 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7177
7178         * mini.c: handle cases where pthread_attr_getstack() behaves
7179         incorrectly (bug #78096).
7180
7181 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7182
7183         * mini-arm.c: support larger stack frames (bug #79272).
7184
7185 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7186
7187         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7188
7189         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7190         tokens.
7191
7192         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7193         mono_class_from_name () to find a class from its name.
7194
7195         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7196
7197 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7198
7199         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7200
7201 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7202
7203         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7204
7205 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7206
7207         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7208         callinfo->trampoline.
7209
7210         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7211         fixes #79271.
7212         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7213         future.
7214
7215 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7216
7217         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7218
7219 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7220
7221         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7222         stats.method_trampolines, it is already done by the generic trampoline code.
7223
7224         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7225         
7226 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7229
7230         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7231
7232         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7233
7234         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7235         
7236         * mini.c (print_jit_stats): Print new stats.
7237
7238         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7239
7240 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7243         Address on two dimensional arrays. Fixes #78729.
7244
7245         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7246
7247         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7248         a method.
7249
7250         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7251
7252         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7253         #79130.
7254         
7255         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7256         a race condition.
7257         (mini_get_ldelema_ins): Ditto.
7258
7259 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7260
7261         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7262         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7263         Fixes #79213.
7264
7265 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7266
7267         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7268         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7269
7270         * exceptions-s390x.c: Cosmetic change.
7271
7272         * tramp-s390.c: Fix warning.
7273
7274         * cpu-s390.md: Correct length of mul_imm.
7275
7276 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7277
7278         * aot-compiler.c: added binary writer with ELF backend
7279         implementation (only on Linux/x86 for now).
7280
7281 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7282
7283         * Makefile.am: Don't run net 2.0 AOT tests.
7284
7285         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7286         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7287
7288         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7289
7290 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7291
7292         * aot-compiler.c: simplified and refactored the asm-writing code
7293         to allow different backends.
7294
7295 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7296
7297         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7298
7299         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7300         little. Share patches of type TYPE_FROM_HANDLE as well.
7301
7302         * mini.c (mono_patch_info_equal): New helper function.
7303         (mono_patch_info_hash): Ditto.
7304
7305         * aot-compiler.c (emit_method_code): Fix s390 build.
7306
7307         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7308         is not handled because it is stored as a flag and not as a type ctor. Fixes
7309         #79016.
7310
7311 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7312
7313         * aot-compiler.c: Fix computation of GOT slot statistics.
7314         
7315         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7316         Also remove support for not PIC AOT.
7317
7318         * mini.h: Bump AOT file format version.
7319
7320         * objects.cs: Add a test for #78990.
7321
7322         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7323         (peter.dettman@iinet.net.au). Fixes #79087.
7324
7325         * basic-long.cs: Add a test for the above.
7326
7327 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7328
7329         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7330         
7331         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7332         code somewhat.
7333
7334 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7335
7336         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7337         exceptions.
7338
7339 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7340
7341         * mini.c: Don't verify COM proxy invoke calls
7342         
7343
7344 2006-08-10  Dick Porter  <dick@ximian.com>
7345
7346         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7347         which process is holding semaphores locked.
7348
7349 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7350
7351         * mini-ia64.c mini-amd64.c: Fix #79027.
7352
7353         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7354
7355         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7356
7357         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7358         implicit arguments in a vararg call. Fixes #79027.
7359
7360 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7361
7362         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7363         (mono_get_array_new_va_signature): Ditto.
7364
7365 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7366
7367         * aot-runtime.c: Call init_plt lazily.
7368
7369         * inssel-long.brg: Fix unsigned long->int conversion.
7370
7371         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7372
7373         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7374         that most data is now in the .rss/.data section.
7375
7376 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7377
7378         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7379
7380         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7381
7382         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7383
7384         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7385
7386         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7387         virtual call. Fixes #79010.
7388
7389         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7390         and use the result as the this argument in the real call.
7391
7392         * generics.2.cs: Add a new test for #79010.
7393         
7394 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7395
7396         * mini-x86.c: Fix a warning.
7397
7398         * aot-compiler.c: Add a bunch of statistics.
7399
7400         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7401
7402 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7403
7404         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7405
7406 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7407
7408         * 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>.
7409
7410 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7411
7412         * mini.c (mono_method_to_ir): Obtain the original method in the
7413         CIL stream and use this to perform validation.
7414
7415         Fixed: #78816
7416
7417 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7418
7419         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7420         (mono_arch_call_opcode): Ditto.
7421
7422         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7423         #78826.
7424
7425         * mini.c (mono_patch_info_dup_mp): New helper function.
7426         
7427         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7428         compilation. Fixes #78827.
7429
7430 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7431
7432         * declsec.c: Use original security informations for
7433           MONO_WRAPPER_MANAGED_TO_MANAGED.
7434
7435 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7436
7437         * mini.c: Allow Com Interop methods/classes and
7438         don't verify COM wrapper calls
7439         
7440
7441 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7442
7443         * inssel-long32.brg: Fix long->i4 checked conversion.
7444
7445         * exceptions.cs: Add a test for the above.
7446
7447 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7448
7449         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7450
7451         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7452         leaks.
7453
7454         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7455         #78775.
7456
7457 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7458
7459         * mini.c: Fix solaris/x86 exception handling.
7460
7461         * Makefile.am: Get rid of $(ICU_LIBS).
7462
7463 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7464
7465         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7466         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7467         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7468
7469         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7470
7471         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7472         this function causes a SIGSEGV.
7473
7474 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7475
7476         * mini.c: Remove unused solaris/x86 includes.
7477
7478 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7481
7482 2006-06-20  Jb Evain  <jbevain@gmail.com>
7483
7484         * cpu-g4.md: fix max length of start_handler instruction.
7485
7486 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7487         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7488
7489 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7490         * ssa.c: Fixed bug 78653 for SSA based deadce.
7491         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7492         MonoInst.flags, used in SSA based deadce.
7493         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7494         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7495
7496 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7497
7498         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7499         it can end up using non executable memory on ppc64 systems
7500         running ppc32 userspace (fix from Johannes Berg).
7501
7502 2006-06-14  Dick Porter  <dick@ximian.com>
7503
7504         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7505         4.1.1
7506
7507 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7508         * mini.c: Made so that inline is locally disabled if it would
7509         trigger a .cctor, because too many apps depend on this behavior
7510         (which seems to be also the one of the MS CLR).
7511
7512 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7513
7514         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7515         No idea why this worked before.
7516
7517         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7518         which branch to outer exception clauses since they could skip the
7519         inner finally clauses. Fixes #78633.
7520
7521         * exceptions.cs: Add a test for the above.
7522
7523         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7524         Fixes #78629.
7525
7526         * iltests.il: Add a test for the above.
7527
7528 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7529
7530         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7531         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7532
7533         * iltests.il: Add a test for the above.
7534
7535 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7536
7537         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7538         
7539         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7540         methods as instrinsics.
7541
7542 2006-06-09  Wade Berrier <wberrier@novell.com>
7543
7544         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7545         (simple-cee-ops.h ssapre-mini-ops.h)
7546
7547 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7548
7549         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7550         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7551         instruction).
7552         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7553         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7554
7555 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7556
7557         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7558
7559 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7560
7561         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7562         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7563         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7564         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7565         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7566         of opcodes, so that bug 78549 should not happen again.
7567         * ssapre.c: Updated to use the renamed files.
7568
7569 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7570
7571         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7572         in OP_ATOMIC_EXCHANGE_I4.
7573
7574 2006-06-07  Wade Berrier <wberrier@novell.com>
7575
7576         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7577         in mono_debugger_create_notification_function)
7578
7579 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7580
7581         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7582         
7583         * mini.c (type_from_stack_type): Disable some changes which do not
7584         seem to work.
7585
7586         * driver.c: Reenable opts.
7587
7588         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7589         of the evaluation stack.
7590         
7591         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7592         evaluation stack trace at entry to the bblock.
7593
7594         * mini.c (merge_stacks): New function to perform verification of stack merges.
7595         Turned off by default.
7596
7597         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7598         STACK_MP.
7599         
7600 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7601
7602         * local-propagation.c: Fixed bug 78549.
7603
7604 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7605
7606         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7607
7608 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7609
7610         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7611         tramp-arm.c, tramp-ia64.c
7612         (mono_debugger_create_notification_function): Update signature to
7613         new signature and use new protocol for creating the notification
7614         function.  
7615
7616         Should fix the build.
7617
7618 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7619
7620         * exceptions-ppc.c (mono_jit_walk_stack)
7621         (ves_icall_get_frame_info): Fix the build
7622
7623 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7624
7625         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7626
7627 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7628
7629         * il2tests.2.il: New file for generics CIL tests.  Add test for
7630         #78019.
7631         * Makefile.am: Update.
7632
7633         Fix #78019
7634         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7635         to nullable types.
7636
7637 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7638
7639         * aliasing.c: Fixed bug 78311.
7640
7641 2006-05-29  Martin Baulig  <martin@ximian.com>
7642
7643         * mini-exceptions.c (mono_find_jit_info): When computing the
7644         native offset, check whether we're actually inside the method's
7645         code; call mono_debug_print_stack_frame() to format the frame.
7646         (ves_icall_System_Exception_get_trace): Call
7647         mono_debug_print_stack_frame() to format the stack frame.
7648         (ves_icall_get_trace): Update to the new debugging API.
7649         (mono_jit_walk_stack_from_ctx): Likewise.
7650         (ves_icall_get_frame_info): Likewise.
7651
7652         * mini.c (get_method_from_ip): Use the new debugging API.
7653         (mono_print_method_from_ip): Likewise.
7654
7655         * exceptions-ppc.c
7656         (mono_jit_walk_stack): Use the new debugging API.
7657         (ves_icall_get_frame_info): Likewise.   
7658
7659 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7660
7661         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7662
7663 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7664
7665         * mini.c: Added "limitator" to inline for debugging.
7666
7667 2006-05-24  Martin Baulig  <martin@ximian.com>
7668
7669         * debug-debugger.c (mono_debugger_init): Create a private,
7670         malloc()-based code manager for the notification function and
7671         intentionally leak it on exit.  This fixes the crash-on-exit race
7672         condition.
7673
7674         * tramp-amd64.c
7675         (mono_debugger_create_notification_function): Added
7676         `MonoCodeManager *' argument.
7677
7678         * tramp-x86.c
7679         (mono_debugger_create_notification_function): Added
7680         `MonoCodeManager *' argument.
7681
7682 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7683
7684         * aliasing.c: Fixed 64 bit issue.
7685         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7686         default since all known bugs are fixed (one more time!).
7687
7688 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7689
7690         * mini.c: write barrier support.
7691
7692 2006-05-23  Martin Baulig  <martin@ximian.com>
7693
7694         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7695         check at the top of the file.
7696
7697 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7698
7699         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7700         reverting changes without reason and without changelog entries.
7701
7702 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7703
7704         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7705         to a few opcodes. Fixes #78439.
7706
7707         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7708         consistency with other archs.
7709
7710         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7711
7712 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7713
7714         * debug-debugger.c: fix the build.
7715
7716 2006-05-17  Martin Baulig  <martin@ximian.com>
7717
7718         * debug-debugger.c
7719         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7720         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7721         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7722         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7723
7724 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7725
7726         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7727
7728 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7729
7730         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7731         MONO_TYPE_GENERICINST.
7732         
7733         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7734         MONO_TYPE_GENERICINST.
7735
7736 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7737
7738         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7739         #78325.
7740
7741 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7742
7743         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7744         mempool.
7745         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7746
7747 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7748
7749         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7750         mono_trace_cleanup ().
7751
7752         * iltests.il: Fix problem with the newly added test.
7753
7754         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7755         due to register constraints, free up the previous hreg. Fixes #78314.
7756
7757         * iltests.il: Add new test for #78314.  
7758
7759         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7760         Interlocked.Add. Fixes #78312.
7761
7762         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7763         
7764 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7767
7768 2006-05-05  Martin Baulig  <martin@ximian.com>
7769
7770         * debug-mini.c (mono_debug_open_block): New method.
7771
7772         * mini-amd64.c
7773         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7774         the beginning of each basic block.
7775
7776         * mini-x86.c
7777         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7778         the beginning of each basic block.
7779
7780 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7781
7782         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7783         default until I understand why they break the build on amd64.
7784
7785 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7786
7787         * mini.c (mini_cleanup): Call mono_cleanup ().
7788
7789         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7790         errors.
7791
7792 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7793
7794         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7795         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7796         default since all known bugs are fixed, and I cannot reproduce bug
7797         77944... I'm asking Matt Hargett to test again after this commit.
7798
7799 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7800
7801         * mini-codegen.c: Fixed typo that thrashed inline.
7802
7803 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7804
7805         * dominators.c (compute_dominators): Avoid using a worklist since
7806         it is not correct in some cases. Instead, iterate over all bblocks as
7807         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7808
7809 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7810
7811         * mini.c (mono_jit_compile_method_inner): Use
7812         mono_prepare_exception_from_error that resets the value
7813         internally.
7814
7815 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7816
7817         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7818         
7819 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7820
7821         * aliasing.c: Fixed bug 78210.
7822
7823 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7824
7825         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7826         default until all their problems (or the ones they trigger) are fixed.
7827
7828 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7829
7830         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7831         
7832         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7833         as loaded only after resolving patches since that could invoke the same method.
7834
7835         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7836
7837         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7838         functions.
7839
7840         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7841         AOT loader.
7842
7843         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7844         stack.
7845
7846         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7847         made from AOT code through the PLT table.
7848
7849         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7850         holding the plt offset when a call is made to the aot plt trampoline.
7851         
7852 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7853
7854         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7855         amd64 AOT support.
7856
7857         * Makefile.am (common_sources): Fix build breakage.
7858
7859         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7860         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7861         intra-assembly calls if possible.
7862         
7863         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7864
7865         * mini-trampolines.c: Handle PLT entries.
7866
7867         * mini.c: Avoid creating a GOT var for calls.
7868
7869         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7870         from mscorlib code.
7871
7872         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7873         from mscorlib code.
7874
7875         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7876         AOT code.       
7877
7878         * mini.h: Bump AOT file format version.
7879         
7880         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7881         covers more cases.
7882
7883 2006-04-25  Martin Baulig  <martin@ximian.com>
7884
7885         * driver.c: Disable copyprop, consprop and inline when running
7886         inside the debugger.
7887
7888 2006-04-25  Martin Baulig  <martin@ximian.com>
7889
7890         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7891         with `get_current_thread' and added `detach'.
7892         (MonoDebuggerMetadataInfo): Added `thread_size',
7893         `thread_tid_offset', `thread_stack_ptr_offset' and
7894         `thread_end_stack_offset'.
7895
7896 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7897
7898         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7899         aot-runtime.c.
7900
7901         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7902         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7903
7904         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7905
7906         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7907
7908         * aot.c: Add support for ADJUSTED_IID.  
7909
7910 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7911
7912         * aot.c (emit_method_order): Don't align method_order_end.
7913
7914         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7915         the interface ID changes.
7916
7917 2006-04-21  Dick Porter  <dick@ximian.com>
7918
7919         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7920         cleaning up a thread.  Fixes the new part of bug 77470.
7921
7922 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7923
7924         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7925         to managed wrapper.
7926                      
7927 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7928
7929         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7930         
7931         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7932         SIGSEGV. Fixes #78072.
7933
7934         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7935         unregister our SIGABRT handler.
7936
7937 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7938
7939         * mini.c: Disabled inline where it can alter the call stack in a
7940         way visible from managed code.
7941         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7942         default.
7943
7944 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7945
7946         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7947         on other platforms. Fixes #78089.
7948
7949 2006-04-13  Martin Baulig  <martin@ximian.com>
7950
7951         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7952         determine whether we're inside the debugger.
7953
7954         * debug-debugger.h
7955         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7956
7957 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7958
7959         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7960         handler clauses. Fixes #78024.
7961
7962         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7963         in the CALL_MEMBASE opcodes. Fixes #78088.
7964         (mono_arch_get_vcall_slot_addr): Ditto.
7965
7966 2006-04-10  Martin Baulig  <martin@ximian.com>
7967
7968         * debug-debugger.c: The thread handling code has now been moved
7969         into ../metadata/threads.c.
7970
7971 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7972
7973         * driver.c (mono_main): Fix --with-gc=none build.
7974
7975         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7976         (mono_spillvar_offset_float): Ditto.
7977         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7978         hreg, not when its !global, since on ia64, there is a third category: stacked
7979         registers.      
7980
7981 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7982
7983         * mini.c: set MonoInst->klass for load field address and a few other
7984         places.
7985
7986 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7987
7988         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7989
7990 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7991
7992         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7993         the branch opt changes.
7994
7995 2006-04-06  Dick Porter  <dick@ximian.com>
7996
7997         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7998         
7999         * wapihandles.c (mini_wapi_seminfo): 
8000         * driver.c (mono_main): Add semaphore info option
8001
8002 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8003
8004         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8005         branch optimization changes. Fixes #78009.
8006
8007 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8008
8009         * mini.c: ignore accessibility of methods in managed->native wrappers.
8010
8011 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8012
8013         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8014         
8015         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8016
8017 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8018
8019         * mini.c: Modify the branch optimizations to preserve the invariant that
8020         the entries inside the in_bb and out_bb arrays are unique.
8021         (mono_unlink_bblock): Avoid creation of new arrays.
8022
8023 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8024
8025         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8026         change (#77992).
8027
8028 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8029
8030         * mini.c (optimize_branches): Remove the "optimizations" in
8031         the cbranch1/cbranch2 -> branch cases which were causing several
8032         problems in the past. Fixes #77986.
8033
8034 2006-03-31  Chris Toshok  <toshok@ximian.com>
8035
8036         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8037         default optimizations :(
8038
8039 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8040
8041         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8042         branch.
8043
8044 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8045
8046         * local-propagation.c: Added comments to structs and removed
8047         "Mono" prefixes from local tree mover types.
8048
8049 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8050
8051         * Makefile.am (arch_sources): Define this for each architecture so 
8052         libmono_la_SOURCES is defined in one place.
8053
8054 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8055
8056         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8057         from handles/.
8058
8059 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8060
8061         * driver.c: print the GC name supplied by configure.
8062
8063 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8064
8065         * local-propagation.c: Added tree mover, and moved here all the
8066         local propagation code from mini.c
8067         * mini.c: Added support for treeprop, and moved all the local
8068         propagation code to local-propagation.c
8069         * mini.h: Added support for treeprop
8070         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8071         treeprop, inline and deadce by default
8072         * Makefile.am: Added local-propagation.c
8073
8074 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8077
8078 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8079
8080         * debug-debugger.c: make it compile without the Boehm GC.
8081
8082 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8083
8084         * mini.c: fixed issue with mismatch when an icall is registered
8085         with multiple names but same address.
8086
8087 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8088
8089         * declsec.c, mini-exceptions.c: use write barrier to set reference
8090         fields of managed objects.
8091
8092 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8093
8094         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8095         (can_access_internals): Fix a warning.
8096
8097         * mini.c (print_method_from_ip): Rename this to 
8098         mono_print_method_from_ip so it gets exported.
8099
8100         * trace.c: Deal with strings inside StringBuilder's containing garbage
8101         and fix memory leaks. Fixes #77848.
8102
8103 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8104
8105         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8106         fixes #77787.
8107
8108 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8109         
8110         * mini-s390.c: Remove OP_X86_TEST_NULL.
8111
8112 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8113
8114         * mini.c: use the correct GetHashCode() for the moving collector.
8115
8116 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8117
8118         * liveness.c: Regalloc spill cost tuning.
8119
8120 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8121         
8122         * mini-s390x.h: Correct S390_LONG macro.
8123
8124         * mini-s390x.c: Cleanup unused code.
8125
8126 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8127
8128         * jit-icalls.h: New file.
8129
8130         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8131         icalls and include that instead of including jit-icalls.c.
8132
8133         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8134         OP_X86 opcodes.
8135
8136 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8137
8138         * mini.c: when checking for member accessibility, also check for
8139         friend assemblies and for explicit interface implementations.
8140
8141 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8142
8143         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8144
8145         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8146
8147         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8148         common cases are done first.    
8149
8150         * mini-ops.h: Only define platform specific opcodes on the given platform.
8151
8152         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8153         branch.
8154         
8155 2006-03-14  Martin Baulig  <martin@ximian.com>
8156
8157         Revert Paolo's change from r57348:
8158
8159         * mini.h: don't use gboolean for bitfields.
8160         * mini.c: verifier changes for fields and methods accessibility.
8161
8162 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8163
8164         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8165
8166         * mini-s390x.c: Fix conv_r_un.
8167
8168         * cpu-s390, cpu-s390x.md: Fix lengths.
8169
8170 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8171
8172         * mini.c: nested types have access to all the nesting
8173         levels, not just the enclosing types.
8174
8175 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8176
8177         * mini.c: added a few more verification checks.
8178
8179 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8180
8181         * liveness.c: Merge optimizations from the linear-il branch.
8182
8183 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8184
8185         * mini-ia64.c (emit_call): Add a comment.
8186
8187         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8188
8189         * tramp-ia64.c: Fix some warnings.
8190
8191 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8192
8193         * mini.h: don't use gboolean for bitfields.
8194         * mini.c: verifier changes for fields and methods accessibility.
8195
8196 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8197
8198         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8199         lazy icall wrapper changes.
8200
8201         * dominators.c: Replace all the dominator algorithms with faster
8202         ones from the linear-il branch.
8203
8204         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8205         the mempool.
8206
8207         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8208         common cases are done first.
8209
8210         * mini-amd64.c: Fix some warnings.
8211
8212         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8213         from the mempool.
8214
8215         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8216         added code.
8217
8218         * mini.h: Add a missing prototype.
8219
8220 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8221
8222         * mini.c: Compile icall wrappers lazily.
8223
8224         * mini-codegen.c: Use printf instead of g_print since its much faster.
8225
8226         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8227         function.
8228
8229         * mini.c (optimize_branches): Cache the negative result from 
8230         remove_block_if_useless ().
8231
8232         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8233         Also fix some bblock linking issues.
8234
8235         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8236         assembly files.
8237
8238         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8239
8240         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8241         accessed fields first, for better cache behavior.
8242         
8243 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8244
8245         * mini.c: speedup IList<T> array accesses.
8246
8247 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8248
8249         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8250         inline_costs counter. Fixes #77190.
8251
8252 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8253
8254         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8255         trace messages. Fixes #77706.
8256
8257 2006-03-04  Martin Baulig  <martin@ximian.com>
8258
8259         * tramp-amd64.c, tramp-x86.c
8260         (mono_debugger_create_notification_function): Use
8261         mono_global_codeman_reserve() to allocate a buffer at runtime and
8262         return it.
8263
8264         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8265
8266         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8267         notification function at runtime and then call `initialize' in the
8268         `MONO_DEBUGGER__debugger_info' vtable.
8269
8270 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8271
8272         * iltests.il: Fix a visibility problem.
8273
8274 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8275
8276         * driver.c, mini.c: add hooks for the counters API.
8277
8278 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8279
8280         * driver.c: show disabled options.
8281
8282 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8283
8284         * linear-scan.c: always use cost-driven selection.
8285
8286 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8287
8288         * jit-icalls.c (helper_compile_generic_method): Revert change from
8289         2006-02-24.
8290
8291 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8292
8293         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8294
8295 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8296
8297         * inssel.brg: style fixes, mostly to force the updated monoburg
8298         to run for people using svn.
8299
8300 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8301
8302         * mini.c: match monoburg changes.
8303
8304 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8305
8306         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8307         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8308         declaration in the header file.
8309
8310 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8311
8312         * helpers.c: reduce relocations and mem usage.
8313
8314 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8315
8316         * mini.h, mini-codegen.c: disable logging features if
8317         requested by configure.
8318
8319 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8320
8321         * mini.c: tiny verifier changes.
8322
8323 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8324
8325         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8326         cpu-pentium.md: stack alignment changes for osx/x86,
8327         partially from Geoff Norton <gnorton@customerdna.com>.
8328
8329 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8330
8331         * jit-icalls.c (helper_compile_generic_method): Update to changes
8332         in metadata/class.c.
8333
8334 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8335         
8336         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8337         
8338         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8339         interface calls with large offsets.
8340
8341 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8342
8343         * jit-icalls.c (helper_compile_generic_method): Document the
8344         special-case we depend on so that we can inflate the method twice
8345         with the same context with no bad side-effects.
8346
8347 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8348
8349         * mini-x86.c, mini-amd64.c: fix for case when xen support
8350         is disabled.
8351
8352 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8353
8354         * mini-x86.c, mini-amd64.c: generate code to access tls items
8355         in a faster way for Xen systems.
8356
8357 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8358
8359         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8360         updates and compilation fixes for the OSX/x86 port, mostly from
8361         Geoff Norton <gnorton@customerdna.com>.
8362
8363 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8364
8365         * inssel.brg: faster interface call implementation
8366         to sync with the interface_offsets MonoVTable changes.
8367
8368 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8369
8370         * mini.c: more verification checks.
8371
8372 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8373
8374         * mini.c: added a few more verification checks.
8375
8376 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8377
8378         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8379         facility on the processor and use it if available.
8380
8381 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8382
8383         * driver.c, aot.c, mini.c: throw exception if the IL code is
8384         invalid or unverifiable.
8385
8386 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8387
8388         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8389         m.StructField.
8390
8391 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8392
8393         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8394
8395 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8396
8397         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8398         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8399         handling of instantiated generic valuetypes.
8400
8401 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8402
8403         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8404         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8405         instead.
8406
8407         * generics.2.cs: Revert the nullable reftypes tests.
8408
8409 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8410
8411         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8412         using __builtin_frame_address (1) as it doesn't work in the presence
8413         of optimizations. Hopefully fixes #77273.
8414
8415         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8416         -> generics.cs change as it doesn't work with some automake versions.
8417
8418 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8419
8420         * mini.c: handle systems that sue a different way to
8421         retrieve the stack address of the current thread.
8422
8423 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8424
8425         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8426         it specially in the makefile.
8427
8428         * generics.2.cs: Add tests for nullable reference types.
8429
8430 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8431
8432         * mini.c: always handle the case when mono_jit_init()
8433         is called in a thread different from the main thread,
8434         confusing libgc (bug #77309).
8435
8436 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8437
8438         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8439
8440 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8441
8442         * mini.c: change optimize_branches () to use a single loop
8443         and introduce a new optimization to simplify some range checks.
8444
8445 2006-02-03  Martin Baulig  <martin@ximian.com>
8446
8447         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8448         and merged with debugger_thread_manager_add_thread().
8449         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8450         inform the debugger about the main thread.
8451
8452 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8453
8454         * basic.cs: Add test for div.un/rem.un constant folding.
8455
8456 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8457
8458         * cpu-s390x.md: correct int_xor_imm length
8459
8460 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * generics.2.cs: New test for #77442.
8463
8464         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8465         #77442.
8466
8467 2006-02-02  Martin Baulig  <martin@ximian.com>
8468
8469         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8470         <mono/metadata/mono-debug-debugger.h>   
8471
8472         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8473
8474 2006-02-02  Martin Baulig  <martin@ximian.com>
8475
8476         * debug-debugger.h: New header file for debug-debugger.c.
8477
8478         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8479         function is a separate thread anymore; add support for attaching.
8480
8481 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8482
8483         * tramp-x86.c: Fix a warning.
8484
8485 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8486
8487         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8488         on very large methods.
8489
8490         * aot.c (load_patch_info): Fix a warning.
8491
8492 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8493
8494         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8495         mini-ops.h: alu membase optimizations.
8496
8497 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8498
8499         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8500         to speedup StringBuilder.
8501
8502 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8503
8504         * dominators.c (mono_compute_natural_loops): Fix detection of
8505         loop body start blocks.
8506
8507         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8508
8509 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8510
8511         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8512         #75145.
8513
8514 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8515
8516         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8517
8518 2006-01-25  Martin Baulig  <martin@ximian.com>
8519
8520         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8521         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8522         started to cleanup this file a little bit.
8523
8524 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8525
8526         * mini.c: optimize a codepath frequently happening in generics code.
8527
8528 2006-01-23  Martin Baulig  <martin@ximian.com>
8529
8530         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8531
8532         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8533         functions directly.
8534
8535         * driver.c: debug-debugger.c is only available if
8536         `MONO_DEBUGGER_SUPPORTED' is defined.   
8537
8538 2006-01-23  Martin Baulig  <martin@ximian.com>
8539
8540         * debug-debugger.c: Only enable this on platforms where the Mono
8541         Debugger is working (x86 and x86_64).
8542
8543 2006-01-21  Martin Baulig  <martin@ximian.com>
8544
8545         The Mono Debugger is now using the normal `mono' instead of the
8546         `mono-debugger-mini-wrapper' when executing managed code.
8547
8548         * debug-debugger.c: New file; previously known as
8549         debugger/wrapper/wrapper.c.
8550
8551         * debug-mini.c (mono_init_debugger): Removed.
8552
8553         * driver.c (mono_main): Added new `--inside-mdb' command line
8554         argument which is used when running inside the debugger.
8555
8556 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8557
8558         * liveness.c (mono_analyze_liveness): Remove some unused data
8559         structures.
8560
8561 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8562
8563         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8564
8565 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8566
8567         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8568         depends on implementation details of monobitset.
8569
8570         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8571         Fixes #77271.
8572
8573 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8574
8575         * liveness.c: Update after monobitset changes.
8576
8577 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8578
8579         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8580
8581 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8582
8583         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8584
8585         * mini-s390x.c: Remove warning messages.
8586
8587 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8588
8589         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8590
8591 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8592
8593         * generics.2.cs: Add ldelem/stelem_any test.
8594
8595 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8596
8597         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8598
8599 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8600
8601         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8602         
8603 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8604
8605         * generics.2.cs: Reenable vtype tests.
8606
8607         * inssel-x86.brg: Remove an icorrect valuetype rule.
8608
8609 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8610
8611         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8612         initial support for OP_ABS.
8613
8614 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8615
8616         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8617
8618 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8619
8620         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8621         conversion and implement LADD/LSUB.
8622
8623         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8624         architectures.
8625
8626 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8627
8628         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8629
8630         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8631         architectures.
8632
8633 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8634
8635         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8636         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8637         (stack walk problem).
8638
8639 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8640
8641         * aot.c (mono_aot_load_method): Fix a warning.
8642
8643 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8644
8645         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8646
8647 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8648
8649         * iltests.il: Add test for #77148.
8650
8651         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8652         #77148.
8653
8654 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8655
8656         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8657
8658 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8659
8660         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8661         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8662
8663         * basic-long.cs: Add lconv-to-r4/r8 tests.
8664
8665 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8666
8667         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8668
8669         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8670         here as on other archs.
8671
8672 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8673
8674         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8675
8676 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8677
8678         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8679         
8680         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8681
8682         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8683         instrument_prolog; Add memory_barrier instruction.
8684
8685 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8686
8687         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8688
8689 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8690
8691         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8692
8693         * aliasing.c inssel.brg: Fix warnings.
8694
8695         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8696         could skip initialization of some parts of memory.
8697
8698         * mini.c mini-ia64.c: Fix warnings.
8699
8700         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8701
8702 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8703
8704         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8705         a crash seen on sparc.
8706
8707         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8708         
8709         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8710
8711 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8712
8713         * mini-ops.h: Add s390_backchain instruction
8714
8715         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8716
8717         * cpu-s390.md: Add s390_backchain instruction
8718
8719         * mini-s390.c: Significant ABI changes
8720
8721         * mini-s390.h: Cater for zero length structures
8722
8723 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8724
8725         * mini-s390.c: ABI fixes
8726
8727         * inssel-s390.brg: Remove debug statements
8728
8729         * cpu-s390.md: Fix length of ATOMIC_xx operations
8730
8731 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8732
8733         * basic-float.cs: Add float<->long conversion tests.
8734
8735 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8736
8737         * mini-s390.c: Fix LOCALLOC processing.
8738
8739         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8740
8741 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8742
8743         * iltests.il: Add tests for some opcodes not covered by the other
8744         tests.
8745
8746 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8747
8748         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8749         register loading for Tail processing; Correct trace output.
8750
8751         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8752
8753         * cpu-s390.md: Correct size of jmp instruction. 
8754
8755 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8756
8757         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8758
8759 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8760
8761         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8762           Bring s390 up to current level.
8763
8764 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8765
8766         * generics.2.cs: Disable the newly added tests as they do not work yet.
8767         
8768         * generics.2.cs: Add valuetype tests.
8769
8770 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8771
8772         * basic-long.cs: Add i4->u8 test.
8773
8774         * objects.cs: Add tests for JIT intrinsic.
8775
8776         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8777         optimizations lost by a mistake.
8778
8779 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8780
8781         * basic-long.cs: Remove a test moved to objects.cs.
8782
8783         * arrays.cs: Add more array tests.
8784
8785 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8786
8787         * arrays.cs: Add new tests for multi-dimensional arrays.
8788
8789 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8790
8791         * Makefile.am (test_sources2): Add generics.2.cs.
8792         (EXTRA_DIST): Add test_sources2.
8793
8794 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8795
8796         Support for boxing and unboxing nullable types as well as the
8797         isinst operation on nullables, per the CLI ammendment.
8798
8799         * inssel.brg (CEE_ISINST): Special case for nullable
8800
8801         * mini.c (handle_unbox_nullable): new method
8802         (handle_box): Special case for nullable types
8803         (mono_method_to_ir): Call handle_unbox_nullable in correct
8804         places.
8805
8806         * generics.2.cs: New test suite
8807
8808         * Makefile.am: Support for regression tests with generics.
8809
8810 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8811
8812         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8813         allocated to registers. Fixes #76800.
8814
8815 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8816
8817         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8818
8819 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8820
8821         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8822         of platforms.
8823
8824 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8825
8826         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8827         objects.cs.
8828
8829         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8830         
8831         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8832 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8833
8834         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8835         single precision before storing to a single precision location.
8836
8837 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8838
8839         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8840
8841 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8842
8843         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8844         correct files.
8845
8846         * basic.cs: Remove test_0_byte_compares test which was moved to
8847         objects.cs a long time ago.
8848
8849 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8850
8851         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8852
8853 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8854
8855         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8856         handlers are called.
8857
8858         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8859         throwing code.
8860
8861          * mini-ia64.c: Add support for the throw->branch exception 
8862         optimization.   
8863
8864         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8865
8866 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8867
8868         * mini.c: Enabled "fastpath" deadce :-)
8869         
8870 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8871
8872         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8873         alias analysis pass to support it.
8874         * mini.h: Likewise.
8875         * ssa.c: Likewise.
8876         * liveness.c: Likewise (liveness computation can use aliasing
8877         information to be more accurate).
8878         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8879         moreover made so that "--compile-all" uses the given optimization
8880         flags and not the default ones.
8881         * aliasing.c: Alias analysis (new file).
8882         * aliasing.h: Likewise.
8883         * Makefile.am: added "aliasing.c" and "aliasing.h".
8884         
8885 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8886
8887         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8888         OP_L opcodes.
8889
8890 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8891
8892         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8893         fp >= end_of_stack exit condition, as it is not needed, and it might
8894         become true for fp eliminated frames.
8895
8896 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8897
8898         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8899         coded offsets.
8900
8901 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8902
8903         * mini-arm.c: fixed alignment of doubles/longs to match
8904         the C ABI (bug #76635).
8905
8906 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8907
8908         * aot.c: fix compilation with --enable-minimal=aot.
8909
8910 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8911
8912         * mini-arm.c: fixed compatibility with the new
8913         floating point emulator package for compares.
8914
8915 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8916
8917         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8918
8919 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8920
8921         * mini-exceptions.c (print_stack_frame): Output to stderr.
8922         (mono_handle_native_sigsegv): Ditto.
8923
8924 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8925
8926         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8927         OP_LCONV_TO_OVF_I implementation.
8928
8929         * mini-amd64.c: Add support for the throw->branch exception 
8930         optimization.
8931
8932         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8933         when the catch clause catches a more general exception, i.e. Object.
8934
8935 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8936
8937         * cpu-ia64.md: Remove unused opcodes.
8938
8939         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8940         specific defines for architectures defining USE_SIGACTION.
8941
8942         * mini-ia64.c: Fix some warnings.
8943
8944         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8945         version seemed to skip a frame.
8946
8947 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8948
8949         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8950         only calls which are made to native code use this flag.
8951
8952 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8953
8954         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8955         varargs methods as well.
8956         
8957         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8958         which have save_lmf set. Reorganize methods prologs a bit.
8959
8960         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8961         debugger to the proper place.
8962
8963 2005-10-29  Martin Baulig  <martin@ximian.com>
8964
8965         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8966         when running inside the debugger until the debugger has support
8967         for it.
8968
8969 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8970
8971         * mini.h: Fix a warning.
8972
8973 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8974
8975         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8976         we expose publicly, this returns the string.
8977
8978 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8979
8980         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8981         with fp elimination.
8982
8983 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8984
8985         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8986         native stacktrace using the glibc 'backtrace' function if available.
8987
8988 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8989
8990         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8991
8992         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8993         handle SIGSEGVs received while in native code.
8994
8995         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8996         code, call mono_handle_native_sigsegv which will abort the runtime
8997         after printing some diagnostics, instead of converting it into a
8998         confusing NullReferenceException.
8999
9000 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9001
9002         * cpu-pentium.md: Remove unused opcodes.
9003
9004 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9005
9006         * mini-amd64.h (MonoLMF): Add rsp field.
9007
9008         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9009         the lmf too.
9010
9011 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9012
9013         * mini-codegen.c (get_register_spilling): Fix some warnings.
9014
9015 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9016
9017         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9018         elimination during exception handling. Enable fp elimination by
9019         default.
9020
9021         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9022         elimination.
9023
9024 2005-10-16  Martin Baulig  <martin@ximian.com>
9025
9026         * mini-exceptions.c
9027         (mono_debugger_run_finally): New public method for the debugger.
9028
9029 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9030
9031         * debug-mini.c (mono_debug_init_method): Fix warning.
9032
9033         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9034         the 'exname' parameter const to fix some warnings.
9035
9036 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9037
9038         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9039         introduced by the previous patch.
9040
9041 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9042
9043         * basic-float.cs: Add test for precision of float arithmetic.
9044
9045         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9046         when loading/storing single values from/to memory.
9047
9048         * mini.c (mono_jit_compile_method_with_opt): Create the function
9049         pointers in the correct domain.
9050
9051 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9052
9053         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9054         introduced by previous patch.
9055         
9056         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9057         when out_filter_idx is NULL.
9058
9059         * mini-exceptions.c: Don't run filter clauses twice during exception
9060         handling. Fixes #75755.
9061
9062 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9063
9064         * aot.c: Add support for ldflda wrappers.
9065
9066         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9067         #75902.
9068
9069 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9070
9071         * mini.c, mini.h: do not consider exception handlers blocks when
9072         setting up interface variables.
9073
9074 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9075
9076         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9077
9078 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9079
9080         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9081         causes a regression.
9082
9083         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9084
9085 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9086
9087         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9088         of the OP_P definitions.
9089
9090         * TODO: Add a proposal for dealing with the CEE/OP mess.
9091
9092         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9093         optimizations from the x86 port.
9094
9095         * cpu-amd64.md: Ditto.
9096
9097         * basic.cs basic-long.cs: Add tests.
9098
9099 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9100
9101         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9102         Patrik Torstensson's implementation of my exception-handling
9103         optimization idea, when the exception object is not used
9104         (bug #62150).
9105
9106 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9107
9108         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9109         of the mul_imm optimizations from the old jit.
9110
9111 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9112
9113         * mini.c, liveness.c: patch by Patrik Torstensson and
9114         Zoltan Varga to improve performance in methods with
9115         exception clauses.
9116
9117 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9118
9119         * driver.c: Remove 'Globalization' entry from --version.
9120
9121 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9122
9123         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9124         there is a profiler interested in JIT events.
9125
9126         * aot.c: Load profile files produced by the AOT profiling module, and
9127         reorder methods based on the profiling info. Add a 'method_order' table
9128         to the AOT file to make mono_aot_find_jit_info work with the reordered
9129         methods.
9130
9131         * mini.h: Bump AOT file version info.
9132
9133 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9134
9135         * mini-arm.h: work around what looks like a gcc bug when optimizations
9136         are enabled.
9137
9138 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9139
9140         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9141         conditionals.  Use ...
9142         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9143
9144 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9145
9146         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9147         to determine the amount of memory to copy when passing valuetypes.
9148
9149         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9150         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9151
9152 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9153
9154         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9155         information about aot.
9156
9157 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9158
9159         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9160         macros. This will allow a deadlock debugger to easily be plugged
9161         in.
9162
9163 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9164
9165         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9166
9167 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9168
9169         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9170         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9171         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9172         ($(arch_built)) [CROSS_COMPILING]: Error out.
9173
9174 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9175
9176         * aot.c: Add support for the no_special_static flag for classes.
9177
9178 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9179
9180         * Reapply reverted patches.
9181
9182         * *: Revert r50174 as well.
9183
9184         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9185
9186 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9187
9188         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9189
9190 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9191
9192         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9193         part of the SIG_HANDLER_SIGNATURE.  
9194
9195 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9196
9197         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9198         statistics.
9199
9200         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9201         introduced by previous patch.
9202
9203 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9204
9205         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9206         saved registers too.
9207
9208         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9209         upon the information returned by get_call_info ().
9210         
9211         * mini-x86.c (add_float): Fix stack size calculation.
9212         (mono_arch_call_opcode): Rewrite this so it works based up the
9213         information returned by get_call_info ().
9214         (mono_arch_get_this_vret_args): Ditto.
9215
9216 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9217
9218         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9219         in cinfo to determine the registers which need to be used.
9220
9221 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9222
9223         * driver.c (mono_main): Add --server and --desktop flags. 
9224
9225 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9226
9227         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9228         registers as global registers.
9229
9230         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9231         longer needed with the new register allocator.
9232
9233         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9234
9235         * cpu-ia64.md: Remove unused opcodes.
9236         
9237         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9238         
9239 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9240
9241         * cpu-amd64.md: Remove unused opcodes.
9242
9243         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9244         needed with the new register allocator.
9245
9246         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9247         reg-reg moves.
9248
9249 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9250
9251         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9252
9253 2005-09-16  Martin Baulig  <martin@ximian.com>
9254
9255         * exceptions-amd64.c
9256         (throw_exception): Don't call mono_debugger_throw_exception() if
9257         we're a rethrow - see the FIXME in the code.
9258
9259 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9260
9261         * mini.c (mono_init_exceptions): This only works on some architectures.
9262         
9263 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9264
9265         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9266         on ia64.
9267
9268         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9269
9270         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9271         now in mini-exceptions.c.
9272
9273 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9274
9275         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9276         now in mini-exceptions.c.
9277
9278 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9279
9280         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9281         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9282
9283         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9284         code into mini-exceptions.c. Add some assertions to it.
9285
9286 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9287
9288         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9289         (<software@solmersa.com>). Fix as errors on windows.
9290
9291 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9292
9293         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9294         method info into the LMF.
9295
9296 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9297         
9298         * mini-ia64.c: Add proper unwind info for method epilogs.
9299
9300         * exceptions-ia64.c: Add some code to help debugging.
9301         
9302         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9303
9304         * mini-exceptions.c: Fix warning.
9305
9306 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9307
9308         * mini.c: Really fix build.
9309
9310         * mini-x86.c mini-amd64.c: Fix build.
9311
9312 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9313
9314         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9315
9316         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9317         some Interlocked methods as intrinsics.
9318
9319         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9320         for Thread methods as well.
9321
9322         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9323
9324         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9325
9326         * mini-ia64.c mini-x86.c mini-amd64.c 
9327         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9328         OP_MEMORY_BARRIER.
9329         
9330         * mini.c (mono_init_exceptions): Fix build breakage.
9331
9332 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9333
9334         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9335         of instructions. Use the new ia64_unw_op macros for emitting unwind
9336         info.
9337
9338         * mini.c (mono_init_exceptions): Initialize exception handling
9339         related trampolines at startup.
9340
9341 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9342
9343         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9344
9345 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9346
9347         * mini.c: Handle type loading errors gracefully during compilation and
9348         throw the appropriate exception.
9349
9350 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9351
9352         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9353         for the mono binary.
9354
9355 2005-09-09  Martin Baulig  <martin@ximian.com>
9356
9357         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9358         the release.
9359
9360 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9361
9362         * mini-arm.h: use emulation for conv.r.un for the release.
9363
9364 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9365
9366         * mini-arm.c, objects.cs: more fixes and tests for them.
9367
9368 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9369
9370         * mini-arm.c: align structures to at least 4 bytes to be able
9371         to keep our current optimized memcpy.
9372
9373 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9374
9375         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9376
9377 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9378
9379         * mini.c: ignore SIGPIPE.
9380
9381 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9382
9383         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9384
9385         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9386
9387 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9388
9389         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9390
9391 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9392
9393         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9394         exception handling support.
9395         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9396         patch by Brian Koropoff <briank@marakicorp.com>).
9397
9398 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9399
9400         * mini.c: revert another 'optimization' which breaks when
9401         items on the eval stack need to be saved at a basic block end
9402         (bug #75940).
9403
9404 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9405
9406         * jit-icalls.c: for arrays, ensure we always provide
9407         lower bounds.
9408
9409 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9410
9411         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9412         
9413         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9414
9415 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9416
9417         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9418         arguments in their original register.
9419
9420 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9421
9422         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9423         memset/memcpy.
9424
9425         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9426         when ssapre is enabled.
9427
9428         * inssel-long.brg: Fix bug in previous patch.
9429
9430         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9431         multiplication by a constant.
9432
9433 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9434
9435         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9436         icc.
9437
9438         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9439         saving registers.
9440
9441 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9442
9443         * inssel-arm.brg: apply changes tested by Brian Koropoff
9444         <briank@marakicorp.com>.
9445
9446 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9447
9448         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9449         
9450 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9451
9452         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9453         to the same register if dreg is just a base register.
9454         (print_ins): Improve printing of membase opcodes.
9455
9456         * inssel-x86.brg: Add optimized ldind(reg) rules.
9457
9458         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9459
9460 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9461
9462         * mini.c: when running under valgrind, set the stack bottom for
9463         the GC at the actual approximate stack for the app (fixes running
9464         mono with valgrind).
9465
9466 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9467
9468         * mini.c: do no break at the first valuetype to init found
9469         (fixes bug #75791).
9470
9471 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9472
9473         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9474
9475 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9476
9477         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9478
9479 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9480
9481         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9482
9483 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9484
9485         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9486
9487         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9488         code.
9489
9490         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9491         code.
9492
9493         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9494         methods.
9495
9496 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9497
9498         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9499
9500 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9501
9502         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9503         in the tail recursion optimization.
9504
9505         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9506         debug info into the assembly file.
9507
9508         * iltests.il: Add test for filter regions.
9509
9510         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9511         initial stack of filter regions. Fixes #75755.
9512
9513 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9514
9515         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9516         stack requirements.
9517
9518 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9519
9520         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9521         the check for an already compiled method on non-ia64 platforms.
9522         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9523         proper domain.
9524
9525         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9526
9527         * inssel-x86.brg: Add some optimized call rules.
9528
9529 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9532         method here.
9533
9534         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9535         mono_arch_patch_delegate_trampoline.
9536
9537         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9538
9539         * mini-trampolines.c: Fix build.
9540
9541         * mini-amd64.h: Add delegate trampolines.
9542
9543         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9544
9545         * inssel-amd64.brg: Add optimized call rules.
9546         
9547         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9548
9549         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9550
9551 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9552
9553         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9554         change.
9555
9556         * mini-ia64.c: Remove LMF fixmes.
9557
9558         * mini-ia64.h: Remove most fields from LMF.
9559
9560         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9561
9562         * mini-trampolines.c: Add support for IA64 function descriptors.
9563
9564         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9565         for IA64 function descriptors.
9566
9567 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9568
9569         * tramp-arm.c: patch the vtable for virtual calls. Added
9570         support code to register/unregister the LMF.
9571         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9572         more LMF work.
9573
9574 2005-08-19  Dick Porter  <dick@ximian.com>
9575
9576         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9577         bit value if needed.
9578
9579 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9580
9581         * mini.c (mini_get_method): Move handling of wrapper data here.
9582
9583         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9584
9585         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9586         virtual.
9587
9588         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9589         bblock->code does not remain empty.
9590
9591 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9592
9593         * arrays.cs: Add regression test for #75832.
9594
9595         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9596         rules. Fixes #75832.
9597
9598         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9599         instruction scheduling.
9600
9601 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9602
9603         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9604
9605 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9606
9607         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9608
9609         * mini-codegen.c: Fix VC build.
9610
9611         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9612
9613 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9614
9615         * mini.h: fix signature for mono_register_opcode_emulation.
9616
9617 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9618
9619         * mini.c: Get rid of most of the helper_sig_... constants using
9620         mono_create_icall_signature ().
9621
9622 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9623
9624         * jit-icalls.c (helper_ldstr): New helper function.
9625
9626         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9627
9628         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9629         throw, load the string using a helper call instead of creating a string object.
9630
9631         * aot.c: Update after LDSTR changes.
9632
9633         * mini.h: Bump AOT file version.
9634         
9635         * aot.c: Save class size info into the AOT file. Print more statistics during
9636         compilation.
9637
9638         * mini.h: Bump AOT file version.
9639
9640         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9641         ordering of disasm cases. Fixes #74957.
9642
9643 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9644
9645         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9646         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9647         the generic code needed for the ARM port.
9648
9649 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9650
9651         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9652         inssel-arm.brg: more ARM features and fixes.
9653
9654 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9655
9656         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9657         ARM port work in progress.
9658
9659 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9662
9663         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9664
9665         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9666
9667         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9668
9669         * *-ia64.*: Ongoing IA64 work.
9670         
9671         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9672
9673 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9674
9675         * TODO: Remove out-of-data todo stuff.
9676
9677         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9678         dead code.
9679
9680         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9681
9682         * mini.h: Bump corlib version.
9683
9684 2005-07-27  Martin Baulig  <martin@ximian.com>
9685
9686         * mini-codegen.c
9687         (create_copy_ins): Added `const unsigned char *ip' argument; set
9688         `copy->cil_code' from it.
9689
9690 2005-07-27  Martin Baulig  <martin@ximian.com>
9691
9692         * mini-exceptions.c (mono_handle_exception): Don't call
9693         mono_debugger_handle_exception() for filters.
9694
9695 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9696
9697         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9698         as well.
9699
9700 2005-07-26  Martin Baulig  <martin@ximian.com>
9701
9702         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9703
9704         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9705         helper_compile_generic_method() if the method is actually virtual
9706         and non-final.
9707
9708 2005-07-26  Martin Baulig  <martin@ximian.com>
9709
9710         * mini.c
9711         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9712         public; this is now accessed directly by the debugger.
9713         (mono_generic_trampoline_code): Removed.
9714
9715         * debug-mini.c
9716         (mono_debug_init_method): Also add interncalls and wrappers.
9717
9718 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9719
9720         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9721
9722 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9723
9724         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9725
9726 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9727
9728         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9729
9730 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9731
9732         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9733         getting TLS offsets on AMD64 too.
9734
9735 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9736
9737         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9738
9739 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9740
9741         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9742         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9743
9744 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9745
9746         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9747
9748         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9749         to mini.c.
9750
9751         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9752         mono_sparc_is_virtual_call ().
9753         
9754         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9755
9756         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9757         trampoline parameters.
9758
9759         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9760         
9761         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9762         to mono_arch_get_vcall_slot_addr.
9763
9764         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9765         trampoline code.
9766
9767         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9768
9769 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9770
9771         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9772
9773 2005-07-19  Martin Baulig  <martin@ximian.com>
9774
9775         * exceptions-amd64.c (throw_exception): Call
9776         mono_debugger_throw_exception() here like we're doing it on i386.
9777
9778 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9779
9780         * mini-ia64.c: Add optimized TLS access support.
9781
9782 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9783
9784         * mini-exceptions.c: Ongoing IA64 work.
9785
9786         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9787
9788         * mini.c: Use the default optimization set when embedding. Fixes
9789         #75194.
9790
9791 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9792
9793         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9794         of trampolines to a separate file.
9795
9796         * mini-trampolines.c: New file.
9797
9798         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9799         separate file.
9800         
9801         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9802         amd64/ia64 code.
9803
9804         * mini-codegen.c: Fix cygwin build.
9805
9806 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9807
9808         * mini.c: Add some minor changes needed by the IA64 port.
9809
9810         * *-ia64.*: Ongoing IA64 work.
9811
9812 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9813
9814         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9815         trampolines into arch-independent and arch-dependent parts.
9816
9817         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9818
9819 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9820
9821         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9822
9823         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9824         the xp-regalloc-branch for amd64.
9825
9826         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9827         xp-regalloc-branch for x86.
9828
9829 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9832
9833 2005-07-06  Martin Baulig  <martin@ximian.com>
9834
9835         * mini.c
9836         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9837         (mono_jit_runtime_invoke): Likewise.
9838
9839 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9840
9841         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9842         on x86 too.
9843         
9844         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9845         without loading their metadata. Reorganize the file format so exception handling+
9846         debug info is kept separate from normal method info. Create MonoJitInfo 
9847         structures for methods lazily.
9848
9849         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9850         loading metadata.
9851         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9852
9853         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9854
9855         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9856         in AOT code.
9857
9858         * mini.h: Bump AOT file version.
9859
9860 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9861
9862         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9863
9864 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9865
9866         * Makefile.am (check-local): Call semdel-wrapper.
9867
9868 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9869
9870         * mini-x86.c: Revert the last change as it seems to break the build..
9871
9872 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9873
9874         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9875         
9876         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9877
9878 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9879
9880         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9881         outside of the macro, so strange stuff doesn't happen with gcc4
9882         (NEW_AOTCONST_TOKEN): Likewise.
9883
9884 2005-06-28  Martin Baulig  <martin@ximian.com>
9885
9886         * mini.c (mini_class_is_system_array): New static method; use this
9887         instead of `klass->parent == mono_defaults.array_class' everywhere
9888         since this also works for the new generic array class.
9889
9890 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9891
9892         * inssel.brg: Remove warnings.
9893
9894 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9895
9896         * mini-ia64.c: Ongoing IA64 work.
9897
9898         * basic-float.cs: Add float->i1 conversion test.
9899
9900         * iltests.il: Add conv.u4 test.
9901
9902 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9903
9904         * inssel-long.brg: Fix bug caused by last change.
9905
9906 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9907
9908         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9909         BSDs.  Allows the x86 JIT to work on OSX86
9910
9911 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9912
9913         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9914         u4->i8 conversion.
9915
9916         * mini-ia64.c: Ongoing IA64 work.
9917
9918 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9919
9920         * mini-ia64.c: Ongoing IA64 work.
9921
9922         * driver.c: Clean up jit_code_hash as well when using --regression.
9923
9924         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9925
9926         * basic-long.cs: Add tests for long->u4 conversion.
9927
9928 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9929
9930         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9931         that we do not depend on undefined C behavior: the order stuff
9932         gets evaluated within an expression. Fixes mono when compiled on
9933         GCC 4.
9934
9935 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * *-ia64.*: Ongoing IA64 work.
9938
9939         * aot.c: Lower memory usage while loading AOT methods.
9940
9941         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9942
9943         * mini.h: Bump AOT file format version.
9944
9945 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9946
9947         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9948
9949 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9950
9951         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9952         not on callee assembly). Fixed some comments.
9953
9954 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9955
9956         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9957         it gets proper disassembly.
9958         (emit_method_info): Remove some dead code.
9959
9960         * mini.c (mini_method_compile): Allways allocate the GOT var in
9961         mono_method_to_ir for emulating opcodes.
9962
9963 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9964
9965         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9966         before freeing the code memory. Fixes #74990.
9967
9968         * objects.cs: Add regression test for #74992.
9969
9970         * liveness.c: Extend live ranges of arguments to the beginning of the
9971         method. Fixes #74992.
9972
9973         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9974         so it points into the faulting instruction.
9975
9976 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9977
9978         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9979
9980         * *-ia64.*: Ongoing IA64 work.
9981
9982         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9983
9984 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9985
9986         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9987
9988         * *-ia64.*: Ongoing IA64 work.
9989
9990 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9991
9992         * basic-long.cs: Add tests for add/sub.ovf.
9993
9994         * basic.cs: Add tests for sub.ovf.
9995
9996         * *-ia64.*: Ongoing IA64 work.
9997
9998 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9999
10000         * *-ia64.*: Ongoing IA64 work.
10001
10002         * basic.cs: Add conv.ovf.i4.un test.
10003
10004 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10005
10006         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10007         
10008 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10009
10010         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10011
10012 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10013
10014         * *-ia64.*: Ongoing IA64 work.
10015
10016 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10017
10018         * trace.[ch]:
10019         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10020
10021 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10022
10023         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10024
10025 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10026
10027         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10028
10029         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10030         of a call is callable by a near call.
10031
10032 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10033
10034         * mini-ia64.c: Ongoing IA64 work.
10035
10036 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10037
10038         * genmdesc.c: Make the generated array non-static.
10039
10040         * inssel-long.brg: Fix LSHR_IMM rule.
10041
10042         * *-ia64.*: Ongoing IA64 work.
10043
10044         * *-ia64.*: Ongoing IA64 work.
10045
10046 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10047
10048         * *-ia64.*: Ongoing IA64 work.
10049
10050         * *-ia64.*: Ongoing IA64 work.
10051         
10052         * mini-ia64.c: Ongoing IA64 work.
10053
10054         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10055
10056 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10057
10058         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10059         
10060         * objects.cs basic-long.cs: Move some tests to objects.cs.
10061
10062 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10063
10064         * *-ia64.*: Ongoing IA64 work.
10065
10066         * iltests.il: Add a new test.
10067
10068         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10069         newobj. Fixes #75042.
10070
10071 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10072
10073         * *-ia64.*: Ongoing IA64 work.
10074         
10075         * *-ia64.*: Ongoing IA64 work.
10076         
10077         * *-ia64.*: Ongoing IA64 work.
10078
10079         * basic.cs objects.cs: Move tests accessing static variables as well.
10080
10081         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10082
10083 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10084
10085         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10086
10087         * driver.c: Always print failed tests.
10088
10089         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10090         frame pointer.
10091
10092         * *ia64*: Ongoing IA64 work.
10093
10094 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10095
10096         * basic.cs: Add tests for add.ovf. Fix warnings.
10097
10098 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10099
10100         * driver.c (mono_main): Avoid crash if no argument is passed to
10101         --break;  Do not use g_error, but f_printf.   And fix all other
10102         ocurrences of the same crash.
10103
10104 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10105
10106         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10107         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10108         Fixes #74742.
10109
10110 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10111
10112         * *-ia64.*: Add beginnings of IA64 backend.
10113
10114         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10115
10116 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10117
10118         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10119         Fixes #74925.
10120
10121         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10122
10123         * mini-amd64.c: Fix a warning.
10124
10125 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10126
10127         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10128         in float_neg. Fixes #74897.
10129
10130         * mini-amd64.c (emit_call): Fix another near call bug.
10131
10132 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10133
10134         * declsec.c: Keep the appdomain information in the structure. Added a 
10135         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10136         value gets overwritten).
10137         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10138         an MonoAppDomain member to MonoSecurityFrame.
10139         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10140         used in the stack walk. Now use a MonoArray which grow (double) when
10141         it gets full.
10142
10143 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10144
10145         * mini.c: Re-enabled runtime cleanup, since running threads should
10146         now properly stop when exiting.
10147
10148 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10149
10150         * mini-codegen.c: New file contaning the arch-independent local
10151         register allocator. Not used by any architectures yet.
10152
10153         * mini.h linear-scan.c: Merge some changes from the 
10154         mini-xp-local-regalloc branch.
10155
10156 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * mini-amd64.c (emit_call): Fix calls to native functions when the
10159         runtime is compiled as a shared library. Fixes #74756.
10160
10161         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10162         on a literal field. Fixes #74751.
10163
10164 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10165
10166         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10167
10168 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10169
10170         * objects.cs: Add missing null casting test.
10171
10172 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10173
10174         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10175         in wrapper methods. Also rename 'address' variable to 'offset'.
10176
10177 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10178
10179         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10180         warnings.
10181         
10182         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10183
10184         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10185         work on windows.
10186
10187 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10188
10189         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10190
10191 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10192
10193         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10194         just the last bytes.
10195
10196 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10197
10198         * aot.c (mono_compile_assembly): Fix warning.
10199
10200         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10201         by the _MSC_VER stuff.
10202
10203 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10204
10205         * inssel-long.brg: Fix #74588.
10206
10207         * cpu-amd64.md: Fix #74591.
10208
10209         * iltests.il: Add new regression tests.
10210
10211 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10212
10213         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10214         valuetype.
10215
10216 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10217
10218         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10219
10220         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10221         from Bill Middleton <flashdict@gmail.com>.
10222
10223 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10224
10225         * arrays.cs: Add new regression test. Fix warnings.
10226
10227 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10228
10229         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10230         and leakage in CKFINITE.
10231
10232         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10233         this to a null op since it is called on amd64 too.
10234
10235         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10236
10237         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10238         body since this is not used on amd64.
10239         
10240         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10241
10242         * mini-amd64.c: Remove obsolete fixmes.
10243
10244         * mini.c (print_method_from_ip): Fix debugging support.
10245
10246 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10247
10248         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10249         so that expressions that don't give much gain are not reduced.
10250         * ssapre.h: Likewise.
10251
10252 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10253
10254         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10255
10256         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10257
10258         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10259
10260 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10261
10262         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10263
10264         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10265
10266 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10267
10268         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10269         stack touching.
10270
10271         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10272
10273         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10274
10275         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10276
10277         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10278         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10279
10280         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10281
10282         * mini-x86.c: Fix up stack overflow handling.   
10283
10284         * exceptions.cs: Add new regression test.
10285
10286 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10287
10288         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10289         mono_jit_thread_attach.
10290
10291         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10292
10293 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10294
10295         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10296         avoid calling constructors using callvirt.
10297
10298         * inssel.brg: Fix #74073.
10299
10300 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10301
10302         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10303         compilation with non-GCC compilers.
10304         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10305         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10306
10307 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10308
10309         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10310         klass->interface_offsets (will likely fix bug#74073).
10311
10312 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10313
10314         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10315
10316 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10317
10318         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10319         to amd64_div_reg_size ().
10320         
10321         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10322
10323 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10324
10325         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10326
10327 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10328
10329         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10330
10331 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10332
10333         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10334         
10335         * mini.c (mono_precompile_assembly): Load and precompile referenced
10336         assemblies as well. Fixes #74015.
10337
10338 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10339
10340         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10341
10342 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10343
10344         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10345         a lot of checks and (anyway) permissions cannot work until corlib is 
10346         loaded.
10347
10348 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10349
10350         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10351
10352 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10353
10354         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10355         calls (fixes bug#72824).
10356
10357 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10358
10359         * mini.c: fix tail recursion elimination (see test in bug#73936).
10360
10361 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10362
10363         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10364         some fp functions in sse2 mode.
10365
10366 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10367
10368         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10369
10370 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10371
10372         * mini.h mini.c: Add mono_get_jit_tls_key ().
10373
10374         * mini-x86.c: Enable fast TLS support on windows.
10375
10376 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10377
10378         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10379         * mini.c: Check for p/invoke method when generating code. If a
10380         p/invoke method, or it's class, isn't decorated with [Suppress
10381         UnmanagedCodeSecurity] then generate code to call System.Security.
10382         UnmanagedDemand (only if the security manager is active).
10383
10384 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10385
10386         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10387         last change as it seems to cause strange crashes.
10388         
10389 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10390
10391         * *.c: handle unsafe function pointers where needed.
10392
10393 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10394
10395         * mini.c (mono_jit_free_method): Remove the fixme too.
10396
10397 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10398
10399         * mini.c: As discussed, make the code actually free the delegate
10400         thunk now, to enable the debugging of delegate problems, use
10401         MONO_DEBUG=1 when running Mono. 
10402
10403         This takes also care of parts of the leaks as seen by Joe.
10404
10405 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10406
10407         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10408         thread_tls_offset calculation.
10409
10410 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10411
10412         * declsec.c: Reworked linkdemand checks for icall. The previous code
10413         was using the declaration code (untrusted) and didn't work as expected
10414         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10415         specific case.
10416
10417 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10418
10419         * iltests.il: Add new localloc test.
10420
10421         * mini-amd64.c: Handle large stack allocations the same way as on
10422         windows if stack overflow handling is working.
10423         
10424         * mini-amd64.c: Allocate the signal stack using mmap.
10425
10426         * mini.c (sigsegv_signal_handler): Fix reading of context.
10427
10428         * mini-exceptions.c: Fix up stack overflow handling.
10429
10430         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10431
10432         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10433
10434         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10435
10436         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10437
10438         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10439         tramp_init functions as they are no longer needed.
10440
10441 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10442
10443         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10444         
10445         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10446
10447         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10448         
10449         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10450         support that now.
10451
10452         * mini-ops.h: Add OP_LMUL_IMM.
10453
10454         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10455         long mul/div opcodes as intrinsic.
10456
10457         * mini-amd64.c (emit_call): Handle the case when the callee might be
10458         an AOT method.
10459
10460 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10461
10462         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10463         extra safe.
10464         
10465         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10466
10467         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10468
10469 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10470
10471         * mini.c (mono_codegen): Don't leak here, to help people running
10472         monogrind.
10473
10474 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10475
10476         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10477         conversions in sse2 mode.
10478
10479         * basic-float.cs: Add regression test.
10480         
10481         * mini-amd64.c: Reenable sse2.
10482
10483 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10484
10485         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10486
10487 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10488
10489         * driver.c: Copyright text should include 2005.
10490         
10491 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10492
10493         * cpu-amd64.md (load_membase): Fix more max lengths.
10494
10495 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10496
10497         * cpu-amd64.md (load_membase): Fix max length.
10498
10499         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10500
10501         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10502
10503         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10504         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10505
10506         * basic-float.cs: Add rounding regression test.
10507
10508         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10509
10510 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10511
10512         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10513         structures in registers for pinvoke wrappers.
10514
10515 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10516
10517         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10518
10519 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10522         wrapper to mono_jit_thread_attach.
10523
10524         * mini.c (mini_jit_thread_attach): New jit icall.
10525
10526         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10527         native->managed wrappers.
10528
10529         * exceptions.cs: Add new regression test.
10530
10531         * mini.c (optimize_branches): Check regions in the cbranch to throw
10532         block case as well. Fixes #73242.
10533
10534 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10535
10536         * mini.c: thread safety fixes.
10537
10538 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10539
10540         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10541         patching stuff, since delegates use jump trampolines so there is
10542         no caller.
10543
10544         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10545         jump trampolines.
10546         
10547         * tramp-amd64.c: Fix build.
10548
10549         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10550         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10551
10552         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10553         Rename this to mono_arch....
10554         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10555
10556         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10557
10558         * mini-amd64.c (emit_call): If both the caller and the callee is
10559         guaranteed to have 32 bit addresses, emit a normal call.
10560
10561         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10562
10563         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10564         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10565         method_ptr inside delegates.
10566
10567 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10568
10569         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10570         invalidated. Fixes #73001.
10571
10572         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10573
10574         * mini-x86.c: Only use stdcall for pinvokes on windows.
10575
10576 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10577
10578         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10579         * mini-x86.c: remove unreliable __thread var offset detection,
10580         use the correct accessors and enable by default.
10581
10582 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10583
10584         * mini.c (mono_jit_free_method): Fix memory leak.
10585
10586 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10587
10588         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10589
10590 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10591
10592         * cpu-amd64.md: Fix lengths of atomic opcodes.
10593
10594 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10595
10596         * driver.c: try to not imply using ICU is any good.
10597
10598 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10599
10600         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10601         functions as inline ops.
10602
10603         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10604         some Interlocked functions as inline ops.
10605
10606         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10607
10608         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10609
10610         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10611
10612         * mini.c: Add support for OP_NOT_TAKEN.
10613
10614         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10615         structures in registers for pinvoke wrappers.
10616
10617         * mini-amd64.c: Fix warnings.
10618
10619 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10620
10621         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10622
10623         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10624
10625         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10626         address instead of loading the address from it.
10627
10628         * mini-x86.c: Add support for returning small structs in registers
10629         on Win32. Fixes part of #70864.
10630         
10631 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10632
10633         * trace.c (get_token): Improve error checking.
10634
10635 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10638
10639 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10640  
10641         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10642         it can be reused for MonoClass.
10643         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10644         _LINKDEMAND.
10645
10646 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10647
10648         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10649         instead of a MonoReflectionMethod. The method information wasn't used
10650         when displaying SecurityException details (but will be now).
10651
10652 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10653
10654         * Makefile.am : windows build fix.
10655
10656 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10657
10658         * iltests.il: Add new regression test.
10659
10660         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10661         #72522.
10662
10663 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10664  
10665         * mini.c: Moved linkdemand check into helper function check_linkdemand
10666         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10667         LDFTN, LDVIRTFTN).
10668
10669 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10670
10671         * declsec.c: Added statistics counter for different kinds of 
10672         LinkDemands.
10673         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10674         (and commented) declaration.
10675         * mini.c: Added statistics counter for security Demand code 
10676         generation. Added display of security statistics.
10677
10678 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10679
10680         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10681         Fix compilation errors under gcc-2.95.
10682
10683 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10684
10685         * mini.c, driver.c: Use the new jit trampoline hashtable
10686
10687 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10688
10689         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10690
10691 2005-02-11  Martin Baulig  <martin@ximian.com>
10692
10693         * debug-mini.c (mono_debug_close_method): Free the line number array.
10694
10695 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10696
10697         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10698         icalls.
10699
10700         * mini.h: Bump AOT file format version. 
10701
10702 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10703
10704         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10705         APTC and P/Invoke.
10706         * declsec.h: Added macros to get/set lazyly initialized security 
10707         informations about assemblies. Added new enum for different type of
10708         possible LinkDemand violation. Added function to check LinkDemands.
10709         * mini.h: Added a field to MonoCompile to hold any security violation
10710         detected when JITting a method (so it can be thrown later).
10711         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10712         and CEE_CALLVIRT. Added code to throw exception at the end of
10713         mini_method_compile (note: the exception is unhandled right now).
10714
10715 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10716
10717         * mini.c, jit-icalls.c: use the managed implementation of
10718         memset for initobj and memset, to avoid managed <-> unmanaged
10719         transitions.
10720
10721 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10722
10723         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10724         optimization if it would need a GOT var.
10725
10726         * basic.cs: Add tests for constant propagation and switch statements.
10727
10728         * ssa.c: Fix out-of-range constant propagation and switch statements.
10729
10730 2005-02-09    <vargaz@freemail.hu>
10731
10732         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10733
10734 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10735
10736         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10737
10738 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10739
10740         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10741
10742 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10743
10744         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10745         arithmetic operations.
10746
10747 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10748
10749         * mini-ppc.c: add a workaround for broken user code that
10750         DllImports vararg functions with non-vararg signatures.
10751
10752 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10753
10754         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10755         meaningfull error message for assemblies written in Managed C++.
10756
10757         * tramp-amd64.c mini-amd64.h: Add support for 
10758         create_trampoline_from_token ().
10759
10760         * aot.c mini-x86.c abcremoval.c: Applied patch from
10761         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10762
10763 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10764
10765         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10766         which takes a MonoImage/token as parameter instead of a MonoMethod.
10767
10768         * aot.c: Use the new trampoline for initializing vtables.
10769
10770         * aot.c: Add support for ldfld/stfld_remote wrappers.
10771
10772         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10773         rules for compare <MEM>, IMM.
10774
10775         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10776
10777         * aot.c: Handle inherited finalizers correctly.
10778
10779 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10780
10781         * inssel.brg (stmt): Add a missing _setup_... ().
10782
10783         * aot.c: Save some parts of the class state to the AOT file and use it
10784         to recompute that state when a class is initialized.
10785
10786         * mini.c: Install AOT hooks into the runtime.
10787
10788         * mini.h: Bump AOT file format version.
10789         
10790         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10791         Fixes #72148.
10792
10793         * iltests.il: Add new test.
10794
10795 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10796
10797         * mini.c: fix typo.
10798
10799 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10800
10801         * mini.c: setup the statistical profiler in the thread attach
10802         callback to cope with the new single thread code.
10803
10804 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10805
10806         * mini-ppc.c: ensure we have enough room for the profiler
10807         calls (fixed bug#72084).
10808
10809 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10810
10811         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10812         it.
10813
10814 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10815
10816         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10817
10818 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10819
10820         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10821         to succesfully execute parrotbench).
10822         * ssapre.h: Likewise.
10823
10824 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10825
10826         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10827         variable for stores to method arguments (fixes a SSAPRE issue).
10828
10829 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10830
10831         * mini.c: handle value types in dup, fixes gen-112.cs.
10832
10833 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10834
10835         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10836         sequence for calls in dynamic methods to avoid thunks.
10837
10838 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10839
10840         * mini.c: correctly remove dynamic methods from the hashtable.
10841
10842 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10843
10844         * driver.c: Disabled SSAPRE until fix the bug that appears
10845         in IronPython's parrotbench.
10846
10847 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10848
10849         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10850
10851         * mini.c (mono_method_to_ir): Revert the previous change.
10852         
10853         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10854         when AOT compiling.
10855
10856         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10857         mono_jit_info_table_find () etc. when running under valgrind.
10858
10859         * inssel.brg: Fix warnings.
10860
10861         * mini-exceptions.c: Fix warnings.
10862
10863 2005-01-31  Martin Baulig  <martin@ximian.com>
10864
10865         * driver.c (compile_all_methods_thread_main): Don't try to compile
10866         generic methods or anything which has type parameters.
10867
10868 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10869
10870         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10871
10872         * TestDriver.cs: Add --verbose flags.
10873
10874         * graph.c ssa.c: Fix 64 bit warnings.
10875         
10876         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10877         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10878         Fix 64 bit warnings.
10879
10880         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10881         variable not spotted by gcc.
10882         
10883         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10884         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10885         X86_COMPARE_MEMBASE opcodes.
10886
10887         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10888
10889 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10890
10891         * *: MonoMethod->signature might be NULL now. You *MUST* use
10892         mono_method_signature.
10893
10894 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10895
10896         * driver.c (compile_all_methods_thread_main): Compile the methods
10897         without invoking cctors.
10898
10899 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10900
10901         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10902         * basic-calls.cs: test for the above.
10903
10904 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10905
10906         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10907         MonoJitInfo changes.
10908
10909 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10912         eagerly if it contains dynamic methods.
10913         
10914         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10915
10916         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10917         trace, it is now computed by an icall from trace_ips.
10918         
10919         * mini-exceptions.c: Fix a warning.
10920
10921 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10922
10923         * mini-exceptions.c: don't bother getting stack trace info if
10924         it's not going to be used.
10925
10926 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10927
10928         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10929         ssapre-mini-ops.h.
10930
10931 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10932
10933         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10934
10935         * aot.c: Avoid calling mono_method_get_header () if not needed.
10936
10937         * mini.h: Bump AOT file format version.
10938         
10939         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10940
10941         * mini.c (mono_print_tree): Print more info for calls.
10942
10943 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10944
10945         * declsec.h: Remove warning by adding missing include for marshal.h
10946
10947 2005-01-26  Martin Baulig  <martin@ximian.com>
10948
10949         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10950         `ip' twice.
10951
10952 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10953
10954         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10955         flags.
10956
10957         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10958
10959         * aot.c (mono_compile_assembly): Fix a warning.
10960
10961 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10962
10963         * declsec.c: Look for security attributes on the original MonoMethod 
10964         (and not the wrapped one). This fix permissions on icalls.
10965
10966 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10967
10968         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10969
10970         * mini.c (mono_allocate_stack_slots): Add a fixme.
10971
10972         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10973
10974 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10975
10976         * inssel.brg: optimize casts of sealed types (more
10977         optimizations waiting for fixes in remoting).
10978
10979 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * inssel.brg (stmt): Add another dummy rule.
10982
10983         * driver.c: Fix warnings.
10984
10985         * driver.c (mono_main): If running under valgrind, instruct glib to use
10986         the system allocation functions so valgrind can track the memory
10987         allocated by the g_... functions.
10988
10989         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10990
10991         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10992
10993         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10994
10995         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10996         variables in try regions.
10997
10998         * mini.c (mini_method_compile): Don't disable optimizations on large
10999         methods when AOT compiling.
11000
11001         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11002         allocate stack slots. Not yet used.
11003
11004 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11005
11006         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11007
11008 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11009
11010         * mini-ppc.c: make the branch info relative as the code
11011         buffer can be reallocated.
11012
11013 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11014
11015         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11016         * driver.c: Removed the AOT/security restriction. Now initialize the
11017         security manager (in metadata) if --security is used.
11018         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11019         rather than the pointer to declarative security, when AOT is used.
11020
11021 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11022
11023         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11024         basic blocks, reduced intrinsic exception throwing code size.
11025
11026 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11027
11028         * driver.c (mini_usage): Reorder the usage screen.
11029
11030 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * mini.c (mono_resolve_patch_target): Fix warning.
11033
11034 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11035
11036         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11037         previous patch.
11038
11039         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11040
11041         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11042         breaks the amd64 build.
11043
11044         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11045         register allocation. Fixes #71454.
11046
11047         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11048
11049         * arrays.cs: Add new regression test.   
11050
11051 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11052
11053         * ssapre.c: Turned usage of snprintf to GString.
11054         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11055         (I left it on by mistake in my previous commit).
11056
11057 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11058
11059         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11060         on cond branch optimization (fixes bug# 71515).
11061
11062 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11063
11064         * abcremoval.c: Fixed bug 71062.
11065         * abcremoval.h: Likewise.
11066
11067 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11068
11069         * mini.c: Added a new functionality to optimize_branches, the removal
11070         of useless basic blocks, and fixed some problem in the removal of
11071         critical edges; some utility functions added for both purposes.
11072         * ssapre.c: Added complex expression support, and fixed bug 70637.
11073         * ssapre.h: Likewise.
11074         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11075         enabled in SSAPRE.
11076         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11077         * driver.c: Re-enabled SSAPRE.
11078
11079 2005-01-19  Martin Baulig  <martin@ximian.com>
11080
11081         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11082         the result of mono_get_method_constrained().
11083
11084 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11085
11086         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11087         manager.
11088
11089 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11090
11091         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11092         be detected.  Fixes #59296.
11093
11094 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11095
11096         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11097         which can happen. Fixes #71361.
11098
11099 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11100
11101         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11102         manager.
11103
11104 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11107         appdomain-unload.exe to fail.
11108         
11109         * mini.c: Fix some memory leaks.
11110
11111 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11112
11113         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11114         Fixed bug and sped up some codepaths.
11115
11116 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11117
11118         * mini.c: Fix some memory leaks.
11119
11120         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11121         conversion.
11122
11123         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11124
11125         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11126         #71320.
11127
11128         * iltests.il: Add regression test for #71320.
11129
11130 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11131
11132         * mini.c (mono_codegen): Fix installation of profiler hooks.
11133
11134         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11135
11136 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11137
11138         * mini.h, mini.c, cfold.c: optimize access to enum
11139         readonly fields, too. Eval conditional branches if possible
11140         to perform unreachable code removal in more cases.
11141
11142 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11143
11144         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11145
11146         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11147         code manager.
11148
11149         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11150         WinXP DEP. Fixes #71244.
11151
11152 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11153
11154         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11155
11156 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11157
11158         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11159
11160 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11161
11162         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11163         changes.
11164
11165         * mini.h: Bump AOT version.
11166
11167         * mini.h (MonoCompile): Change exvar to a hash table.
11168
11169         * mini.c: Allocate a separate exvar for each handler block.
11170
11171         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11172
11173         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11174         ex var with the pending exception and only throw if the two are equal.
11175         Fixes #68552.
11176         
11177         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11178
11179         * mini-x86.c: Fix warnings.
11180
11181         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11182         used by all the ports now.
11183
11184         * aot.c: Add write-symbols and save-temps options.
11185
11186 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11187
11188         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11189
11190 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11191
11192         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11193         operations.
11194
11195         * tramp-s390.c: Check vtable slot belongs to the domain.
11196
11197         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11198         as per other platforms.
11199
11200         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11201
11202 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11203
11204         * driver.c: we don't run the Main() code in a subthread anymore.
11205
11206 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11207
11208         * mini.c: added experimental rtc support in the statistical
11209         profiler: if the user has the permission, more accurate statistics
11210         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11211         The MONO_RTC value must be restricted to what the linux rtc allows:
11212         power of two from 64 to 8192 Hz.
11213
11214 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11215
11216         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11217
11218 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11219
11220         * mini-ppc.c: better icache flush for smp.
11221
11222 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11223
11224         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11225
11226         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11227         amd64 port, not yet used.
11228
11229 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11230
11231         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11232         a struct type.
11233
11234 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11235
11236         * driver.c: Added --security option to activate the security manager.
11237         Right now this will allow code generation for declarative demands and
11238         is disabled when AOT is specified.
11239         * mini.c: Add code generation for declarative security demands.
11240         * mini.h: Add mono_use_security_manager as an extern gboolean.
11241
11242 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11243
11244         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11245         emitting more dense assembly code.
11246
11247         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11248         exception throwing stuff.
11249
11250 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11251
11252         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11253         dead code.
11254
11255         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11256         left in by mistake.
11257
11258         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11259         fixed.
11260
11261         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11262
11263         * tramp-*.c: Only patch vtable slots if the object is in the current
11264         domain. Fixes appdomain-unload.exe.
11265
11266         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11267         
11268         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11269         x86 branch.
11270
11271 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11272
11273         * mini.c (reverse_branch_op): New helper function.
11274
11275         * mini.c (optimize_branches): Run the new optimization only on 
11276         platforms which support it. Also reverse all kinds of branches.
11277
11278         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11279
11280         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11281         a throw statement.
11282
11283         * mini.c (optimize_branches): Reverse not-equals branches if the false
11284         bblock is a throw. This happens a lot of time with argument checking in
11285         corlib.
11286
11287         * mini.c (mono_codegen): Add support for placing basic blocks after
11288         the function epilogue.
11289
11290         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11291         function epilogue.
11292         
11293 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11294
11295         * mini.c (setup_stat_profiler): Only set this up if the platform
11296         supports ITIMER_PROF.
11297
11298 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11299
11300         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11301         previous patch.
11302
11303         * inssel.brg: Fix a warning.
11304
11305 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11306
11307         * mini.c: added support for statistical profiler 
11308         (run with: --profile=default:stat).
11309
11310 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11311
11312         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11313
11314         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11315
11316         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11317         related to global registers from the amd64 port.
11318
11319 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11320
11321         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11322
11323         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11324         with global registers.
11325         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11326
11327         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11328
11329 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11330
11331         * debug-mini.c (encode_value): Fix off-by-one.
11332
11333         * aot.c (encode_value): Likewise.
11334
11335         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11336
11337 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11338
11339         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11340         AOT.
11341
11342         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11343         
11344         * aot.c (emit_method_info): Increase size of temp buffer.
11345
11346         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11347         the AOT case.
11348
11349 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11350
11351         * aot.c (emit_method_info): Fix build.
11352         
11353         * aot.c: Further rework of the AOT file format to reduce the size of
11354         the method info data.
11355
11356         * mini.h: Bump AOT file format version.
11357
11358 2004-12-27  Martin Baulig  <martin@ximian.com>
11359
11360         * mini.c (mini_get_method): New static method; call
11361         mono_get_method_full() and mono_get_inflated_method().
11362         (mono_method_to_ir): Use mini_get_method() instead of
11363         mono_get_method_full(). 
11364
11365 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11366
11367         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11368
11369 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11370
11371         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11372
11373         * inssel-amd64.brg: Add some optimization rules.
11374
11375 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11376
11377         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11378         standard not GC'd stuff is fine.
11379
11380 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11381
11382         * aot.c: Rework the AOT file format to get rid of most of the global
11383         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11384
11385         * mini.h: Bump AOT file format version.
11386         
11387 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11388
11389         * mini.h: Bump AOT file format version.
11390
11391         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11392         address is inside a GOT.
11393
11394         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11395
11396         * cpu-pentium.md: Increase the maximum size of some instructions which
11397         might involve a got access.
11398         
11399         * mini.c (get_method_from_ip): Another debug helper function.
11400
11401         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11402         when got var accesses are created during the decompose phase.
11403
11404         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11405
11406         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11407         argument mini_compile_method and to MonoCompile, and use this to
11408         determine whenever a given method is compiled for AOT. This allows the
11409         other methods compiled during AOT compilation to be free of AOT stuff,
11410         so the backends does not need to add special support for them by
11411         creating a fake GOT etc.
11412
11413         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11414         longer needed.
11415
11416 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11417
11418         * mini.c (mono_method_to_ir): It turns out that some of the
11419         x-appdomain wrappers are lax with types, so just ignore this for
11420         all wrappers.
11421
11422         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11423         at the vtable->klass. If it is non-shared code we can just use the
11424         vtable.
11425
11426 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11427
11428         * mini-ppc.c: access MonoDomain from tls, too.
11429
11430 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11431
11432         * declsec.c: Removed unused variable (and related warning ;-)
11433
11434 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11435
11436         * iltests.il: New test for LDELEMA on an array of ref types.
11437
11438         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11439         all ldelema's on reftypes.
11440         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11441         it was the wrong place to put it.
11442
11443         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11444         register to pop to make this cleaner, at the request of Paolo.
11445
11446 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11447
11448         * mini-ops.h (OP_GETHASHCODE): New op.
11449
11450         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11451
11452         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11453         operation.
11454
11455         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11456         by 25%.
11457         
11458         * mini-x86.c (mono_arch_output_basic_block): Rather than
11459
11460         add ebp, 4
11461
11462         Emit
11463
11464         pop edx
11465
11466         The first is 3 bytes while the second is 1. This saves 36 kb on
11467         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11468         see a small boost because of icache locality.
11469
11470         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11471
11472 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11473
11474         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11475         started code sharing with the generic code.
11476
11477 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11478
11479         * mini-ppc.c, cpu-g4.md: added code for direct access to
11480         tls data slots.
11481
11482 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11483
11484         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11485          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11486         to OP_TLS_GET.
11487
11488 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11489
11490         * declsec.c|h: Added functions to cache the declarative stack modifiers
11491         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11492         structure.
11493         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11494         created. Register internal calls for System.Security.SecurityFrame::
11495         _GetSecurityFrame and _GetSecurityStack.
11496         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11497         the definitions for the new stack walk/callback mechanism.
11498         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11499         first security frame for LinkDemands and InheritanceDemands) and
11500         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11501         from lupus.
11502         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11503         walk initialization (lupus).
11504
11505 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11506
11507         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11508         idiom.
11509         (handle_loaded_temps): Do not create a temporary variable for
11510         things that we know are temps. They will never be modified.
11511         (mono_spill_call): Set MONO_INST_IS_TEMP
11512         (mono_emulate_opcode): ditto
11513         (emit_tree): ditto
11514         (mono_method_to_ir.CEE_DUP): ditto
11515
11516 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11517
11518         * mini.c (type_to_eval_stack_type): Make this handle the void type
11519         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11520         (emit_tree): use ip_in_bb to special case some common idioms
11521         Update all callers to pass in the IP.
11522         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11523
11524         This gives us a nice 2% speedup in mcs bootstrap.
11525
11526         * mini-x86.c (peephole_pass): Peephole pass to make
11527         mov  [foo], eax
11528         push [foo]
11529
11530         into
11531
11532         mov [foo], eax
11533         push eax
11534
11535         * mini.c (ip_in_bb): new method.
11536         (mono_method_to_ir): use this method rather than doing the hash
11537         lookup ourselves.
11538
11539         * linear-scan.c (mono_linear_scan): When expiring actives, you
11540         don't need to keep around variables that expire on this
11541         instruction. This makes it so that:
11542              a = b + 1
11543         will turn into:
11544              store (ebx add (ebx, 1))
11545         which will become
11546              add ebx, 1
11547
11548 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11549
11550         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11551         combination to avoid doing two copies. Fix up problems with previous
11552         patch.
11553
11554         * mini.c: Fix 64 bit warnings.
11555
11556         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11557
11558 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11559
11560         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11561         changes from the x86 code.
11562
11563         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11564
11565 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11566
11567         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11568         throwing code to reduce its size, unify the AOT and non-aot code and 
11569         get rid of relocations in the AOT case.
11570
11571         * mini-x86.h mini.c exceptions-x86.c 
11572         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11573         raise corlib exceptions which doesn't require relocations in the 
11574         caller.
11575
11576         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11577
11578 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11579
11580         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11581         needed.
11582
11583         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11584         in the AOT case.
11585
11586 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11587
11588         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11589         with add function when used from Inc/dec atomic 
11590         functions. Re-enabled optimization on x86.
11591         * mini-ops.h: renamed atomic_add functions to
11592         allow _add to match the Interlocked::Add and
11593         _add_next to match Interlocked::Inc/Dec.
11594
11595 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11596
11597         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11598         linking of BBs to the end BB, and enabled SSAPRE also with
11599         consprop and copyprop (which was prevented by that bug).
11600
11601 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11602
11603         * mini-x86.c: disabling the Interlocked optimizing code. 
11604
11605 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11606
11607         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11608         file version check.
11609         
11610 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11611
11612         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11613         interlocked optimization due lack of support on x86, rewrote 
11614         exchange to take into account that base may be in eax.
11615         
11616         xsp works again; activated Interlocked optimizing code.
11617         
11618 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11619
11620         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11621
11622 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11623
11624         * mini-ops.h: Add new opcodes.
11625
11626         * mini.h: Add new patch types. Add got_var to MonoCompile.
11627
11628         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11629         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11630         make it work with all kinds of patchable code.
11631
11632         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11633         address of the GOT, and referencing entries in the GOT.
11634
11635         * mini.c: Add code to load the GOT address if needed by an opcode.
11636
11637         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11638         independent AOT code on the x86 using an elf-style Global Offset Table.
11639
11640 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11641
11642         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11643
11644 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11645
11646         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11647         when running xsp.
11648
11649 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11650
11651         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11652         of Interlocked:Increment/Decrement/Add as inline ops.
11653         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11654
11655 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11656
11657         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11658         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11659
11660 2004-12-12  Duncan Mak  <duncan@ximian.com>
11661
11662         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11663         again. `patch_info->table_size' is no longer valid after Zoltan's
11664         commit #37636.
11665
11666 2004-12-12  Martin Baulig  <martin@ximian.com>
11667
11668         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11669         if we are the "real" method, ie. not an inlined method inside it.
11670
11671 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11672
11673         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11674         before we look in the special fields table. This fixes
11675         ../tests/thread-static-init.cs.
11676
11677 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11678
11679         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11680         for Array get_Rank and get_Length. Fixes bug #70465.
11681
11682 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11683
11684         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11685         separate structure to reduce the size of MonoJumpInfo.
11686
11687 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11688
11689         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11690
11691 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11692
11693         * mini.c (mini_get_inst_for_method): Changed to allow ports
11694         to return a MonoInst instead of opcode 
11695         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11696         
11697         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11698         Allow ports to return a created MonoInst instead of op-code, will enable
11699         new optimizations.
11700         (renamed mini_get_opcode_for_method to better reflected the functionality)
11701
11702 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11703
11704         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11705
11706 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11707
11708         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11709         Fixes #69985.
11710
11711 2004-12-08  Martin Baulig  <martin@ximian.com>
11712
11713         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11714         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11715
11716 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11717
11718         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11719         correctly.
11720
11721         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11722         arithmetic.
11723
11724 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11725
11726         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11727
11728 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11731         bug introduced by the previous patch.
11732
11733 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11734
11735         * mini-ppc.c, objectc.cs: handle large structs passed by value
11736         (fixes bug #69972).
11737
11738 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11739
11740         * mini-ppc.c: OP_ARGLIST implementation from
11741         Geoff Norton  <gnorton@customerdna.com>.
11742
11743 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11744
11745         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11746         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11747
11748 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11749
11750         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11751
11752 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11753
11754         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11755         support.
11756
11757 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11758
11759         * mini-sparc.c: Zero out localled-ed memory.
11760
11761         * iltests.il: Add tests for zeroing out localloc-ed memory.
11762
11763 2004-12-04  Martin Baulig  <martin@ximian.com>
11764
11765         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11766         mono_method_get_signature_full().       
11767
11768 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11769
11770         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11771         and some utility functions (always for SSAPRE), integrated SSAPRE.
11772         * mini.h: Likewise.
11773         * driver.c: Added ssapre option.
11774         * ssa.c: Small fix on OP_ARG handling.
11775         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11776         * Makefile.am: Likewise.
11777
11778 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11779
11780         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11781         now in the xp code.
11782
11783         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11784         icall.
11785
11786 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11787
11788         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11789         
11790         * cpu-s390.md : Increase instruction length of oparglist.
11791
11792         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11793
11794 2004-11-30  Martin Baulig  <martin@ximian.com>
11795
11796         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11797         virtual generic methods.  We call a special helper_compile_generic_method()
11798         icall to retrieve the method from the vtable, inflate and compile
11799         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11800
11801         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11802
11803 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11804
11805         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11806
11807 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11808
11809         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11810         Fixes #69929.
11811
11812 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11813
11814         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11815         platforms with PIC aot.
11816
11817 2004-11-28  Martin Baulig  <martin@ximian.com>
11818
11819         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11820         Fixes gen-112.cs.
11821
11822 2004-11-28  Martin Baulig  <martin@ximian.com>
11823
11824         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11825         the result of mono_type_get_underlying_type() to check whether
11826         we're byref.
11827
11828 2004-11-26  Martin Baulig  <martin@ximian.com>
11829
11830         * mini.c
11831         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11832         in the g_assert().
11833
11834 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11835
11836         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11837         the same way as the other arguments so they won't get clobbered.
11838
11839         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11840         calls through R11 since it is clobbered by the trampoline code.
11841
11842 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11843
11844         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11845         pick up in-tree mscorlib.dll.
11846
11847 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11848
11849         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11850
11851         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11852         runtime data/code are now stored in a table similar to the GOT in ELF. 
11853         This allows the code itself to be position independent.
11854
11855         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11856         loading changes.
11857
11858         * aot.c: Attach ELF type (object/function) directives to all global
11859         symbols.
11860
11861         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11862
11863         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11864
11865         * mini-amd64.h: Turn on PIC AOT code.
11866
11867         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11868         returning the offset within an OP_AOTCONST instruction where the GOT
11869         offset needs to be added.
11870
11871         * mini.h: Bump AOT file format version.
11872
11873 2004-11-25  Martin Baulig  <martin@ximian.com>
11874
11875         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11876         uninflated generic methods.
11877
11878 2004-11-25  Martin Baulig  <martin@ximian.com>
11879
11880         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11881
11882 2004-11-24  Martin Baulig  <martin@ximian.com>
11883
11884         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11885         original klass (this only applies for generic instances).
11886
11887 2004-11-24  Martin Baulig  <martin@ximian.com>
11888
11889         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11890         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11891         that array).
11892
11893 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11894
11895         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11896         localloc. Fixes #69678.
11897
11898         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11899         
11900 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11901
11902         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11903         used SSE registers on pinvoke calls. Fixes #69774.
11904
11905 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11906
11907         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11908         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11909
11910 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11911
11912         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11913         Refer directly to the mcs/ tree.
11914
11915 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11916
11917         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11918         Check if a trampoline for a synchronized method is required. 
11919
11920 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11921
11922         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11923         with localloc if needed. Throe arithmetric exception in
11924         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11925         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11926
11927 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11928
11929         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11930         types before switching on type.  Fixes #69622.
11931
11932 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11933
11934         * Makefile.am (check-local): New.  Integrate into 'make check'.
11935         (MCS,RUNTIME): Define using in-tree mono and mcs.
11936         (ILASM): New.
11937         (%.exe): Use $(ILASM).
11938
11939 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11940
11941         * mini-ppc.c: adjust initial prolog size (bug #69691).
11942
11943 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11944
11945         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11946         #69664.
11947
11948 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11949
11950         * Makefile.am (clean-local): Rename from 'clean'.
11951
11952 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11953
11954         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11955         to mono_arch_is_int_overflow. 
11956         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11957         SIGFPE events.
11958
11959 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11960
11961         * declsec.c|h: New files to support declarative security attributes.
11962         Added function to check if a method has (applicable) security.
11963         * mini.c|h: Add check for declarative security attributes in
11964         mono_method_check_inlining.
11965         * Makefile.am: Added declsec.c and declsec.h to the build.
11966
11967 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11968
11969         * mini.c, mini.h: update to keep dynamic code info per-domain.
11970
11971 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11972
11973         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11974         (mini_init): Get rid of it from here too.
11975
11976 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11977
11978         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11979         implemented OP_RETHROW (patch by Geoff Norton
11980         <gnorton@customerdna.com>).
11981
11982 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11983
11984         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11985         between appdomains.  Fixes appdomain-unload on PPC.
11986
11987 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11988
11989         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11990         mini-exceptions.c: handle the new wrapper types.
11991         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11992         token value as a MonoClass* when compiling a wrapper.
11993         mono_jit_create_remoting_trampoline now takes an additional
11994         MonoRemotingTarget parameter.
11995         
11996 2004-11-10  Martin Baulig  <martin@localhost>
11997
11998         * mini.c (mono_method_to_ir): Use `generic_container->context'
11999         rather than creating a new one.
12000
12001 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12002
12003         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12004
12005         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12006
12007 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12008
12009         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12010         the experimental aot cache stuff.
12011
12012 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12013
12014         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12015         mini-exceptions.c: update to exception clause structure changes.
12016
12017 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12018
12019         * exceptions-x86.c (throw_exception): Fix warnings.
12020
12021         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12022         for OP_RETHROW.
12023
12024 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12025
12026         * exceptions-sparc.c (get_throw_exception): Really fix this.
12027
12028 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12029
12030         * tramp-*.c: we no longer support icalls without wrappers, so
12031         a bit of code can be removed here
12032
12033 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12034
12035         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12036         patch.
12037
12038         * cpu-sparc.md: Add op_rethrow.
12039
12040         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12041
12042         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12043
12044         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12045         * mini-ops.h: Add OP_RETHROW.
12046
12047         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12048
12049         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12050
12051 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12052         
12053         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12054         Makes the output much easier to read
12055
12056 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12057
12058         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12059         prevents another huge leak when compiling with ssa. Secondly, the
12060         performance of doing this rather than freeing the lists is much
12061         better. GList does a lock every time you allocate a list link,
12062         so that it can use a memory pool. So, it is better to just use
12063         a memory pool of our own.
12064         
12065         * ssa.c, linear-scan.c: replace g_list_remove_link with
12066         g_list_delete.  The remove one does not free the GList, so we were
12067         leaking memory. On -O=all --compile-all with corlib, this cut down
12068         3 MB of allocations.
12069
12070 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12071
12072         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12073
12074         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12075
12076         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12077         into a new function mono_create_jit_trampoline ().
12078
12079 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12080
12081         * trace.c (get_spec): Allow tracing of classes without a namespace.
12082
12083 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12084
12085         * mini.c: Fix pointer overwrite in mini_method_compile.
12086
12087 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12088
12089         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12090         The darwin ABI needs some special handling for 1 and 2 byte structs
12091         Lets use lbz/lhz instead of lwz everywhere.
12092         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12093         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12094         Use stb/sth for the former, and put the latter always on stack instead of in
12095         argument registers.
12096
12097 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12098
12099         * trace.c (is_filenamechar): Add '_'.
12100
12101 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12102
12103         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12104
12105         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12106
12107 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12108
12109         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12110         depends on libmonogc. Fixes #68805.
12111
12112 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12113
12114         * mini.c (mono_jit_free_method): Provide extra information for
12115         this error.  Currently this leaks, but will be turned into a
12116         developer option in the future.
12117
12118 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12119
12120         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12121
12122 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12123
12124         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12125         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12126         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12127
12128 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12129
12130         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12131         trampolines for AOT code.
12132
12133 2004-10-22    <vargaz@freemail.hu>
12134
12135         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12136         constructed types. Fixes #68136.
12137
12138 2004-10-21  Martin Baulig  <martin@ximian.com>
12139
12140         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12141         if it returns true, unwind the stack to the call instruction.
12142
12143 2004-10-21    <vargaz@freemail.hu>
12144
12145         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12146
12147         * mini.h: Bump AOT version number.
12148
12149         * objects.cs: Add another test for unbox trampolines.
12150
12151         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12152         valuetype methods.
12153
12154 2004-10-20    <vargaz@freemail.hu>
12155
12156         * driver.c: Add SHARED to the set of optimizations tested.
12157
12158         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12159
12160         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12161         used by CEE_NEWARR.
12162
12163         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12164
12165 2004-10-20  Martin Baulig  <martin@ximian.com>
12166
12167         * mini-exceptions.c (mono_handle_exception): Call
12168         mono_debugger_handle_exception() to tell the debugger about
12169         catch/finally clauses.
12170
12171 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12172
12173         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12174
12175         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12176         #68447.
12177
12178 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12179
12180         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12181         methods as their native size, fixed bug #57543, #57545.
12182         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12183         This saves a temporary register and mullw call down into 1 (minor perf
12184         increase for cases like sum = sum * 5;  This use to translate into:
12185             li r11,5
12186             mullw r28,r28,r11
12187         It now translates to
12188             mulli r28,r28,5
12189
12190 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12191
12192         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12193         #68388.
12194
12195 2004-10-11  Martin Baulig  <martin@ximian.com>
12196
12197         * mini.c (mono_method_to_ir): If we're a generic method, get the
12198         MonoGenericContainer from our MonoMethodNormal and create a
12199         MonoGenericContext from it.
12200
12201 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12202
12203         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12204
12205         * basic-long.cs: Add test for checked i8->i2 cast.
12206
12207 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12208
12209         * inssel-ppc.brg: added a couple of speedup rules.
12210
12211 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12212
12213         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12214         to speed up rebuilds.
12215
12216 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12217
12218         * mini-s390.c: Minor fix to OP_OR_IMM.
12219
12220 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12223         better. Fixes appdomain-unload.exe on sparc.
12224
12225 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12226
12227         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12228         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12229         see bug 67324.
12230
12231 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12234
12235 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12236
12237         * mini.c: Always generate a field read/write wrapper for members
12238         of the class MarshalByRefObject since the actual instance could
12239         be a CBO.
12240
12241 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12242
12243         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12244
12245 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12246
12247         * driver.c mini.h trace.c: Move the setting of the main assembly into
12248         a separate function called mono_trace_set_assembly () and call it after
12249         actually loading the main assembly. Fixes #66872.
12250
12251 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12252
12253         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12254         using the code manager.
12255
12256 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12257
12258         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12259
12260 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12261
12262         * cpu-amd64.md: Fix bug in previous patch.
12263         
12264         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12265         #66650.
12266
12267 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12268
12269         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12270         mini-exceptions.c: updates for changed stack walk interface.
12271
12272 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12273
12274         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12275
12276 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12277
12278         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12279
12280 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12281
12282         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12283         since assemblies can't be unloaded.
12284         
12285 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12286
12287         * cpu-amd64.md: Fix more instruction lengths.
12288
12289         * cpu-amd64.md: Fix lengths of some instructions.
12290
12291 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12292
12293         * inssel.brg: Make the array ldelema check aot friendly.
12294
12295 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12296
12297         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12298
12299         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12300
12301 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12302
12303         * mini-x86.c: Fix build.
12304
12305         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12306         mono_type_get_underlying_type () helper function to simplify code.
12307         
12308 2004-09-09  Martin Baulig  <martin@ximian.com>
12309
12310         * mini-amd64.c: Don't access `type->data.klass' directly, call
12311         mono_class_from_mono_type() instead since the type may be a
12312         generic instance.
12313
12314 2004-09-09  Martin Baulig  <martin@ximian.com>
12315
12316         * mini-amd64.c (get_call_info): Fix support for generic instances.
12317         (add_valuetype): Use mono_class_from_mono_type() to get the class
12318         since we can be a generic instance.
12319
12320 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12321
12322         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12323
12324 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12325
12326         * liveness.c: reset spill costs on each scan: bug 62107
12327
12328 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12329
12330         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12331         unnecessary line that doesn't compile
12332
12333 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12334
12335         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12336         trampolines, make them call an error function so people can fix their
12337         code.
12338
12339 2004-09-06  Martin Baulig  <martin@ximian.com>
12340
12341         * mini.c (mono_method_to_ir): When initializing locals, handle a
12342         generic instances like a valuetype if it's a valuetype and like a
12343         class if it's a class.
12344
12345 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12346
12347         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12348         stack. Fixes #64674.
12349
12350         * exceptions.cs: Add test for unwinding of call arguments.
12351
12352 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12353
12354         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12355         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12356         set the carry/borrow flag). The sparc and s390 implementations
12357         can now use optimized versions (and simplify the code). ppc bugfixes.
12358
12359 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12360
12361         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12362
12363 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12364
12365         * inssel-amd64.brg: Remove leftover 32 bit rule.
12366
12367         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12368
12369 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12370
12371         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12372         mono_arch_find_jit_info functions into a new function. Fix a memory
12373         leak.
12374
12375         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12376         refactored code.
12377         
12378 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12379
12380         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12381         as well.
12382         
12383         * exceptions.cs: Add array size tests.
12384
12385         * mini.c: Allocate a separate icall wrapper for each arity of 
12386         mono_array_new_va. Fixes #59509.
12387
12388         * exceptions.cs: Add testcase for 64578.
12389
12390         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12391
12392         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12393         
12394 2004-09-02  Martin Baulig  <martin@ximian.com>
12395
12396         * mini.c (mono_method_to_ir): When initializing the locals, call
12397         handle_initobj() on the generic instance itself, not its
12398         underlying type.
12399
12400 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12401
12402         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12403         MonoJitInfo for dynamic methods.
12404
12405         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12406
12407         * mini.c: Add support for freeing JIT data for dynamic methods.
12408         
12409 2004-09-01  Martin Baulig  <martin@ximian.com>
12410
12411         * mini-x86.c (is_regsize_var): Added support for generic
12412         instances.
12413         (mono_arch_emit_prolog): Make this compile again, use
12414         `x86_push_imm_template (code)'.
12415
12416 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12417
12418         * mini-x86.c: make all push_imm instructions that get
12419         patched always emit the long form
12420
12421 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12424         in a per-domain hash.
12425
12426         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12427         types.
12428
12429 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12432         work.
12433         
12434         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12435         work.
12436
12437         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12438         Beginnings of SSE2 support.
12439
12440         * exceptions.cs: Add more tests for checked int<->uint casts.
12441
12442 2004-08-28  Martin Baulig  <martin@ximian.com>
12443
12444         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12445         generic instances.
12446
12447         * mini.c
12448         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12449         Handle generic instances recursively.
12450
12451 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12452
12453         * iltests.il: test for conv.u8 on a constant
12454
12455 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12456
12457         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12458         LCONV_x4 (shrun_32 (membase)).
12459
12460 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12461
12462         * inssel-x86.brg: c&p rules for push/setret of long
12463
12464 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12465
12466         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12467         compare (regvar, base)
12468
12469         * inssel-x86.brg: more burg love
12470
12471         * inssel.brg: more cleanup
12472
12473         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12474
12475 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12476
12477         * basic-long.cs, basic-calls.cs: new tests for optimization.
12478
12479 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12480
12481         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12482         patch.
12483
12484 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12485
12486         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12487         
12488 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12489
12490         * inssel.brg (mini_emit_memcpy): use 
12491         NO_UNALIGNED_ACCESS to disable memcpy optimization
12492
12493 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12494
12495         * mini-amd64.c: Handle generic types in various places.
12496
12497         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12498
12499 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12500
12501         * mini.c (handle_box): Fix warning.
12502
12503         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12504
12505         * mini-amd64.h: Enable the emit_state optimization.
12506
12507         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12508
12509         * mini-amd64.c: Add some new 64 bit peephole opts.
12510
12511         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12512
12513         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12514
12515         * mini-amd64.c: Register allocator fixes.
12516
12517         * mini.c: Add an optimization to emit_state to avoid allocation of new
12518         registers on some platforms.
12519
12520 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12521
12522         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12523
12524         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12525         allocation. Fixes #63085.
12526
12527         * basic-long.cs: Add new regression test.
12528
12529         * mini-amd64.c: Register allocator improvements.
12530
12531 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12532
12533         * mini-amd64.c (read_tls_offset_from_method): Add another code
12534         sequence.
12535
12536         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12537         instruction sequence for nullifying class init trampolines.
12538
12539         * objects.cs: Add new regalloc test.
12540
12541         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12542
12543 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12544
12545         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12546         
12547         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12548         arguments.
12549
12550         * driver.c: Fix profiling after TLS changes.
12551         
12552         * driver.c (mono_main): Set mono_stats.enabled if needed.
12553
12554         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12555         CEE_BOX.
12556
12557 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12558
12559         * mini-x86.c: use a 1 op rather than a 2 op tls access
12560         instruction -> faster.
12561
12562 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12563
12564         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12565         x86 backend.
12566
12567 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12568
12569         * exceptions-sparc.c (throw_exception): fix typo
12570
12571 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12572
12573         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12574         set tree->dreg correctly with tls. Allow any
12575         register to be used.
12576
12577         * mini-x86.c (read_tls_offset_from_method): add new code
12578         generation pattern seen with GCC.
12579
12580
12581 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12582
12583         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12584         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12585         exceptions-sparc.c: fix some performance issues in exception
12586         handling and setting of the stack trace for exceptions that were
12587         already thrown.
12588
12589 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12590
12591         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12592         x86 backend.
12593         
12594         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12595         registers.
12596
12597 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12598
12599         This patch inlines tls access, when possible.
12600         
12601         * mini.h: new arch functions for TLS intrinsics.
12602         All platforms updated with a stub.
12603
12604         * mini.c: use the new intrinsics
12605
12606         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12607         arch specific intrinsic for tls variables
12608
12609 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12610
12611         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12612         under windows.
12613
12614 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12615
12616         * mini.c: thread local allocation
12617
12618 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12621
12622         * Makefile.am: Link against the static version of libmonogc.
12623         
12624         * Makefile.am: Link the static versions of the convenience libraries
12625         into the mono executable.
12626
12627         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12628
12629 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12630
12631         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12632         on integer overflow.
12633
12634         * mini-amd64.c: Reorganize function call code.
12635
12636         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12637
12638 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12639
12640         * inssel-x86.brg: use xor eax,eax.
12641         
12642         * basic.cs: new tests
12643
12644 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12645
12646         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12647         in exception throwing code.
12648         
12649 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12650
12651         * inssel-x86.brg: use xor esi,esi.
12652
12653 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12654
12655         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12656         can trace methods compiled during mini_init () too.
12657
12658         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12659         CEE_CONV_U4.
12660
12661 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12662
12663         * Makefile.am: static link on x86 (r=zoltan)
12664
12665 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12666
12667         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12668         code since it causes some programs to fail.
12669
12670 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12671
12672         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12673
12674 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12675
12676         * mini.c: ovfops_op_map - add STACK_OBJ case for
12677         CONV_I 
12678         * basic.cs: add test_0_pin_string as test
12679         case for above.
12680
12681 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12682
12683         * Makefile.am: build C# if srcdir != builddir
12684
12685 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12686
12687         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12688         fall-through blocks.
12689
12690 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12691
12692         * driver.c: enable loop by default again and include abcrem in -O=all.
12693
12694 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12695
12696         * iltests.il: Add some localloc tests.
12697
12698         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12699
12700         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12701         Fixes #62574.
12702
12703         * inssel-amd64.brg: Add some optimizations.
12704
12705         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12706         for gcc-3.4.
12707
12708         * Makefile.am: Statically link mono against libmono on AMD64.
12709         
12710         * mini-amd64.c inssel-amd64.brg: Optimizations.
12711
12712 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12713
12714         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12715
12716         * tramp-amd64.c: Patch calling code in trampolines.
12717
12718 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12719
12720         * mini-amd64.c: pinvoke struct passing fixes.
12721
12722 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12723
12724         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12725         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12726
12727 2004-08-05  Duncan Mak  <duncan@ximian.com>
12728
12729         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12730         CEE_LDELEM_ANY.
12731
12732 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * mini-amd64.c (emit_move_return_value): Move return value for normal
12735         calls too.
12736
12737 2004-08-05  Martin Baulig  <martin@ximian.com>
12738
12739         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12740         `type->type'; just modify `type' itself when dealing with enums
12741         and generic instances.
12742         (check_call_signature): Make `simple_type' a `MonoType *'.
12743
12744 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12745
12746         * mini.c: Use OP_PADD to add offsets to addresses.
12747
12748         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12749
12750 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12751
12752         * mini-sparc.c (mono_arch_emit_epilog): fix check
12753         for folding last op into restore instruction
12754
12755 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12758         helper methods using the code manager.
12759         
12760         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12761
12762         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12763
12764 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12765         
12766         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12767           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12768
12769         * mini-s390.c: fix tail processing
12770
12771 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12772
12773         * mini-ppc.c: mul.ovf.un exception name fix.
12774
12775 2004-08-03  Martin Baulig  <martin@ximian.com>
12776
12777         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12778         instances; before jumping to `handle_enum', also modify `ptype'.
12779
12780 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12781
12782         * cpu-sparc.md: fcall maximal length too small.
12783
12784 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12785
12786         * mini-amd64.c mini.h: Add initial support for passing/returning 
12787         structures to/from pinvoked methods.
12788
12789 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12790
12791         * mini-ppc.c: reg allocator fix.
12792
12793 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12796
12797         * inssel.brg: Optimize memset on 64 bit machines.
12798
12799         * mini-amd64.c: Fix some vararg cases.
12800
12801 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12802
12803         * mini-s390.c: Corrected macro in emit_float_to_int
12804
12805         * s390-abi.cs: Tests to exercise the s390 ABI
12806
12807 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12808
12809         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12810         caller saved regs.
12811
12812         * basic.cs: Add a test for add.ovf.un.
12813
12814 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12815
12816         * mini-sparc.c: add case for OP_IDIV_UN
12817
12818 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12819
12820         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12821         
12822         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12823
12824 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12825
12826         * basic.cs: regression tests.
12827
12828         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12829         regressions.
12830
12831 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12832
12833         * basic.cs: Add a new test.
12834
12835         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12836         and AOT. Various fixes and optimizations.
12837
12838         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12839
12840 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12841
12842         * mini-ppc.c: make sure temp regs are not used for global reg
12843         allocation.
12844
12845 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12846
12847         * cpu-sparc.md: conv_i8 fix for 64bits
12848
12849         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12850
12851 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12852         
12853         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12854         add opcode for cmp BYTE PTR [eax], imm.
12855
12856         * inssel.brg: Make memcpy and memset takes bases.
12857
12858 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12859
12860         * *-amd64.*: More AMD64 work.
12861         
12862 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12863
12864         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12865         add a compare-not-equal opcode.
12866         
12867 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12868
12869         * mini.c: Use mono_init_from_assembly instead of mono_init.
12870         
12871 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12872
12873         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12874
12875         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12876
12877         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12878
12879         * inssel.brg: 64 bit fixes.
12880
12881         * mini.h (MonoCallInst): Add some AMD64 specific data.
12882
12883         * mini.h: Add some OP_P opcodes.
12884
12885 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12886
12887         * basic.cs: tests for 61797 and 61740
12888
12889 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12890
12891         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12892         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12893
12894 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12895
12896         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12897
12898         * *-amd64*.*: Ongoing AMD64 work.
12899
12900 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12901
12902         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12903
12904         * *-amd64*: Ongoing AMD64 work.
12905
12906         * mini-arch.h: Add AMD64 support.
12907
12908         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12909
12910         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12911
12912         * mini-ops.h: Add new opcodes.
12913
12914         * Makefile.am: Add AMD64 support.
12915
12916         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12917         rules into the inssel-long*.brg files.
12918
12919         * *-amd64.*: Add beginnings of AMD64 backend.
12920
12921 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12922
12923         * mini.c (print_dfn): commenting out the code that prints
12924         the cil. With -O=deadce, this makes -v -v crash.
12925         
12926         * cpu-pentium.md: make checkthis have a length of 2
12927
12928 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12929
12930         * mini-sparc.h: fix implementations of __builtin
12931         functions for Sun compiler for V9.
12932
12933 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12934
12935         * mini.c: use the new stelem.ref wrapper
12936         * exceptions.cs, arrays.cs: new stelem.ref tests
12937
12938 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12939
12940         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12941         new XSP should work with these changes).
12942
12943 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12944         
12945         * inssel-{long32,x86,}.brg: trivial optimizations.
12946         
12947 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini.c: load value when emitting box operation in
12950         constrained calls.
12951
12952 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12953
12954         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12955         is one byte shorter than cmp DWORD PTR [eax], 0.
12956
12957 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12958
12959         * inssel-ppc.brg: arguments on the stack are always
12960         relative to the stack pointer (spotted by Neale Ferguson).
12961
12962 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12963
12964         * exceptions-x86.c: delay appending the method name to the trace until
12965         after mono_jit_info_table_find is called, as this gets the real
12966         MonoMethod.
12967
12968 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12969
12970         * aot.c: register roots
12971
12972 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12973
12974         * aot.c : I could just use PLATFORM_WIN32 flag.
12975
12976 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12977
12978         * aot.c : Reverting the previous fix. This time it broke linux build.
12979
12980 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12981
12982         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12983
12984 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12985
12986         * mini.c (handle_stack_args): Remove some more debugging code.
12987         
12988         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12989
12990         * driver.c mini.h aot.c: Allow additional options to be specified with
12991         --aot and pass them to mono_compile_assembly.
12992
12993         * aot.c: Add experimental code to AOT compile all loaded assemblies
12994         on demand and save the code into a cache in the filesystem.
12995
12996         * aot.c: Add support for more wrapper methods.
12997         
12998         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12999         58863.
13000
13001         * cpu-*.md: Remove removed opcodes.
13002
13003         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13004         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13005         related icalls to marshal.c.
13006
13007 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13008
13009         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13010
13011         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13012
13013         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13014
13015 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13016         * liveness.c: If liveness is recomputated we need to reset the information
13017         for each variable. This way, if the liveness range has been narrowed
13018         by optimizations that happened after the last computation, we can return
13019         a smaller range.
13020         
13021         For example, if you have
13022         
13023         {
13024                 int i = 0;
13025                 
13026                 // Tons of code that does not affect i
13027                 
13028                 i = foo ();
13029                 ...
13030         }
13031         
13032         i = 0 is dead code and will be removed by SSA. However, when
13033         linear scan gets to the code, i will still appear to be live
13034         throughout the entire block. This prevents good register allocation.
13035
13036 2004-07-06  Martin Baulig  <martin@ximian.com>
13037
13038         * debug-mini.c (mono_debug_init_method): Allow
13039         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13040         (mono_debug_add_icall_wrapper): New method.
13041
13042         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13043
13044 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13045
13046         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13047         optimization.
13048
13049 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * aot.c (mono_aot_load_method): Fix loading of debug info.
13052
13053 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13054
13055         * aot.c: Add logging support.
13056
13057 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13058
13059         * mini.h: Add prototype for mono_print_method_from_ip.
13060
13061         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13062
13063         * inssel.brg: 64 bit fixes.
13064
13065         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13066         inssel-long32.brg.
13067
13068         * Makefile.am: Add SPARC64 support.
13069
13070 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13071
13072         * aot.c: Fix alignment problems on 32 bit platforms.
13073
13074 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13075
13076         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13077         SPARC64.
13078
13079         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13080         problems.
13081
13082         * mini.h: Bump AOT file version. Some 64 bit fixes.
13083
13084 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13085
13086         * inssel-sparc.brg: Add new rule to avoid register moves.
13087
13088         * inssel.brg: Add ldind_to_load_membase helper function.
13089
13090 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13091
13092         * mini.c: OffsetToStringData intrinsic.
13093         
13094 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13095
13096         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13097
13098         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13099         regression tests.
13100
13101         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13102 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13103
13104         * mini.c: reinstated mono_compile_get_interface_var()
13105         on x86, too, since the change breaks the Gtk# build there as well.
13106
13107 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13108
13109         * driver.c: remove loop from the default optimizations: it seems to
13110         interact badly with some of the other options (see bug #60613).
13111
13112 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13113
13114         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13115         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13116
13117 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13118
13119         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13120         vararg-using methods.
13121
13122 2004-06-21  Martin Baulig  <martin@ximian.com>
13123
13124         * mini/mini-exceptions.c
13125         (mono_handle_exception): Added `gpointer original_ip' argument.
13126         After calling mono_unhandled_exception(), call
13127         mono_debugger_unhandled_exception() and if that returns true,
13128         restore the context and return.
13129
13130 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13131
13132         * mini-ppc.c: prefer the use of relative branches so
13133         they won't need to be patched in aot code (patch from Patrick Beard).
13134
13135 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13136
13137         * aot.c: patch from Patrick Beard to make the output assembly
13138         more correct for the MacOSX assembler. Small tweak to
13139         generate sane images on Linux/PPC, too.
13140
13141 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13142
13143         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13144         case until bug #59509 is fixed (shows up in #60332).
13145
13146 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13147
13148         * mini.c: make sure the needed wrappers are compiled, too, with
13149         precomp.
13150
13151 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13152
13153         * driver.c: remove NPTL reference in --version output.
13154
13155 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13156
13157         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13158         generate valid assembly for the Mach-O assembler.
13159
13160 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13161
13162         * driver.c: don't include abcrem in the all optimization specifier
13163         since it slows down jit compilation too much for now.
13164
13165 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13166
13167         * mini.c: use BIGMUL only if both operands have the same signage.
13168         * iltests.il: Test for bug 60056. (errors related to signage in
13169         BIGMUL).
13170
13171         r=lupus.
13172
13173 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13174
13175         * mini.c, aot.c: memory leak fixes.
13176
13177 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13178
13179         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13180
13181 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13182
13183         * Makefile.am: remove the -static hack completely, it links in
13184         statically glib as well.
13185
13186 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13187
13188         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13189         * exceptions.cs: make it compile with new mcs/csc.
13190
13191 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13192         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13193         and added relevant test case.
13194
13195 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13196
13197         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13198         regressions in gtk-sharp.
13199
13200 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13201
13202         * exceptions.cs: New regression tests.
13203
13204         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13205
13206 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13207
13208         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13209
13210 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13211
13212         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13213
13214         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13215
13216 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13217
13218         * mini.c (mono_jit_runtime_invoke): Init class in this
13219         method instead of trusting mono_jit_compile_method to
13220         do the work (because wrappers can be in object class)
13221
13222 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13223
13224         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13225
13226         * basic-long.cs: New regression test.
13227
13228 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13229
13230         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13231         and div/rem checks.
13232
13233 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13234
13235         * Makefile.am: fix miguel's change to build mono statically against
13236         libmono (track build dependencies).
13237
13238 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13239
13240         * cfold.c: Some glib versions do not have G_MININT32.
13241
13242 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13243
13244         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13245         with precision of tan, atan, sin and cos, and implemented related
13246         regressions tests (fixes bug 54467, but one new problem appeared and
13247         is not fixed yet).
13248
13249 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13250
13251         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13252
13253         * exceptions.cs: Add test for constant folding && division by zero.
13254
13255         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13256         since driver.c is in libmono too, so the optimization was useless.
13257
13258         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13259         variable to driver.c so the compiler can emit more efficient code to
13260         access them.
13261
13262 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13263
13264         * Makefile.am: don't distribute generated inssel.[ch] files.
13265
13266 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13267
13268         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13269         into the default appdomain. Fixes #58707.
13270
13271         * jit-icalls.c: Remove the broken approximation for truncl, doing
13272         no conversion is better.
13273
13274         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13275         Fixes #58863.
13276
13277 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13278
13279         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13280         of the mcrxr instruction which is not available on some processors
13281         even if it's documented to be. Implement add and sub overflow correctly
13282         (still not complete for long unsigned). Speed up icalls a bit.
13283
13284 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13285
13286         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13287         we run .cctor in the current domain instead of target_domain.
13288         
13289         Fixes bug #58558, .cctor not being called in -O=shared.
13290
13291 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13292
13293         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13294
13295 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13296
13297         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13298         which can be done with an imm8, do it that way.
13299         (mono_arch_output_basic_block): ditto for a jmp
13300         (mono_arch_emit_prolog): Computate maximum offset of a label.
13301
13302 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13303
13304         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13305         now tries to allocate prefered physical reg's for virtual
13306         regs. This reduces the number of emited spills/loads with
13307         20-30% on our core assemblies.
13308
13309 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13310
13311         * jit-icalls.c: truncl() is not needed and trunc() is
13312         the correct thing to do anyway (bug #58287).
13313
13314 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13315
13316         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13317         if available.
13318
13319 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13320
13321         * driver.c: enable loop optimizations by default.
13322
13323 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13324
13325         * mini-x86.c: fix calc of max loop size when aligning loops start.
13326
13327 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13328
13329         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13330         the stack.
13331
13332 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13333
13334         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13335         should set carry.
13336
13337         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13338
13339         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13340         
13341         * mini.c (inline_method): Allways inline some wrappers even if the cost
13342         is too large. Fixes #58785.
13343
13344         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13345         
13346 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13349         (crichton@gimp.org). Beginning of support for sparc/linux.
13350
13351         * mini-sparc.c: Optimize retrieval of LMF address.
13352
13353 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13354
13355         * exceptions-ppc.c:  handle alloca in methods with clauses.
13356
13357 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13358
13359         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13360
13361 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13362
13363         * mini.c: Delegate most of the abort signal work to 
13364           mono_thread_request_interruption, which also handles Stop and Suspend
13365           states.
13366
13367 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13368
13369         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13370         supports the save/restore lmf opcodes.
13371
13372 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13373
13374         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13375         by gcc-3.4 as well.
13376
13377         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13378
13379 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13380
13381         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13382         methods which contain array accesses.
13383
13384         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13385         boundaries. Fixes #58537.
13386
13387         * iltests.il: Add regression test for #58537.
13388
13389 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13390
13391         * mini-x86.c (mono_arch_local_regalloc): Last part of
13392         fix for bug #58633 (releasing register to early).
13393
13394 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13395
13396         * basic-long.cs: Add new regression test.
13397
13398 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13399
13400         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13401         register too early on the chain.
13402
13403 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13404
13405         * mini.c (create_helper_signature): Use a helper function to reduce
13406         the code which needs to be written. Also set the calling convention of
13407         icalls on windows. Fixes #57840.
13408
13409 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13410
13411         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13412         exceptions-ppc.c: added helper function to get the instruction address
13413         from a signal handler context.
13414
13415 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13416
13417         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13418         from gonzalo.
13419
13420 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13421
13422         * helpers.c: Add new env variable to pass args to objdump.
13423         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13424
13425 2004-05-17  Radek Doulik  <rodo@ximian.com>
13426
13427         * Makefile.am (common_sources): added abcremoval.h so it get
13428         disted and daily mono packages on go-mono.com will build again
13429
13430 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13431
13432         * abcremoval.c: Fixed coding style, added copyright header.
13433
13434         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13435
13436         * mini.h: Added prototype for abc removal main function.
13437
13438         * build_relations_propagation_table.pl: Added copyright header.
13439
13440 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13441
13442         * basic-long.cs: reg test for complex ceq_long bug.
13443
13444 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13445
13446         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13447         reg in long and clob case (bug #58343). Fixed/added comments.
13448
13449 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13450
13451         * mini.c (mono_jit_runtime_invoke): Follow new convention
13452         of calling the invoke method with an function pointer.
13453
13454 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13455
13456         * ChangeLog: Fix author of memory leak patch.
13457
13458 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13459
13460         * Makefile.am: fix make dist as well...
13461
13462
13463 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13464
13465         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13466         on archs where pointers are 4 bytes long.
13467
13468         * Makefile.am: Added abcremoval.c source file.
13469
13470         * abcremoval.c: Added abcremoval.c.
13471
13472         * abcremoval.h: Added abcremoval.h.
13473
13474         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13475
13476         * inssel.brg: Enabled bounds check removal.
13477
13478         * mini.c: Added support for abcrem optimization.
13479
13480         * mini.h: Added abcrem optimization label.
13481
13482         * driver.c: Added support for abcrem optimization.
13483
13484         * propagated_relations_table.def: Added propagated_relations_table.def.
13485
13486 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13487
13488         * mini.c, cfold.c: fix style.
13489
13490 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13491
13492         * mini.c: handle issue with the low-level implementation of
13493         some long opcodes (bug #54209).
13494
13495 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13496
13497         * basic.cs: test for my new cmov stuff.
13498
13499 2004-05-13      Patrik Torstensson
13500
13501         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13502         opt and added peephole documentation.
13503
13504 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13505
13506         * tramp-ppc.c: rewrote the generic trampoline code.
13507
13508 2004-05-11      Patrik Torstensson
13509
13510         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13511
13512 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13513
13514         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13515
13516         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13517         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13518
13519         * mini.c: Add new icalls for AsAny marshalling.
13520
13521 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13522
13523         * tramp-ppc.c, mini-ppc.c: more cleanups.
13524
13525 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13526
13527         * mini.c: no warnings.
13528
13529 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13530
13531         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13532
13533 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13534
13535         * mini.c: In the thread abort signal handler, if the thread is in the
13536         process of being stoped, don't throw the Abort exception, just stop the
13537         thread.
13538
13539 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13540
13541         * tramp-ppc.c: removed old code.
13542
13543 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13544
13545         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13546         do some simple speed optimizations on ppc.
13547
13548 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13549
13550         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13551         and large offsets in load/store.
13552
13553 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13554
13555         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13556         it causes regressions.
13557
13558 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13559
13560         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13561         support.
13562
13563 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13564
13565         * jit-icalls.c: remove warnings.
13566         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13567         speedups for unsafe code.
13568
13569 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13570
13571         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13572
13573 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13574
13575         * basic-calls.cs: Add new regression test.
13576
13577         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13578         more portable.
13579
13580         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13581
13582         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13583         is no longer used.
13584
13585 2004-05-06      Patrik Torstensson
13586
13587         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13588         long reg allocation in any reg (not only eax:edx) and implemented 
13589         long shl/shr ops in asm instead of helpers.
13590
13591 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13592
13593         * mini-sparc.h: Fix warnings.
13594
13595         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13596         stack.
13597
13598         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13599         separate statement for clarity.
13600
13601         * mini-sparc.c: Update status.
13602
13603 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13604
13605         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13606         here.
13607
13608 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13609
13610         * inssel-ppc.brg: another small pre-release workaround:
13611         we don't do overflow detection for long_sub_un.
13612
13613 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13614
13615         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13616         (also works around a weird ppc bug: 57957).
13617
13618 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13619
13620         * tramp-ppc.c: trampoline fixes.
13621
13622 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13623
13624         * mini-ppc.c: fixed typos.
13625
13626 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13627
13628         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13629         at the top of the stack. Fixed typos. Use a frame registers
13630         for all the methods with exception clauses.
13631
13632 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13633
13634         * exceptions-ppc.c: restore fp registers.
13635
13636 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13637
13638         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13639         order from the stack top (moved the stack room to save the
13640         return value for trace after the param area). Fixed corruption
13641         in restoring registers on unwind.
13642
13643 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13644
13645         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13646
13647 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13648
13649         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13650         and prolog/epilog for methods that use it. Allow
13651         enough param area room for varargs methods. Fix miguel's
13652         breakage in exception handling.
13653
13654 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13655
13656         * Makefile.am: run genmdesc only on current arch.
13657
13658 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13659
13660         * exceptions-x86.c:
13661         * mini-x86.h: fix the build on windows.
13662
13663 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13664
13665         * 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.
13666
13667         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13668
13669         * mini-exceptions.c: New file.
13670         
13671         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13672         Move some parts of the x86 exception handling code to an 
13673         arch-independent file so it can be shared with other ports.
13674
13675 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13676
13677         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13678
13679 2004-04-26  David Waite  <mass@akuma.org>
13680
13681         * driver.c: remove comma from end of enumeration declaration
13682
13683 2004-04-26  Jackson Harper  <jackson@ximian.com>
13684
13685         * driver.c: parse config file before loading first assembly. This
13686         allows the user gac to be enabled/disabled. 
13687         
13688 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13689
13690         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13691         simpler mechanism: we do not care what is encoded initially
13692         (branch absolute or relative), we care about the code and its
13693         target.  I kept the old code for reference for now.
13694
13695         The new code tries first to determine if the jump is anywhere in
13696         the -/+32 absolute meg range, if it succeeds, it encodes using the
13697         absolute branch;  If not, it tried to find something in the
13698         relative range, if not, it uses the handle_thunk code. 
13699
13700 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13701
13702         * exceptions-ppc.c: use the correct ip register on macosx.
13703
13704 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13705
13706         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13707
13708 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13709
13710         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13711         Raise exception on integer divide by zero by hand since the hw
13712         doesn't support it. Handle NaNs in FP compares.
13713
13714 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13715
13716         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13717         code reducing duplication between the platforms and enabled
13718         signal exception handling (on linux for now).
13719
13720 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13721
13722         * exceptions-ppc.c: more macosx support.
13723
13724 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13725
13726         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13727
13728 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13729
13730         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13731
13732 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13733
13734         * iltests.il: more tests.
13735
13736 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13737
13738         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13739         vars as well.
13740
13741 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13742
13743         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13744
13745 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13746
13747         * liveness.c: Mark variables as volatile in all basic blocks reachable
13748         from exception clauses.
13749
13750 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13751
13752         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13753         inlining.
13754
13755 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13756
13757         * iltests.il, basic.cs: more tests for regalloc.
13758
13759 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13760
13761         * iltests.il: Some tests for register allocation modifications
13762         I have locally.
13763
13764 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13765
13766         * exceptions.cs: Add regression test for bug #56782.
13767
13768         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13769         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13770         the beauty of fixing the same thing in 5 different files...
13771
13772 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13773
13774         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13775         methods.
13776
13777 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13778
13779         * mini.c: Add support for STRWLPARRAY marshalling convention.
13780
13781 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13782
13783         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13784         to init the context to setup the regs pointer).
13785
13786 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13787
13788         * exceptions-ppc.c: more exceptions work.
13789
13790 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13791
13792         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13793         not allowed.
13794
13795 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13796
13797         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13798         can use the memory directly.
13799
13800         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13801
13802         add x86_add_membase, x86_sub_membase, x86_mul_membase
13803
13804 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13805
13806         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13807         GENERAL_REGS they were also hardcoded for all PPC ports.
13808
13809         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13810
13811         Remove hard-coded limit for floating point registers, use
13812         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13813
13814         Notice that in MacOS X calling conventions you can fit a lot more
13815         floating point values in registers, so I should update the PInvoke
13816         test to excercise the passing of floating point values on the
13817         stack (currently broken).
13818         
13819 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13820
13821         * tramp-ppc.c (create_trampoline_code): Added
13822         JUMP_TRAMPOLINE_SIZE. 
13823         (ppc_magic_trampoline): Follow the pattern from
13824         x86_magic_trampoline: if code is set to zero, return. 
13825         (create_trampoline_code): Always pass MonoMethod to the jump
13826         trampoline, before it was passing a null.
13827         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13828         share the code with mono_arch_create_jit_trampoline. 
13829
13830         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13831         implemented.
13832         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13833         implemented.  
13834
13835         * cpu-g4.md: Added length for jmp instruction, the worst case
13836         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13837         for save_lmf).
13838
13839 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13840
13841         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13842
13843 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13846         before each IL instruction.
13847
13848         * mini.c (CEE_BOX): Fix warnings.
13849
13850 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13851
13852         * mini.c: removed a few unused vars and extra whitespace.
13853
13854 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13855
13856         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13857         checks.
13858         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13859         index.
13860         (OP_GETCHR): use the above
13861         (CEE_LDELEMA): use the above.
13862
13863         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13864         version of the generic impl.
13865         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13866         (CEE_LDELEMA): use the above.
13867
13868 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13869
13870         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13871         Fixes #56317.
13872
13873         * iltests.il: Added new regression test for #56317.
13874
13875 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13876
13877         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13878         under NetBSD. Fixes #56450.
13879
13880         * liveness.c (update_gen_kill_set): Fix previous patch.
13881
13882 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13883
13884         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13885
13886 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13887
13888         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13889         ldsfld and ldsflda.
13890
13891         * inssel-sparc.brg: Add more optimizations.
13892
13893         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13894
13895 2004-04-01  Martin Baulig  <martin@ximian.com>
13896
13897         * mini.c (handle_box): New static function; moved the
13898         implementation of CEE_BOX here.
13899         (mono_method_to_ir): Added `constrained_call' variable.
13900         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13901         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13902         mono_method_get_constrained() to get the method.
13903
13904 2004-04-01  Martin Baulig  <martin@ximian.com>
13905
13906         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13907         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13908         (mono_method_to_ir): We don't need these macros anymore since
13909         mono_class_get_full() already takes care of it. 
13910
13911 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13912
13913         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13914         use @function (as doesn't accept #function here) and check the return
13915         value of system and stop if fails.
13916
13917 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13918
13919         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13920
13921 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13922
13923         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13924
13925         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13926
13927         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13928         #56223.
13929
13930         * basic-long.cs: Add test for negation of Int64.MinValue.
13931
13932 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13933
13934         * mini-sparc.c: Update status.
13935
13936         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13937
13938         * exceptions-sparc.c: Fix return value in filters.
13939
13940         * inssel-sparc.brg: Fix register allocation in some rules.
13941
13942 2004-03-28  Martin Baulig  <martin@ximian.com>
13943
13944         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13945         if neccessary.  
13946
13947 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13948
13949         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13950         
13951         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13952         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13953         remove unused conv_u4 opcode.
13954
13955         * mini-x86.c: Remove valgrind workaround since it slows down things
13956         even when mono is not run under valgrind.
13957
13958 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13959
13960         * mini-sparc.c: Update status.
13961
13962         * inssel-sparc.brg: Add some optimizations.
13963
13964         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13965         future delay slot filling. Add support for varargs, tail calls and JMP.
13966
13967         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13968         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13969
13970         * inssel.brg: Fix register allocation in OP_ARGLIST.
13971
13972         * inssel.brg: Fix warnings.
13973
13974 2004-03-25  Martin Baulig  <martin@ximian.com>
13975
13976         * mini.c (inflate_generic_field): Removed.
13977         (mini_get_method): Removed, use mono_get_method_full(),
13978         (mini_get_class): Removed, use mono_class_get_full().
13979         (mono_method_to_ir): Pass our generic context to
13980         mono_field_from_token().        
13981
13982 2004-03-25  Martin Baulig  <martin@ximian.com>
13983
13984         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13985         of a `MonoMethod *'.
13986         (mini_get_method): Take a `MonoGenericContext *' instead
13987         of a `MonoMethod *'.
13988         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13989         a new local variable called `generic_context' which holds the
13990         current `MonoGenericContext *'; use it to lookup things.
13991
13992 2004-03-24  Martin Baulig  <martin@ximian.com>
13993
13994         * mini.c (mini_get_class): New static method; if we're inside a
13995         generic instance, inflate the class if neccessary.
13996         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13997
13998 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13999
14000         * iltests.il: New regression test for #55976.
14001
14002         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14003         #55976.
14004
14005 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14006
14007         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14008         output.
14009
14010 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14011
14012         * liveness.c: Consider SSA stores as well as loads when making vars
14013         volatile.
14014
14015         * exceptions.cs: New regression tests for register allocation.
14016         
14017 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14018
14019         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14020         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14021           domain lock only to protect puntual access to data structures.
14022           Added access lock for sighash, jit_icall_hash_name, 
14023           jit_icall_hash_addr and domain->code_mp.
14024
14025 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14026
14027         * driver.c: Print SIGSEGV handling method.
14028
14029         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14030
14031         * mini.c (setup_jit_tls_data): Handle case when this is called
14032         multiple times for a thread.
14033
14034         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14035         is different from fbxx_un. Fixes #54303. Also use constants instead of
14036         magic numbers in a lot of places.
14037
14038 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14039
14040         * exceptions.cs: Fix cctor test when --regression is used.
14041
14042 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14043
14044         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14045         for Linux/ppc.
14046
14047 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14048
14049         * inssel-ppc.brg: fixed register assignments for some rules.
14050
14051 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14052
14053         * exceptions.cs: Add test for exceptions in static constructors.
14054
14055         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14056         static constructors outside the domain lock. Fixes #55720.
14057
14058 2004-03-17  Martin Baulig  <martin@ximian.com>
14059
14060         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14061         (inflate_generic_field): Take the `MonoMethod *' instead of the
14062         `MonoClass *' and added support for generic method.
14063         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14064         have a `field->parent->gen_params', only inflate the field if it's
14065         an open constructed type.
14066
14067 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14068
14069         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14070         exception object instead of the preconstructed ones.
14071
14072 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14073
14074         * mini.c: reverted changed to sigsegv_signal_handler commited
14075         accidentally in the previous patch.
14076
14077 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14078
14079         * mini.c:
14080         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14081         running --aot with an old assembly.
14082
14083 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14084
14085         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14086         point values.
14087
14088         * mini-sparc.c: Add support for v9 branches with prediction.
14089
14090 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14091
14092         * mini.c (mini_init): #warning is GNUC only
14093
14094         * mini-sparc.h: implement __builtin_frame_address
14095         and __builtin_return_address for Sun C compiler
14096
14097 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14098
14099         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14100
14101 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14102
14103         * basic-calls.cs: Add test for unaligned byref long argument passing.
14104
14105         * mini-ops.h: Add sparcv9 compare and branch instructions.
14106
14107         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14108         v9 instructions if we have a v9 cpu.
14109
14110         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14111         registers for global allocation.
14112
14113         * exceptions-sparc.c: Fixes.
14114         
14115 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14116
14117         * liveness.c (mono_analyze_liveness): Optimized version.
14118
14119         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14120
14121         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14122         sparc work.
14123
14124         * basic-float.cs basic-calls.cs: New regression tests.
14125
14126 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14129         sigaltstack implementation.
14130
14131         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14132         
14133         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14134         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14135
14136 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14137
14138         * mini.c: Fix warnings.
14139         
14140         * mini.c (mono_resolve_patch_target): New function which contains the
14141         arch independent part of the patching process.
14142
14143         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14144         patching code to a separate function.
14145
14146 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14147
14148         * mini.c (add_signal_handler): ifdef out on Windows
14149
14150 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14151
14152         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14153         cpu-sparc.md: Add exception handling support + other fixes.
14154
14155         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14156         typed GC detection in --version.
14157
14158         * basic.cs exceptions.cs: New regression tests.
14159
14160         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14161         the arch specific code can store data during a compilation.
14162
14163         * mini-ops.h: Add OP_SETFRET.
14164
14165         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14166         function, register a separate icall for each arity, so the icalls can
14167         get a wrapper.
14168         
14169         * mini.c (mono_print_tree): Print negative offsets in a more readable
14170         form.
14171         
14172         * mini.c: Make signal handling work on sparc.
14173         
14174         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14175
14176         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14177
14178         * jit-icalls.c: Emulate truncl by aintl on solaris.
14179
14180         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14181
14182 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14183
14184         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14185
14186 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14187
14188         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14189         a MarshalByRef type, inline a method that performs the check, taking into
14190         account that the object can be a proxy. Also implemented tow new opcodes:
14191         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14192         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14193         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14194
14195 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14196
14197         * mini-ppc.c: if a relative branch displacement is too big
14198         but it points to and area reachable with an absolute branch, 
14199         avoid the thunks.
14200
14201 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14202
14203         * mini.c: optimize small copies in cpblk.
14204
14205 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14206
14207         * basic-calls.cs basic-float.cs: New regression tests.
14208
14209         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14210         negative offsets from %fp. Implement localloc. Fix local register 
14211         allocation. Fix the case when the this argument needs to be saved to
14212         the stack. Implement some missing opcodes.
14213
14214 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14215
14216         * mini.c (mini_method_compile): Reenable global regalloc in methods
14217         with exception handlers.
14218
14219         * linear-scan.c (mono_varlist_sort): Fix warning.
14220
14221         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14222
14223         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14224         regalloc costs.
14225
14226         * liveness.c: Make all variables uses in exception clauses volatile, to
14227         prevent them from being allocated to registers. Fixes #42136.
14228
14229 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14230
14231         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14232         causes regressions.
14233
14234         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14235         argument to mono_arch_regalloc_cost.
14236
14237         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14238         precisely.
14239
14240 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14241
14242         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14243         Make the cost of allocating a variable to a register arch dependent.
14244
14245         * basic-calls.cs: Fix compilation of tests.
14246         
14247         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14248         helper function to cut back on the number of #ifdefs needed.
14249
14250         * mini-ppc.c: Fix compilation.
14251
14252         * basic-calls.cs: New regression tests.
14253
14254         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14255
14256         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14257         of l0 since that is callee saved.
14258
14259         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14260         to virtual calls.
14261
14262         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14263         of delay instruction.
14264
14265         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14266
14267         * mini.h (MonoCallInst): Add 'virtual' flag.
14268
14269         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14270
14271 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14272
14273         * *.cs: New regression tests.
14274
14275         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14276         work.
14277
14278         * mini.c (mono_runtime_install_handlers): Fix build.
14279
14280         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14281         'signal_stack_size' members.
14282
14283         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14284         alternate signal stack.
14285
14286         * exceptions-x86.c: Add stack overflow handling.
14287
14288         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14289         functions to arch independent code.
14290
14291         * mini.c (mono_print_tree): Print more detailed info for load_membase
14292         opcodes.
14293         
14294 2004-02-23  Martin Baulig  <martin@ximian.com>
14295
14296         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14297
14298 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14299
14300         * mini-x86.c: fixed reg allocation for div/rem.
14301
14302 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14303
14304         * driver.c (mono_main): Report some configuratio options on --version.
14305
14306 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14307
14308         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14309         low in the address space. Correctly flush memory in thunks where we
14310         output native code.
14311
14312 2004-02-20  Martin Baulig  <martin@ximian.com>
14313
14314         * mini.c (mini_get_method): New static method; inflate all generic
14315         methods and methods in open generic instances.
14316         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14317         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14318
14319 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14320
14321         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14322
14323         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14324
14325 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14326
14327         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14328
14329         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14330         it compile using Sun's compiler.
14331
14332 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14333
14334         * 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.
14335
14336         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14337
14338 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14339
14340         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14341         code.
14342         * mini-ppc.c: handle calls outside of the allowed range with thunks
14343         allocated using the code manager.
14344         * tramp-ppc.c: use the code manager to hold generated native code.
14345         Fixed the magic trampoline to just patch vtable entries.
14346
14347 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14348
14349         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14350         independent file.
14351
14352 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14353
14354         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14355         PPC.
14356
14357         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14358         if we have a working __thread implementation.
14359
14360         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14361         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14362
14363 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14364
14365         * mini-x86.c: Fix compilation under gcc 2.
14366         
14367 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14368
14369         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14370         contains a call to the wrapped function.
14371
14372         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14373         OP_<CALL>_IMM opcodes, and use them under X86.
14374         
14375         * mini.c (mono_jit_find_compiled_method): Fix warning.
14376
14377         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14378
14379         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14380
14381         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14382         functionality to mini.c.
14383
14384         * mini.c (mono_create_jump_trampoline): New function to create a jump
14385         trampoline. Return a compiled method instead of a trampoline if it
14386         exists. Add a cache for jump trampolines.
14387
14388         * mini.c (mono_jit_find_compiled_method): New function to return a
14389         compiled method if it exists.
14390
14391         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14392         mono_arch_create_jit_trampoline.
14393
14394         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14395         a jump trampoline. Fixes #52092.
14396         
14397 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14398
14399         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14400         which is not up-to-date. Add check_corlib_version () instead.
14401
14402         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14403         have to call it.
14404         
14405         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14406         since newer valgrind versions do not need it.
14407
14408         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14409         compile a method with a given set of optimizations.
14410
14411         * mini.c: Compile icall wrappers on-demand instead of at startup.
14412
14413         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14414         wrapper for an icall.
14415
14416 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14417
14418         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14419         #54063.
14420
14421         * iltests.il: Add test for non-empty stack before switch instruction.
14422
14423 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14424
14425         * mini.c: Add support for new stringbuilder marshalling conventions.
14426
14427         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14428
14429 2004-02-01  Martin Baulig  <martin@ximian.com>
14430
14431         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14432         in `ginst->mtype_argv'.
14433
14434 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14435
14436         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14437         facilitate grepping.
14438
14439 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14440
14441         * mini.c: fixed buglet in initobj generic implementation for references.
14442
14443 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14444
14445         * Makefile.am: make the version script conditional.
14446         * jit-icalls.c: handle missing truncl().
14447
14448 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14449
14450         * exceptions.cs: Add more tests for double->int conversion.
14451
14452         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14453         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14454
14455 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14456
14457         * driver.c: make --verbose --version emit an error
14458         if the loaded corlib doesn't match the runtime version.
14459
14460 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14461
14462         * mini-ppc.h: export ppc_patch().
14463         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14464         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14465         on par or better than on MacOSX.
14466
14467 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14470         mono_lookup_pinvoke_call.
14471
14472         * mini-x86.c: Under windows, the default pinvoke calling convention is
14473         stdcall. Fixes #52834.
14474
14475         * mini.c (optimize_branches): Add an upper bound to the number of
14476         iterations to prevent infinite loops on strange loops. Fixes #53003.
14477
14478 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14479
14480         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14481         and ISINST. Fixes #52093.
14482
14483         * objects.cs (test_0_vector_array_cast): New tests.
14484         
14485 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14486
14487         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14488         checking in Array.Set ().
14489
14490         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14491         #52590.
14492
14493         * object.cs (test_0_multi_array_cast): New regression test.
14494
14495 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14496
14497         * exceptions-ppc.c: fix build on Linux/PPC.
14498
14499 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14500
14501         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14502         running under valgrind.
14503         (x86_magic_trampoline): Fix build bustage.
14504
14505         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14506         negative values as well. This is needed for the encoding of the line number
14507         info, since sometimes the line numbers are not in increasing order.
14508
14509 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14510
14511         * cpu-pentium.md (localloc): Increase the size of the localloc 
14512         instruction since it is a loop under Win32.
14513
14514         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14515         allocation.
14516
14517 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14518
14519         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14520         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14521         Max Horn (max@quendi.de). Fix file names in comments.
14522
14523 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14524
14525         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14526         avoid stack overflow.
14527         (replace_usage): Avoid uninitialized variable warnings.
14528
14529         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14530         and taking the address of valuetype variables.
14531
14532 2004-01-03  Patrik Torstensson
14533
14534         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14535         for other purposes than FP later on.
14536
14537 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14538
14539         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14540         of tail calls.
14541
14542 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14543
14544         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14545
14546 2003-12-30  Patrik Torstensson <p@rxc.se>
14547
14548         * mini-x86.h: Decreased number of availiable fp regs.
14549         Solves corner cases with FP spilling.
14550
14551 2003-12-23  Patrik Torstensson <p@rxc.se>
14552
14553         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14554         for floating point stack tracking / spilling on x86. 
14555         Fixes bug #49012.
14556         
14557         * basic-float.cs: added float mul overflow test.
14558
14559 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14560
14561         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14562
14563 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14564
14565         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14566         supports for cond branches that overflow the immediate
14567         overflow offset. mcs can compile simple programs.
14568
14569 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14570
14571         * exceptions-ppc.c: exception handling support wip:
14572         finally handlers get run on exception.
14573
14574 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14575
14576         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14577         profiling.
14578
14579 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14580
14581         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14582         initial support for stack walking and unwinding.
14583
14584 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14585
14586         * driver.c (mono_main): Make corlib-out-of-sync message more 
14587         descriptive. Also remove verify_corlib call.
14588
14589 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14590
14591         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14592         not overlap with other call's arguments, too.
14593
14594 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14595
14596         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14597         move to arch-specific code the choice of arch-specific
14598         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14599         * mini.c: ensure emulation calls will not interleave
14600         with other calls.
14601
14602 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14603
14604         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14605         the magic trampoline stack frame is dropped before executing
14606         the new method.
14607
14608 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14609
14610         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14611         and integer to fp conversions. Added support for overflowing
14612         arguments on the stack. Reserve a couple more registers as temps.
14613         Added support for aot compilation (as output still needs to be
14614         tweaked, though).
14615
14616 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14617
14618         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14619         Don't overwrite return register in some corner cases.
14620
14621 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14622
14623         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14624         static constructors when AOT compiling.
14625
14626         * driver.c (mono_main): Call mono_check_corlib_version.
14627
14628 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14629
14630         * cpu-g4.md, basic.cs: fixed div target register.
14631
14632 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14633
14634         * mini-ppc.c, basic.cs: shl_imm fix with test.
14635
14636 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14637
14638         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14639         structures by value. Misc fixes.
14640         * objects.cs: more tests.
14641
14642 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14643
14644         * mini-ppc.c: lconv.ovf.i implemented.
14645
14646 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14647
14648         * mini.c:
14649         (mini_init): don't error out if someone already called g_thread_init.
14650
14651 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14652
14653         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14654         to be any type per the spec. Fix abnormal memory usage when
14655         the same object is repeatedly thrown.
14656
14657 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14658
14659         * mini.c: check for overruns in IL code.
14660
14661 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * TODO: Add/remove some todo entries.
14664
14665 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14666
14667         * driver.c (mono_main): Call mono_verify_corlib.
14668
14669 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14670
14671         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14672         This has been moved to mini.c
14673         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14674         type being casted is marshalbyref it could be a proxy, so instead of
14675         emitting the type check code, emit a call to a runtime method that will
14676         perform the check by calling CanCastTo if needed.
14677
14678 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14679
14680         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14681         methods with large stack frames under Win32.
14682
14683 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14684
14685         * Makefile.am: Distribute regression tests.
14686
14687         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14688         at the end instead of inserting each variable into the sorted list.
14689
14690         * linear-scan.c (mono_varlist_sort): New helper function.
14691         
14692 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14693
14694         * mini.c: ensure arguments and locals are within bounds.
14695
14696 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14697
14698         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14699         related fixes.
14700
14701 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14702
14703         * mini.c (mono_cprop_copy_values): Fix crash.
14704
14705         * aot.c: Set verbosity back to 0.
14706         
14707 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14708
14709         * regalloc.c: complete memory leak fix by Laurent Morichetti
14710         (l_m@pacbell.net).
14711
14712 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14713
14714         * driver.c (main_thread_handler): Revert the previous patch.
14715
14716         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14717         under valgrind.
14718
14719         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14720         memory from the memory pool.
14721
14722         * driver.c (main_thread_handler): Turn on all optimizations when
14723         --aot is used.
14724
14725         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14726         an array for better performance.
14727
14728         * regalloc.c (mono_regstate_assign): Fix memory leak.
14729
14730         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14731         serialize the debug info.
14732
14733         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14734         debug info from the serialized representation.
14735
14736         * aot.c: Save debug info into the generated file and load it when 
14737         loading a method.
14738
14739         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14740
14741 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14742
14743         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14744         More FP-related fixes.
14745
14746 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14747
14748         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14749         and register allocation buglet. Hello world now runs.
14750
14751 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14752
14753         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14754         * tramp-ppc.c: fixed class init trampoline.
14755         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14756
14757 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14758
14759         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14760         mini.c: more ppc changes/fixes.
14761
14762 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14763
14764         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14765         Also optimize the case when the arguments are the same in the caller 
14766         and in the callee.
14767
14768         * iltests.il: Add tests for tail calls with valuetype arguments.
14769
14770 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14771
14772         * mini-ppc.c: fixes for struct return type.
14773
14774 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14775
14776         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14777         mono_spillvar_offset() to arch-specific code.
14778
14779 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14780
14781         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14782
14783 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14784
14785         * exceptions-x86.c: Fix stack space leaks.
14786         
14787         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14788         registers from the lmf if the method has save_lmf set.
14789
14790 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14791
14792         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14793         of icall wrappers into InvokeInDomain, since these are now per-domain.
14794
14795 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14796
14797         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14798         make some opcode emulation and intrinsic ops enabled/disabled 
14799         according to the architecture. More fixes.
14800
14801 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14802
14803         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14804
14805 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14806
14807         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14808         arch-specific handling for 'this' and struct return type to
14809         arch-specific code.
14810
14811 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14812
14813         * aot.c: prevent divide by zero error when reporting (it happened with
14814         Accessibility.dll).
14815
14816 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14817
14818         * mini.h (inst_switch): Remove unused macro.
14819
14820 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14821
14822         * aot.c:
14823         (load_aot_module): free 'info->methods' and 'info' properly. No more
14824         "free(): invalid pointer blah" messages when you have an old aot
14825         compiled assembly.
14826
14827 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14828
14829         * jit-icalls.c, mini.c: Added support for context static fields.
14830
14831 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14832
14833         * mini.c (mono_method_blittable): Methods which set LastError are not 
14834         blittable either. Fixes #51108.
14835         
14836 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14837
14838         * mini.c: flush icache.
14839         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14840
14841 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14842
14843         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14844
14845 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14846
14847         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14848         safe on IA32.
14849
14850         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14851         vararg calls.
14852
14853         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14854
14855 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14856
14857         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14858         instruction when the result is discarded.
14859
14860         * iltests.il (test_0_div_regalloc): New regression test.
14861
14862         * arrays.cs: Fix compilation error.
14863
14864 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14865
14866         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14867         float rules to inssel-x86.brg: sane architectures with FP registers
14868         don't need to implement these rules.
14869
14870 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14871
14872         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14873
14874 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14875
14876         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14877         implementation of 32 bit systems.
14878
14879 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14880
14881         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14882         (Jeroen Zwartepoorte).
14883
14884 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14885
14886         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14887         the caller and the callee matches.
14888         
14889         * mini.c (mono_method_to_ir): Add comment.
14890
14891         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14892         signbit is missing on some platforms.
14893
14894 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14895
14896         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14897
14898         * mini.c (setup_jit_tls_data): Call the new function.
14899         
14900         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14901
14902         * mini-x86.c: Add experimental support for fast access to the lmf
14903         structure under NPTL/Linux 2.6.x.
14904
14905 2003-11-06  Martin Baulig  <martin@ximian.com>
14906
14907         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14908         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14909         the debugger.
14910
14911 2003-11-02  Martin Baulig  <martin@ximian.com>
14912
14913         * mini.c (inflate_generic_field): New static method.
14914         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14915         generic instance and the field is declared in a generic type, call
14916         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14917
14918 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14919
14920         * mini.h mini.c (mono_method_same_domain): New function to return
14921         whenever the caller and the callee are in the same domain.
14922
14923         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14924
14925 2003-10-30  Martin Baulig  <martin@ximian.com>
14926
14927         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14928         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14929         method parameters.
14930         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14931         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14932
14933 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14934
14935         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14936         propagation.
14937
14938         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14939         object here, so it is in the correct appdomain etc.
14940
14941 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14942
14943         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14944         already done.
14945         (mono_method_to_ir): Avoid freeing the type created returned from
14946         mono_type_create_from_typespec, since it is put into an internal cache
14947         by the function. Fixes pointer.exe.
14948
14949         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14950         trampolines for icalls and pinvokes as well. Fixes #33569.
14951
14952 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14953
14954         * mini.c: Update after appdomain changes.
14955
14956         * mini.c (mono_jit_compile_method_inner): Allways compile native
14957         method wrappers in the root domain, since there can only be one
14958         instance of them, whose address is stored in method->info.
14959
14960 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14961
14962         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14963         environment variable. Instead detect automatically whenever running
14964         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14965         valgrind.h.
14966
14967 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14968
14969         * trace.c, trace.h: New files that implement the new trace option
14970         parsing. 
14971
14972         * driver.c: Document new --trace options.
14973
14974         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14975         mini-x86.c: Apply:
14976
14977         -       if (mono_jit_trace_calls)
14978         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14979
14980         * mini.h: prototypes.
14981         
14982 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14983
14984         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14985
14986         * mini.c inssel.brg: Implement typedefbyref opcodes.
14987
14988         * mini.c (mono_jit_compile_method): Remove unused local variable.
14989
14990         * mini.c (mono_jit_compile_method_inner): Ditto.
14991         
14992 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14993
14994         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14995         
14996         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14997
14998 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * mini.c (mono_no_aot): Remove unused global variable.
15001
15002         * mini.c: Thread safety fixes.
15003
15004 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15005
15006         * mini.c (mono_create_class_init_trampoline): Add a lock around
15007         class_init_hash_addr.
15008
15009         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15010         #30073.
15011
15012         * mini.c: Decompose the NEWARR instruction before decomposing its
15013         arguments. Fixes #30073.
15014
15015 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15016
15017         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15018         convention.
15019
15020 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15021
15022         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15023
15024         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15025
15026         * driver.c: Add support for compiling icall wrappers to --compile.
15027
15028 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15029
15030         * inssel.brg: The empty value in class->interface_offsets is -1, not
15031         0. Fixes #49287.
15032
15033 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15034
15035         * objects.cs: New test for 'is' operator on an array of interfaces.
15036
15037 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15038
15039         * tramp-ppc.c: update trampoline code to support jumps
15040         and class initialization.
15041
15042 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15043
15044         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15045
15046         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15047
15048         * inssel.brg (OP_UNBOX): Remove unused rule.
15049
15050         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15051         region instead of one for each method. Fixes #47813.
15052
15053 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15054
15055         * exceptions.cs (test_0_nested_finally): New regression test for
15056         nested exception handlers.
15057
15058         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15059
15060         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15061
15062         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15063         inlining.
15064
15065         * mini.c (mono_method_check_inlining): Make the inlining limit 
15066         configurable by an environment variable.
15067         
15068         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15069
15070         * mini.h: Bump AOT file version.
15071
15072         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15073         token, store the image along with the token, since the token might not 
15074         refer to the same image as the method containing the relocation, 
15075         because of inlining.
15076
15077 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15078
15079         * mini.c (mono_precompile_assemblies): New function to compile
15080         all methods in all loaded assemblies.
15081
15082         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15083
15084         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15085         iassign and fassign to int*, since they can contain large negative
15086         values if the register is spilled. Also added some comments. Fixes
15087         #45817.
15088
15089         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15090         under Win32. Fixes #42964.
15091
15092 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15093
15094         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15095
15096         * aot.c: Added support for AOT compiling methods which contain calls
15097         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15098         handled.
15099         
15100         * driver.c (compile_all_methods): Run the compilation in a thread
15101         managed by mono. Fixes #44023.
15102
15103         * mini.c (mono_codegen): Print full method name in verbose output.
15104
15105         * mini-x86.c (mono_arch_patch_code): Fix warning.
15106         
15107         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15108         jumps, since the method we are jumping to might be domain-specific.
15109
15110         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15111
15112 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15113
15114         * inssel.brg: string chars are unsigned.
15115
15116 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15117
15118         * TODO: New todo item.
15119
15120         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15121         which calls mono_runtime_class_init and patches the call site to
15122         avoid further calls.
15123         (mono_arch_create_class_init_trampoline): New arch specific function 
15124         to create a class init trampoline.
15125         (create_trampoline_code): Generalized so it can create
15126         class init trampolines as well.
15127
15128         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15129         (mono_create_class_init_trampoline): New function to create and cache
15130         class init trampolines.
15131         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15132         vtable given the address of a class init trampoline. Used by the
15133         patching process.
15134         (mono_codegen): Generate a call to a trampoline instead of
15135         mono_runtime_class_init in LDSFLD[A].
15136         (mono_codegen): Add relocations for the new trampoline.
15137         
15138         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15139         MONO_PATCH_INFO_CLASS_INIT.
15140
15141         * mini.h: Bump AOT version number.
15142
15143         * aot.c: Create a copy of the loaded code instead of using the original
15144         so methods which call each other will be close in memory, improving
15145         cache behaviour.
15146         
15147         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15148         patch since it breaks the regression tests.
15149         
15150         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15151         for the register saving instruction sequence since the 
15152         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15153
15154 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15155
15156         * TODO: Fix todo item && remove another.
15157
15158 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15159
15160         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15161         previous checkin.
15162
15163         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15164         function of the module.
15165
15166         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15167         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15168         --no-aot command line option.
15169
15170 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15171
15172         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15173         by Bernie Solomon (bernard@ugsolutions.com).
15174
15175         * inssel.brg: Refactor the interface offset table related code into
15176         its separate functions and add support for the AOT case.
15177
15178 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15179
15180         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15181         
15182         * aot.c: Added mono_aot_verbose variable and made all debugging
15183         output depend on the value of this variable.
15184
15185         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15186         method_label and info_label.
15187
15188         * mini.h mini-x86.c aot.c: Added a new relocation type 
15189         MONO_PATCH_INFO_IID for klass->interface_id.
15190
15191         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15192         the MonoJitInfo structure.
15193
15194         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15195         a non-root appdomain in shared mode.
15196
15197 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15198
15199         * aot.c: make aot loader less verbose. Remove free of unused variable.
15200
15201 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15202
15203         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15204
15205         * .cvsignore: Added *.dll.
15206
15207         * mini.c (mono_print_tree_nl): New function callable while debugging.
15208
15209         * mini.c (mono_print_code): Export this.
15210
15211         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15212         patched code.
15213
15214 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15215
15216         * mini.h (MonoCompile): Added 'jit_info' field.
15217
15218         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15219         the cfg structure, since it is needed by the AOT compiler.
15220
15221         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15222
15223         * aot.c: A major rewrite. Changes include:
15224         - save exception tables for methods which have them.
15225         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15226         to g_module_symbol.
15227         - reworked the file format so it is now much smaller and needs
15228         fewer relocation entries.
15229         
15230 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15231
15232         * aot.c (load_aot_module): Fix build bustage on platforms without
15233         Boehm GC.
15234
15235 2003-09-04  Martin Baulig  <martin@ximian.com>
15236
15237         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15238
15239 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15240
15241         * TODO: Some new optimization ideas.
15242
15243         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15244
15245         * aot.c: Save the optimization flags used to compile the code into
15246         the AOT module.
15247
15248         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15249         support emitting domain specific code.
15250         
15251         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15252         no longer domain neutral. It can be made domain neutral by compiling 
15253         with --optimize=shared.
15254
15255         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15256         between appdomains.
15257
15258         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15259         loading of AOT code.
15260
15261         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15262         
15263         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15264         if there is no domain neutrality information.
15265
15266 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15267
15268         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15269         format version into the generated library.
15270
15271         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15272         callee method into the caller since one of them could be shared.
15273
15274         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15275         system exceptions from AOT code now works.
15276
15277         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15278         method if it is domain neutral and the callee is not.
15279
15280         * graph.c (cfg_emit_one_loop_level): Fix warning.
15281
15282 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15283
15284         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15285         last checkin.
15286
15287 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15288
15289         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15290         is needed  by code which is executed before mono_runtime_init ().
15291         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15292         
15293         * mini.c (mono_thread_abort): Fix warning.
15294         (mono_jit_compile_method): Call static constructor in the AOT case too.
15295
15296         * aot.c (mono_compile_assembly): Fix warning.
15297
15298 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15299
15300         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15301
15302 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15303
15304         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15305
15306         * cpu-pentium.md: Fix the length of call opcodes so they include the
15307         ESP restoring instruction. Fixes #47968.
15308
15309 2003-08-28  Martin Baulig  <martin@ximian.com>
15310
15311         * mini-x86.c (mono_arch_call_opcode): Added support for
15312         MONO_TYPE_GENERICINST.
15313
15314         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15315
15316 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15317
15318         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15319         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15320
15321         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15322         metadata_section.
15323
15324 2003-08-26  Martin Baulig  <martin@ximian.com>
15325
15326         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15327         when reporting an error, set this to the actual error location.
15328         (mono_method_to_ir): Report the correct error location if
15329         get_basic_blocks() returned an error.
15330
15331 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15332
15333         * mini.c (mono_type_blittable): OBJECT is not blittable.
15334         (mono_method_blittable): Methods which have marshalling descriptors
15335         are not blittable either. Fixes #47842.
15336
15337 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15338
15339         * driver.c mini.c: Use an environment variable instead of a global 
15340         variable. Also fix the build.
15341
15342         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15343         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15344         reporting this. 
15345
15346         * driver.c mini.c: Added --with-valgrind option to turn off some
15347         code which prevents mono from running under valgrind.
15348
15349         * mini.c (mono_emit_call_args): Fixed warning.
15350
15351         * mini.c (mono_emulate_opcode): Fixed warning.
15352
15353 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15354
15355         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15356         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15357         regalloc.c, regalloc.h: specify available registers in arch-specific
15358         code and support floats in the regallocator (patch by Laurent Morichetti 
15359         <l_m@pacbell.net>)
15360
15361 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15362
15363         * mini.c: mono_thread_current() can be called only after
15364         mono_runtime_init(): rearrange code to not call it early on.
15365
15366 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15367
15368         * mini.c: allocate jump tables in the code mempools.
15369
15370 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15371
15372         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15373         freed.
15374
15375 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15376
15377         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15378         12 to 16.  This fixes bug #47453.
15379
15380
15381 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15382
15383         * mini-ppc.c: fixed indexed load and unsigned compares.
15384
15385 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15386
15387         * mini.c: reenabled installation of handler for
15388           thread abort signal.
15389
15390 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15391
15392         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15393         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15394         until it's fixed and actually useful.
15395
15396 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15397
15398         * inssel-long32.brg: couple more opcodes implemented.
15399
15400 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15401         
15402         * mini-sparc.c: Even more opcodes implemeted.
15403
15404 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15405
15406         * mini-sparc.c: More opcodes implemented.
15407
15408 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15409
15410         * mini-sparc.c: More opcodes implemented.
15411
15412 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15413
15414         * inssel-sparc.brg: Add some needed rules.  Direct
15415         copy from PPC.
15416         * Makefile.am: Use inssel-sparc.brg
15417         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15418         an assert happy for now.
15419
15420 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15421
15422         * mini-sparc.c: Fixed compile errors.
15423         * exceptions-sparc.c: Same.  We now produce a mono binary 
15424         on sparc-linux.  Yea.
15425
15426 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15427
15428         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15429         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15430         They compile, but do not work.
15431
15432 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15433
15434         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15435         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15436         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15437         (ct@gentoo.org).
15438
15439 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15440
15441         * mini.c: more opcodes implemented and better support for generics.
15442
15443 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15444
15445         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15446         * mini.c, mini.h: first cut at generics support: some new instructions 
15447         added and changed the behaviour of some of the existing ones.
15448
15449 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15450
15451         * mini.c: Removed definition of metadata_shared mutex here.
15452
15453 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15454
15455         * mini-x86.c: make vararg calls work for instance methods.
15456
15457 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15458
15459         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15460         returns the arguments in a separte list, now.
15461
15462 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15463
15464         * aot.c, mini.c: updates for array type representation changes.
15465
15466 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15467
15468         * mini.c: register function to perform jit shutdown.
15469
15470 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15471
15472         * mini.c: use a faster allocator if possible.
15473
15474 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15475
15476         * aot.c: some cleanups and portability changes.
15477
15478 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15479
15480         * mini.c: use faster allocation for CEE_BOX if possible.
15481
15482 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15483
15484         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15485         Moved inlined mempcy code to its own function so that is can be
15486         reused. Added an inline memset function as well (optimized initobj).
15487         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15488
15489 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15490
15491         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15492
15493 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15494
15495         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15496         arch code can setup the cpu for CLR execution, if needed.
15497         We use it on x86 to set the precision of FP operations.
15498
15499 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15500
15501         * mini.c: disable some optimizations if we can guess they'll cost too
15502         much for a given method.
15503
15504 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15505
15506         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15507         
15508 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15509         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15510         info collection support.
15511
15512 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15513
15514         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15515         is now implemented in the profiling API. Get rid of a couple of
15516         unnecessary global variables.
15517
15518 2003-06-15  Nick Drochak <ndrochak@gol.com>
15519
15520         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15521         * cpu-g4.md: add op_bigmul and op_bigmul_un
15522         * cpu_pentium.md: add op_bigmul_un
15523         * inssel-long32.brg: add rule for unsigned bigmul
15524         * mini-ops.h: define OP_BIGMUL_UN
15525         * mini-x86.c: THE BUG: handle (un)signed properly
15526         * mini.c: choose unsigned opcode if needed.
15527         This set of patches fixes bug #44291
15528
15529 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15530
15531         * mini.c (optimize_branches): improved to handle all kinds of
15532         conditional branches.
15533
15534 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15535
15536         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15537         don't raise exceptions.
15538
15539 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15540
15541         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15542         to arch-specific files.
15543
15544 2003-06-09  Martin Baulig  <martin@ximian.com>
15545
15546         * Makefile.am (libs): Added $(LIBGC_LIBS).
15547
15548 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15549
15550         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15551         and OP_ATAN (fixes bug#44293).
15552
15553 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15554
15555         * Makefile.am, mini-x86.c: rename cpu description array to
15556         pentium_desc, since some compilers define the 'pentium' preprocessor
15557         symbol.
15558
15559 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15560
15561         * mini.c (mini_select_instructions): add explicit branch if the
15562         following block is not the false target of a conditional branch -
15563         we need this with any optimization that reorder or remove bblocks
15564
15565         * mini.c (optimize_branches): bug fixes
15566
15567 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15568
15569         * mini.c (mono_method_to_ir): inline static readonly fields
15570
15571         * ssa.c (fold_tree): start cfold support for long (very simple
15572         cases only)
15573
15574         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15575
15576 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15577
15578         * inssel.brg: fixed memcpy (bug #44219).
15579
15580 2003-06-05  Dick Porter  <dick@ximian.com>
15581
15582         * driver.c: Set the glib log levels to not abort if g_message
15583         recurses.
15584
15585         g_set_prgname() has to happen before mini_init() so that the
15586         process handle gets the info.
15587         
15588 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15589
15590         * driver.c: add intrins to the default optimizations to get wider
15591         exposure.
15592
15593 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15594
15595         * mini.h: some large basic blocks will overflow a 16-bit
15596         integers for symbolic registers.
15597
15598 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15599
15600         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15601         (mono_arch_output_basic_block): fix bug 43499 
15602
15603 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15604
15605         * mini.c: kill duplicated definition of mono_debug_format.
15606
15607 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15608
15609         * mini-x86.c, arrays.cs: fixed register allocation bug.
15610
15611 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15612
15613         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15614
15615         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15616
15617 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15618
15619         * mini.c:
15620         (print_method_from_ip): also print source location information if
15621         available.
15622
15623 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15624
15625         * mini.c (mono_find_block_region): bug fix in region code
15626         (mini_method_compile): enable removing unreachable code again, but
15627         only in methods without exception clauses.
15628
15629 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15630
15631         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15632         Implemented arglist opcode and handling of TypedReference type.
15633         Fixed x86 call convention when a structure is returned.
15634         Minimal support for calling static vararg methods.
15635
15636 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15637
15638         * mini.c (mini_method_compile):  always remove unreachable code,
15639         because the code in them may be inconsistent  (access to dead
15640         variables for example).
15641
15642 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15643
15644         * driver.c, debug-mini.c: warning fixes.
15645
15646 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15647
15648         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15649
15650 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15651
15652         * mini.c: thread-static fields are registered in mono_class_vtable(),
15653         so ensure the function is called before checking for them.
15654
15655 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15656
15657         * mini.c (optimize_branches): fix for bug 43586
15658
15659         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15660         overflow (fixes Bug #43639)
15661
15662 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15663
15664         * mini.c, objects.cs: allow the use of stobj for primitive types.
15665
15666 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15667
15668         * mini.c: be less strict about argument checking until we support
15669         running the verifier.
15670
15671 2003-05-27  Nick Drochak <ndrochak@gol.com>
15672
15673         * basic-long.cs: tests for (ulong)int * (ulong)int also
15674         * mini.c: use the same trick for (ulong)int * (ulong)int
15675
15676 2003-05-27  Nick Drochak <ndrochak@gol.com>
15677
15678         * basic-long.cs: add regression test for (long)int * (long)int
15679         * cpu-pentium.md: add op_bigmul specification
15680         * inssel-long32.brg: add OP_BIGMUL rule
15681         * mini-ops.h: add OP_BIGMUL
15682         * mini-x86.c: register allocator: handle case where src1 needs to be
15683         in EAX.
15684         * mini.c: substitute special BIGMUL opcode in the tree for 
15685         (long)int * (long)int
15686
15687 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15688
15689         * jit-icalls.c: call the type ctor on field access if needed.
15690
15691 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15692
15693         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15694         to a method (including results of ldelema, bug#43207).
15695
15696 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15697
15698         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15699         colors to show exception handler blocks.
15700
15701         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15702         (fix for pinvoke7.cs).
15703
15704 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15705
15706         * mini.h, mini.c: ensure correct initialization order for types that
15707         require it. Prepare for lazy compilation of jit icall wrappers.
15708         Provide a name for opcode emulation to reduce unneeded mallocing.
15709
15710 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15711
15712         * mini-x86.c: better register restoring code and profiling
15713         support for tail calls.
15714
15715 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15716
15717         * mini.h, driver.c: prepare for leaf methods optimization.
15718
15719 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15720
15721         * mini.c: get targets of branches before converting a method.
15722
15723 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15724
15725         * mini.c (optimize_branches): added some experimental code (disbaled) 
15726
15727 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15728
15729         * mini.c (optimize_branches): fix branch to branch optimization 
15730
15731         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15732
15733         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15734
15735         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15736
15737         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15738         if needed.
15739
15740 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15741
15742         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15743         enable use of interface variables again.
15744
15745         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15746         I1 to registers because there is no simply way to sign extend 8bit
15747         quantities in caller saved registers on x86.
15748
15749         * inssel-float.brg: set costs of some rules to 2 so
15750         that monobure always select the arch. specific ones if supplied,
15751         regardless of the order we pass the files to monoburg.
15752
15753 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754
15755         * mini.c, mini-x86.c: since the magic trampoline for jumps
15756         can't patch the code directly, we do it as soon as the
15757         method gets compiled.
15758
15759 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15760
15761         * mini-x86.c, mini.h: introduce a new patching method
15762         to support CEE_JMP and tail calls.
15763         * mini.c: obey tail.call. Don't precompile methods target
15764         of CEE_JMP.
15765         * tramp-x86.c: new trampoline code to handle methods
15766         reached through a jump.
15767
15768 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15769
15770         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15771         bit values to registers
15772
15773 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15774
15775         * mini.c (mono_compile_get_interface_var): share interface
15776         variables if possible.
15777
15778 2003-05-16  Martin Baulig  <martin@ximian.com>
15779
15780         * debug-mini.c (mono_init_debugger): New function to initialize
15781         the debugger.  This is not in the debugger since it needs to
15782         access some of mini's internals.
15783
15784 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15785
15786         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15787
15788 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15789
15790         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15791         for value type handling.
15792
15793 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15794
15795         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15796         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15797
15798 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15799
15800         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15801           the constructor through a proxy.
15802
15803 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15804
15805         * jit-icalls.c, inssel.brg: fixes to array element address
15806         calculations.
15807
15808 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15809
15810         * mini-x86.c (is_regsize_var): allocate pointer to registers
15811
15812 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15813
15814         * driver.c: fixed typo, added intrins to the set of optimizations
15815         tested with regressions.
15816
15817 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15818
15819         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15820         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15821         test case.
15822
15823 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15824
15825         * inssel.brg: remove some common pop instructions without side effects
15826
15827 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15828
15829         * inssel-x86.brg: fixed thinko in int to double conversions.
15830
15831 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15832
15833         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15834
15835 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15836
15837         * inssel-long32.brg: two more missing instructions.
15838
15839 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15840
15841         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15842         if not already set.
15843
15844 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15845
15846         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15847         correctly.
15848
15849         * basic-float.cs: Added tests for negative zero.
15850
15851 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15852
15853         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15854         a couple of missing operations for long casts, with test cases.
15855
15856 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15857
15858         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15859
15860 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15861
15862         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15863         code size estimation.
15864
15865 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15866
15867         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15868         abstract methods (fix bug 42542)
15869
15870         * aot.c: add ability to handle array types
15871         
15872 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15873
15874         * mini.c: Call the _specific versions of the object allocation
15875         functions if possible.
15876
15877 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15878
15879         * driver.c: call setlocale ().
15880
15881 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15882
15883         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15884         windows build.
15885
15886 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15887
15888         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15889
15890         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15891         wrappers (fix bug 42122)
15892
15893 2003-05-04  Martin Baulig  <martin@ximian.com>
15894
15895         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15896
15897         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15898         s/mini_set_defaults/mono_set_defaults/g.
15899
15900 2003-05-04  Martin Baulig  <martin@ximian.com>
15901
15902         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15903
15904 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15905
15906         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15907         (reported by Don Roberts).
15908
15909 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15910
15911         * mini.c: temporarily work around two bugs for this release.
15912
15913 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15914
15915         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15916         that contains -export-dynamic and it makes using the ld script
15917         useless.
15918         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15919
15920 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15921
15922         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15923         specific cpu.
15924
15925 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15926
15927         * mini.c: make sure leave calls all the needed finally blocks,
15928         even when the target jumps out of multiple exception clauses.
15929
15930 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15931
15932         * ldscript, Makefile.am: add linker script to reduce the number of
15933         exported symbols (should also fix the issues with libwine defining
15934         some of the same symbols in io-layer).
15935
15936 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15937
15938         * driver.c (mini_main): Avoid assertion when no file name is given on 
15939         the command line.
15940
15941 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15942
15943         * driver.c: added --version/-V command line option.
15944         Added the inline optimization in the regression tests.
15945
15946 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15947
15948         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15949         to the type in the method signature (fixes bug#42134).
15950
15951 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15952
15953         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15954
15955 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15956
15957         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15958
15959 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15960
15961         * driver.c: fixed bug #42100.
15962
15963 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15964
15965         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15966
15967 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15968
15969         * mini.c: moved most of the code required to do inlining to its own
15970         function so it can be reused. Inline also ctors if appropriate.
15971
15972 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15973
15974         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15975         the runtime can call mono API functions.
15976
15977 2003-04-27  Martin Baulig  <martin@ximian.com>
15978
15979         * debug-mini.c (mono_debug_init_method): Added
15980         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15981         send a notification to the debugger.
15982
15983         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15984         running in the Mono Debugger, just pass the breakpoint number to
15985         mono_debug_init_method().
15986
15987         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15988
15989 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15990
15991         * mini.c: allow some more unsafe compares.
15992
15993 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15994
15995         * mini-x86.c, Makefile.am: make distcheck works (partially from
15996         a patch by Richard Lee <r.h.lee@attbi.com>).
15997         * regset.c, regset.h: removed, they are unused.
15998
15999 2003-04-25  Dick Porter  <dick@ximian.com>
16000
16001         * driver.c: Usage reports the name as 'mono' not 'mini'
16002         * exceptions-x86.c: Build and run on freebsd
16003
16004 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16005
16006         * Makefile.am: install the program with the 'mono' name and
16007         the library as libmono instead of mini and libmini.
16008
16009 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16010
16011         * driver.c: provide the APIs for the embedding interface of the old jit.
16012
16013 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16014
16015         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16016
16017 2003-04-23  Martin Baulig  <martin@ximian.com>
16018
16019         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16020
16021         * driver.c: Added `--debug' command line argument to enable
16022         debugging support.
16023
16024 2003-04-23  Martin Baulig  <martin@ximian.com>
16025
16026         * debug.[ch]: Removed.  The code is now in
16027         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16028
16029         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16030         last six months.
16031
16032 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16033
16034         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16035
16036 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16037
16038         * mini.c:
16039         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16040         mono_domain_finalize.
16041         (mini_method_compile): use mono_method_profile* if the the option is
16042         enabled.
16043
16044 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16045
16046         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16047         methods with their wrapper.
16048
16049         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16050         methods with their wrapper.
16051
16052         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16053         their wrapper.
16054
16055         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16056         wrapper.
16057
16058         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16059         methods.
16060
16061 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16062
16063         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16064
16065 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16066
16067         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16068         of the mempool. This is slightly faster and uses less memory
16069
16070 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16071
16072         * mini.c: avoid O(n) allocation for variables.
16073
16074 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16075
16076         * mini.c: handle items on the stack after inlining methods.
16077
16078 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16079
16080         * mini.c: make the method->opcode optimization dependent
16081         on MONO_OPT_INSTRINS and do it lazily.
16082
16083 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16084
16085         * driver.c: print overall results at the end of regression run.
16086
16087 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16088
16089         * inssel.brg: don't overwrite symbolic registers.
16090
16091 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16092
16093         * inssel-x86.brg: fix conversion from long to float.
16094
16095 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16096
16097         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16098
16099 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16100
16101         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16102
16103         * driver.c: Added --print-vtable option as in the old JIT.
16104
16105 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16106
16107         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16108
16109 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16110
16111         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16112
16113 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16114
16115         * mini.c regalloc.c regalloc.h: Fix memory leak.
16116
16117 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16118
16119         * aot.c (mono_aot_get_method): register all used strings
16120
16121 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16122
16123         * mini.c: always intern strings references with ldstr at compile time.
16124
16125 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16126
16127         * Makefile.am: add BUILT_SOURCES.
16128
16129 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16130
16131         * driver.c: give a better error message when the assembly to execute
16132         doesn't have an entry point.
16133
16134 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16135
16136         * Makefile.am: added hack for automake
16137
16138         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16139         correct sematics.
16140
16141         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16142
16143 22003-04-07  Martin Baulig  <martin@ximian.com>
16144
16145         * Makefile.am: Added Makefile.am.
16146
16147         * debugger-main.c: Removed, this is now in the debugger where it
16148         belongs.
16149
16150         * mini.pc.in: Call this package `mini' for the moment.
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164