aa2b490282909c6cb39c4f335ed268a4cc7f509a
[mono.git] / mono / mini / ChangeLog
1 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * basic-simd.cs: Tests for new methods in Vector8us.
4
5 2008-10-17  Mark Probst  <mark.probst@gmail.com>
6
7         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
8         RuntimeTypeHandle, not a TypedReference.
9
10 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
11
12         * simd-intrinsics.c: remove relocations.
13
14 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
15
16         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
17         optimizations from the x86 backend.
18
19 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
20
21         * simd-methods.h, simd-intrinsics.c: debloat method names and
22         prepare for no relocations.
23
24 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
25
26         * mini-ops.h: Add packed min/equal and sum of absolute differences.
27         
28         * cpu-x86.md: Same.
29
30         * mini-x86.c (mono_arch_output_basic_block): Same.
31
32         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
33         extract mask, max, min and sum of absolute differences.
34
35         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
36         method name.
37
38 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
39
40         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
41         Renamed one test for consistency.
42
43 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
44
45         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
46         fix to the code that deal with other blocks.
47
48 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
49
50         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
51
52 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
53
54         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
55         that deals with vreg interference. Explicitly check for OP_LDADDR to be
56         able to process the source reg.
57
58 2008-10-16  Martin Baulig  <martin@ximian.com>
59
60         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
61
62         * inssel.brg: Add `OP_HARD_NOP'.
63
64         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
65
66         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
67         `OP_HARD_NOP' instruction when running inside the debugger.
68
69         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
70         `OP_HARD_NOP' instruction when running inside the debugger.
71
72 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
73
74         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
75         now works. The issue with the regalloc tripping up no longer
76         happens.
77
78         * simd-intrinsics.c (load_simd_vreg): Same.
79
80 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
81         
82         * basic-simd.cs: Tests for new Vector8ui methods.
83
84 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
85
86         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
87         only for type. This fixes crashes where MonoInst::klass is checked
88         for ops of type != VTYPE or OBJ.
89
90         * simd-intrinsics.c (load_simd_vreg): Same.
91
92 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
93
94         * mini-ops.h: Add ops for packed shuffle/max/avg and
95         extract mask.
96         
97         * cpu-x86.md: Same.
98
99         * mini-x86.c (mono_arch_output_basic_block): Same.
100
101         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
102         extract mask.
103
104         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
105         to emit extract mask op.
106
107         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
108         to emit word shuffles.
109
110 2008-10-15  Mark Probst  <mark.probst@gmail.com>
111
112         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
113         the largest alignment needed by a variable, but at least
114         sizeof(gpointer).
115
116 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
117
118         * basic-simd.cs: Tests for the fixes in the last commit.
119
120 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
121
122         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
123         no longer handles STACK_PTR input.
124
125         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
126
127         * simd-intrinsics.c (load_simd_vreg): New function that works like 
128         get_simd_vreg   but handles STACK_PTR input.
129
130         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
131         as the input can be an arbitrary pointer.
132
133         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
134         LDADDR local optimization directly otherwise use a store op.
135
136 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
137
138         * basic-simd.cs: Tests for dup low and dup high.
139
140 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
141
142         * mini-ops.h: Add dup low and dup high ops.
143         
144         * cpu-x86.md: Same.
145
146         * mini-x86.c (mono_arch_output_basic_block): Same.
147
148         * simd-intrinsics.c (vector4f_intrinsics): Same.
149
150 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
151
152         * basic-simd.cs: Tests for recently added functionality.
153
154 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
155
156         * mini-ops.h: Add remaining sse1 fp ops.
157         
158         * cpu-x86.md: Add remaining sse1 fp ops.
159
160         * mini-x86.c (mono_arch_output_basic_block): Same.
161
162         * mini.h: Add enum for simd FP compare conditions.
163
164         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
165
166         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
167         so the backed can generate the appropriate op.
168
169 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
170         This patch squeese one more byte from the SimdIntrinsc struct.
171
172         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
173         a a shift amount intead of simply or'ing it.
174
175         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
176
177         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
178         byte so we can have an aditional flags field without increasing struct size.
179
180         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
181         against the simd_supported_versions bitmask.
182
183         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
184
185 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
186
187         * mini.c: remove rawbuffer code (the only use here is unsafe because
188         it takes locks during signal handling and the kernel now provides much
189         better info in proc/pid/smaps these days).
190
191 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
192
193         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
194         OP_X86_PUSH_OBJ. Fixes #434620.
195
196         * objects.cs: Add a test.
197         
198 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
199
200         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
201         that the packuswb/packusdw don't work with unsigned numbers for what
202         would be negative numbers in signed format.
203
204         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
205         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
206
207         * mini-ops.h: Add doubleword forms of many ops and packing ones.
208
209         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
210
211         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
212
213         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
214
215         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
216         add more ops.
217
218         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
219         version as the enum in mini.h.
220
221         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
222         for sse3 ops, check the simd_version field if present. This way the code
223         works with all versions of sse.
224
225 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
226
227         * simd-intrinsics.c: Fixed intrinsic name typo.
228
229         * mini.h: Added missing simd exported function.
230
231         * basic-simd.cs: Added tests for Vector4ui.
232         Fixed broken test for Vector16b.
233
234 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
235
236         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
237         the max length to 64.
238
239 2008-10-10  Mark Probst  <mark.probst@gmail.com>
240
241         * method-to-ir.c: Only do the fast virtual generic method call for
242         non-wrapper methods.
243
244         * mini.h, mini-trampolines.c: The new generic virtual remoting
245         trampoline handles virtual method calls via the vtable (as done by
246         the fast virtual generic method calls) to remoting proxies.
247
248         * mini.c (mono_jit_create_remoting_trampoline): For generic
249         methods reate a generic virtual remoting trampoline.
250
251         * mini-amd64.h: Enable fast virtual generic method calls again.
252
253 2008-10-10  Mark Probst  <mark.probst@gmail.com>
254
255         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
256         restore registers when doing tail calls.
257
258 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
259
260         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
261         Vector4ui.
262
263 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
264
265         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
266
267 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
268
269         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
270
271 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
272
273         * basic-simd.cs: Retrofit for API changes.
274
275 2008-10-10  Mark Probst  <mark.probst@gmail.com>
276
277         * mini-ppc.c: Handle integer stack arguments for tail calls.
278
279 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
280
281         * optflags-def.h: Removed sse3 optimization.
282
283         * driver.c: Same.
284
285         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
286         sse3.
287
288         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
289
290         * mini.h: Added enumeration with simd versions.
291
292         * simd-intrinsics.c (emit_intrinsics): Use the new static var
293         for detecting SSE3.
294
295         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
296
297         * mini.c (mini_init): Call mono_simd_intrinsics_init.
298
299 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
300
301         * basic-simd.cs: Added tests for Vector8u and Vector16u.
302
303         * basic-simd.cs: Fixed test naming.
304
305 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
306
307         * mini-ops.h: Added ops for packed and saturated math, shifts
308         and packing/unpacking.
309
310         * cpu-x86.md: Added descriptors for the above ops.
311
312         * mini-x86.c: Added code to emmit the above ops.
313
314         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
315
316 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
317
318         * aot-compiler.c (compile_method): Enable AOT for generic code.
319
320         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
321
322 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
323
324         * mini.c: add a workaround for a common screwup that ends up blamed
325         to mono (other processes blocking signal delivery).
326
327 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
328
329         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
330         in the LDFLD/STFLD opcodes. Fixes #432673.
331
332         * iltests.il.in: Add a new test.
333
334 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
335
336         * mini-arm.c: attach the thread in unmanaged->managed transitions
337         using delegates (bug #433148).
338
339 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
340
341        * basic-simd.cs: Use new ShuffleSel constants.
342
343 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
344
345         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
346
347         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
348         only disable simd intrinsics if no sse2 is detected.
349
350         * optflags-def.h: Added sse3.
351
352         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
353         is disabled.
354
355 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
356
357         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
358         when adding delegate-invoke wrappers.
359
360 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
361
362         * Makefile.am: Reenable the simd tests.
363
364 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
365
366         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
367           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
368           other vreg is allocated to that hreg.
369
370         Contributed under MIT/X11 license.
371
372 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
373
374         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
375         yet checked in.
376
377 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
378
379         * basic-simd.cs: New test suite for SIMD intrinsics.
380
381         * Makefile.am: Added new tests.
382
383 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
384
385         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
386
387         * mini-ops.h: Same.
388
389         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
390
391         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
392         using SSE2 aware opcodes.
393
394         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
395         is enabled, this code path is only reachable if conversion ops are emmited after
396         mono_method_to_ir.
397
398         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
399
400         This optimization saves 6 bytes per conversion against the old version.
401
402 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
403
404         * aot-compiler.c (compile_method): Don't skip methods referencing 
405         generic methods without a corresponding entry in token_info_hash, since
406         encode_method_ref () can handle all generic methods now.
407
408         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
409         generic context is set.
410         
411         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
412         generic sharing of LDTOKEN.
413
414 2008-10-06  Mark Probst  <mark.probst@gmail.com>
415
416         * mini-amd64.h: Temporarily disabled fast virtual generic method
417         calls because it breaks the System.Runtime.Remoting tests.
418
419 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
420
421         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
422
423         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
424         so inlining actually works.
425         (check_inline_caller_method_name_limit): Ditto.
426
427 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
428
429         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
430         64 bit safety (from Olaf Hering and Andreas Färber).
431
432 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
433         
434         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
435         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
436         unused virtual call support code.
437
438         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
439         
440         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
441         which can't use aot trampolines.
442         (decode_patch): Don't create aot trampolines for methods which can't use
443         them.
444
445         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
446         use aot trampolines.
447
448         * mini.h: Bump AOT image format version.
449         
450 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
451
452         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
453         to save_token_info () since cmethod is inflated for constrained calls.
454
455         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
456
457 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
458
459         * Makefile.am: Add build rules for ppc64.
460         This avoids the build failing at pedump with unresolved symbols
461         due to lack of arch_sources. Instead it will now fail earlier
462         due to lack of cpu-ppc64.md.
463
464         Contributed under MIT/X11 license.
465
466 2008-10-04  Mark Probst  <mark.probst@gmail.com>
467
468         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
469         tail calls.
470
471         * iltests.il.in: Add test case for tail call with many arguments.
472
473 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
474
475         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
476         to the fast virtual generic method code until the aot case is fixed.
477
478 2008-10-03  Mark Probst  <mark.probst@gmail.com>
479
480         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
481
482 2008-10-03  Mark Probst  <mark.probst@gmail.com>
483
484         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
485         thunks.
486
487 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
488         
489         * simd-intrinsics.c: Forgot to add this one.
490
491         * mini-codegen.c: Fix macro in case SIMD is not supported.
492
493 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
494         
495         This patch land initial JIT support for simd intrinsics.
496
497         * mini-x86.h: Added new define to make --enable_minimal work on x86.
498
499         * Makefile.am: Added simd-intrinsics.c
500
501         * simd-intrinsics.c: New file with simd instrinsic related
502         code.
503
504         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
505
506         * cpu-x86.md: Add simd related instructions.
507
508         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
509
510         * driver.c: Added two new --regression variants.
511
512         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
513
514         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
515
516         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
517         extract some complicated logic to helper functions.
518
519         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
520
521         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
522
523         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
524         the specialized simplification pass.
525
526         * method-to-ir.c (mono_spill_global_vars): Use new macro.
527
528         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
529
530         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
531         table.
532
533         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
534         if MONO_ARCH_NEED_SIMD_BANK is defined.
535
536         * mini-ops.h: Added the new simd ops.
537
538         * mini-x86.c: Added mono_arch_xregname.
539
540         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
541
542         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
543
544         * mini-x86.h: Define simd related MONO_ARCH macros.
545
546         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
547
548         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
549
550         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
551         MONO_CLASS_IS_SIMD to deal with simd related IR.
552
553         * mini.h (MonoInst): Added spill_var to the backend union.
554
555         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
556
557         * mini.h: Added forward declarations of the new simd fuctions.
558
559         * optflags-def.h: Added new optimization names SIMD.
560
561         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
562
563         * regalloc.h: Added support for working with 3 register banks.
564
565         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
566
567         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
568
569 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
570
571         * mini-exceptions.c: remove 64 bit related ifdef clutter.
572
573 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
574
575         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
576         instead of one on 64 bit systems.
577
578         * method-to-ir.c: Remove unused includes.
579
580 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
581
582         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
583         cfg->used_int_regs, since the two are different on arm.
584
585 2008-10-02  Mark Probst  <mark.probst@gmail.com>
586
587         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
588         mono_method_get_vtable_index() to get the vtable index.
589
590 2008-10-02  Mark Probst  <mark.probst@gmail.com>
591
592         * method-to-ir.c (mono_method_to_ir2): Don't create native
593         wrappers for array methods, because they're never called (and if
594         they were called they wouldn't work).
595
596 2008-10-02  Mark Probst  <mark.probst@gmail.com>
597
598         * method-to-ir.c (mono_method_to_ir2): Array methods are
599         special-cased and must not be invoked indirectly via the (M)RGCTX
600         when generic sharing is turned on.  Fixes #431413.
601
602 2008-10-01  Mark Probst  <mark.probst@gmail.com>
603
604         * method-to-ir.c: When generic sharing is active, call
605         non-interface virtual generic methods via the standard trampoline.
606
607         * mini-trampolines.c: Handle virtual generic shared methods.
608
609         * mini.h, mini-x86.c, mini-x86.h: New argument for
610         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
611         method thunks and which is the trampoline to call if the lookup
612         fails.  Enable the virtual generic method thunk for x86.
613
614         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
615         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
616         argument but assert that it's NULL, because these archs don't yet
617         implement the virtual generic method thunk.  Changes in the IMT
618         thunk data structures.
619
620 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
621
622         * aot-compiler.c (emit_globals): Avoid invalid characters in
623         the static linking symbol.
624
625         * objects.cs: Add a test for the range check optimization. Fix warnings.
626
627         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
628         optimization from the current JIT.
629
630         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
631         later in decompose_array_access_opts () to allow more optimizations.
632
633         * method-to-ir.c (mono_handle_soft_float): Rename this to 
634         mono_decompose_soft_float () for consistency.
635
636         * mini-ops.h: Fix arguments of OP_STRLEN.
637
638         * method-to-ir.c (save_cast_details): Extract the cast details saving code
639         into a separate function.
640         (reset_cast_details): Ditto.
641         (handle_unbox): Save cast details. Fixes #431254.
642
643         * method-to-ir.c: Remove some obsolete FIXMEs.
644
645 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
646
647         * ir-emit.h (alloc_dreg): Write a warning before crashing.
648
649 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
650
651         * mini-codegen.c: More work on macros to make them
652         ready for multiple regbanks.
653
654 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
655
656         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
657
658         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
659
660 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
661
662         * mini-codegen.c (mono_spillvar_offset): Proper support for
663         multiple regbanks.
664
665 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
666
667         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
668         the stack overflow changes.
669
670 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
671
672         * mini-codegen.c: Make all bank macros depend on reg_bank.
673
674         * mini-codegen.c (mono_local_regalloc): Make free mask
675         initialization regbank aware.
676
677 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
678
679         * mini-codegen.c (mono_local_regalloc): Extract callee
680         mask selection to a function and make it regbank aware.
681
682 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
683
684         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
685         code to deal with many regbanks.
686
687 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
688
689         * mini-codegen.c: More fp->regbank changes.
690
691 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
692
693         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
694         of a hardcoded constant.
695
696 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
697
698         * method-to-ir.c (type_from_stack_type): Fix typo.
699
700 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
701
702         * mini-ia64.c (emit_move_return_value): Convert float return values to
703         double.
704
705         * objects.cs: Add a new test.
706         
707         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
708         VARARG methods to fix an assert later.
709
710         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
711         end so it at least compiles.
712
713 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
714
715         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
716
717 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
718
719         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
720         optimization to a new function (emit_optimized_ldloca_ir) and enable
721         it for both ldloca and ldloca_s.
722
723 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
724
725         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
726         gshared CASTCLASS code.
727
728         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
729         amd64, where the libc stack unwinder encounters stack frames referring to
730         native code in unmapped memory.
731
732         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
733         sharing.
734
735         * generics.cs: Add new test.
736
737 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
738
739         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
740         add a check that one of the ARM_FPU_ constants is defined.
741
742         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
743         
744         * mini-exceptions.c: Fix build on non-altstack platforms.
745
746         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
747         sharing of vtypes.
748
749         * ir-emit.h: Add a comment to NEW_PCONST.
750
751         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
752
753         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
754
755         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
756         after the changes to MonoJitDomainInfo.
757
758 2008-09-27  Mark Probst  <mark.probst@gmail.com>
759
760         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
761
762 2008-09-27  Mark Probst  <mark.probst@gmail.com>
763
764         * mini-ppc.c: Compiler warning fixes.
765
766 2008-09-27  Mark Probst  <mark.probst@gmail.com>
767
768         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
769         for pinvokes.
770
771 2008-09-27  Mark Probst  <mark.probst@gmail.com>
772
773         * exceptions-ppc.c, mini-ppc.h: Compile
774         mono_arch_handle_altstack_exception() on Darwin, too.
775
776 2008-09-27  Mark Probst  <mark.probst@gmail.com>
777
778         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
779         work on archs which don't have generic sharing implemented, only
780         without the vtable_arg.
781
782 2008-09-26  Mark Probst  <mark.probst@gmail.com>
783
784         * mini.c: Added comment explaining why delegate ctor icall
785         wrappers are compiled.
786
787 2008-09-26  Mark Probst  <mark.probst@gmail.com>
788
789         * mini.c: Don't produce trampolines to delegate ctor icall
790         wrappers but compile them upfront.
791
792 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
793
794         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
795         runtime-set function when going back to managed code. Currently this
796         is used to set back the protection on the soft ovf pages and/or to
797         throw the stack overflow exception that happened in unmanaged code.
798
799 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
800
801         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
802         runtime-set function when going back to managed code. Currently this
803         is used to set back the protection on the soft ovf pages and/or to
804         throw the stack overflow exception that happened in unmanaged code.
805
806 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
807
808         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
809         the support code for restoring stack protection after stack overflows
810         that happen in unmanaged code. Don't set the exec permission on the
811         soft overflow area.
812
813 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
814
815         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
816         delegate->method_ptr is set. Fixes #428054.
817
818 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
819
820         * tests.cs: Rename to ratests.cs.
821
822         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
823         emit_get_rgctx_... functions.
824
825 2008-09-25  Mark Probst  <mark.probst@gmail.com>
826
827         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
828
829 2008-09-25  Mark Probst  <mark.probst@gmail.com>
830
831         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
832         before asserting that method is sharable.
833
834 2008-09-25  Mark Probst  <mark.probst@gmail.com>
835
836         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
837         whether method needs a static RGCTX wrapper used instead of
838         complex conditions.
839
840         * generic-sharing.c, mini.h: A few functions moved to
841         metadata/generic-sharing.c.
842
843 2008-09-25  Mark Probst  <mark.probst@gmail.com>
844
845         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
846         Generic code sharing for value types, which essentially means
847         treating value type methods like static methods.  The RGCTX is
848         passed in the same way.
849
850 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
851
852         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
853         opcode when creating multi-dimensional arrays of open types.
854
855         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
856         open generic types.
857
858         * generics.cs: Add a test.
859
860         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
861
862 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
863
864         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
865
866         * mini.c (mini_method_compile): Set it when running under the debugger. 
867
868         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
869         vreg optimization if the flag is set.
870
871         * driver.c (mono_main): Add --attach= option to pass options to
872         the attach agent.
873
874         * mini.c (sigquit_signal_handler): Start the attach agent.
875
876         * ssapre.c: Disable this to save space since it is not yet ported to
877         linear IR.
878
879         * regalloc2.c: Disable this to save space.
880
881         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
882
883 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
884
885         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
886         the -v option useful again.
887
888 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
889
890         * mini-amd64.c (mono_arch_output_basic_block): Add support for
891         --break-at-bb.
892
893         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
894         arrays of arrays. Fixes #428406.
895
896         * method-to-ir.c (mini_emit_castclass): Ditto.
897
898         * objects.cs: Add new test.
899         
900 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
901
902         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
903         was wrong at it choked against target_type_is_incompatible for byref types.
904
905 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
906
907         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
908         places.
909
910 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
911
912         * mini-exceptions.c: update a few more exceptions-related counters.
913
914 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
915
916         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
917         new functions to allocate from persistent mempools.
918
919 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
920
921         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
922         multiple register banks in the future.
923
924         * mini-codegen.c (mono_local_regalloc): Fix a warning.
925
926 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
927
928         * mini.c (type_to_eval_stack_type): Remove duplicated function.
929
930         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
931
932         * mini.h: Export type_to_eval_stack_type.
933
934         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
935         is only ins->klass of byref types.
936
937 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
938
939         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
940         (mini_emit_memcpy2): Ditto.
941
942         * mini-amd64.c: Fix a warning.
943
944 2008-09-21  Mark Probst  <mark.probst@gmail.com>
945
946         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
947         linking.
948
949 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
950
951         * method-to-ir.c: Extract stloc micro-optimization to a
952         function and apply it to all cases.
953
954 2008-09-19  Mark Probst  <mark.probst@gmail.com>
955
956         * method-to-ir.c: Don't fail generic code sharing in cases we
957         already support.
958
959 2008-09-18  Mark Probst  <mark.probst@gmail.com>
960
961         * mini-ppc.c: Handle structs in tailcalls on Darwin.
962
963 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
964
965         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
966         implementation.
967
968 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
969
970         * trace.c: make tracing more useful and correct, with per-thread
971         id and indent info.
972
973 2008-09-15  Mark Probst  <mark.probst@gmail.com>
974
975         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
976         doing a method call and the argument is an R4.
977
978 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
979
980         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
981         generic methods.
982
983 2008-09-13  Mark Probst  <mark.probst@gmail.com>
984
985         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
986
987 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
988
989         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
990         (MONO_JUMP_TABLE_FROM_INS): Ditto.
991
992 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
993
994         * driver.c: Add a --agent argument (not supported yet) to load managed
995         agent assemblies before loading the main assembly, similarly to how the
996         Java VM handles agents.
997
998 2008-09-11  Mark Probst  <mark.probst@gmail.com>
999
1000         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1001         function to do stack layout of local variables.
1002
1003 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1004
1005         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1006         calculation.
1007
1008 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1009
1010         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1011         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1012         JIT if DISABLE_JIT is defined.
1013
1014         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1015         defined.
1016
1017 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1018
1019         * iltests.il.in: Disable the fconv test on PPC (the result is
1020         undefined according to ECMA).
1021
1022 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1023
1024         * iltests.il.in: Enable tail call tests for PPC.
1025
1026         * mini.h: Add variable for storing incoming valuetype argument
1027         addresses for tail calls.
1028
1029         * mini-ppc.c: Implement valuetype arguments and return values for
1030         tailcalls on Linux.
1031
1032 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1033
1034         * mini-ppc.c: Partially implement tail calls (struct arguments and
1035         return values not supported).
1036
1037         * method-to-ir.c: Enable tail calls on PPC.
1038
1039 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1040
1041         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1042         runtime-invoke wrappers to work around the problem of them getting
1043         assigned to a random class.
1044
1045         * aot-runtime.c (mono_aot_get_method): Ditto.
1046         
1047 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1048
1049         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1050         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1051
1052 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1053
1054         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1055         until they're implemented properly.
1056
1057         * exceptions-ppc.c: Use arch-independent exception-handling code
1058         instead of custom one.
1059
1060         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1061         for Linear IR.
1062
1063         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1064
1065         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1066         applies when __powerpc__ is defined.
1067
1068 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1069
1070         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1071         methods to their code to avoid computing the full name of wrappers and
1072         doing a lookup in a string hash table.
1073
1074 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1075
1076         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1077         we identify bblocks before method_to_ir () is ran.
1078
1079         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1080         Also avoid optimizing branches pointing to themselves.
1081
1082         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1083
1084 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1085
1086         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1087
1088 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1089
1090         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1091         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1092         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1093         'buf'.
1094
1095         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1096         jumped to the same entry in plt_jump_table.
1097
1098 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1099
1100         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1101         dynamic images.
1102
1103 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1104
1105         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1106         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1107         #421807.
1108
1109 2008-08-29  Geoff Norton  <gnorton@novell.com>
1110
1111         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1112         segment, and doesn't properly handle .space as .text.  Fixes
1113         AOT Mach/ARM
1114
1115 2008-08-29  Geoff Norton  <gnorton@novell.com>
1116
1117         * mini.c: Disable the mach exception handler when running on 
1118         ARM
1119
1120 2008-08-29  Geoff Norton  <gnorton@novell.com>
1121
1122         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1123         globals on Darwin/ARM
1124
1125 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1126
1127         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1128         since too many things depend on it. Instead, call 
1129         mono_runtime_set_no_exec ().
1130         
1131         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1132         the new JIT.
1133
1134         * aot-compiler.c: Add an 'asm-only' AOT option.
1135
1136         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1137                 
1138         * aot-compiler.c (compile_method): Disable gshared support for now as it
1139         doesn't yet work.
1140
1141 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1142
1143         * mini-amd64.h : Fix a compiler warning.
1144
1145         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1146           Changed to use a callback function to retrieve the unwind info.
1147           This avoids problems observed when code blocks were removed by
1148           unloading an app domain.
1149
1150         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1151           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1152           to work properly.
1153
1154         Contributed under MIT/X11 license.
1155
1156 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1157
1158         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1159           case to keep the stack aligned to 8.
1160
1161         Contributed under MIT/X11 license.
1162
1163 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1164
1165         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1166         avoid repeated linear searches.
1167
1168 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1169
1170         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1171         methods it can't handle.
1172         
1173         * aot-compiler.c (add_method): Avoid adding a method twice.
1174         (add_wrappers): Add runtime invoke wrappers for all methods.
1175
1176         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1177         function to create an aot-compatible version of this trampoline.
1178
1179         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1180
1181 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1182
1183         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1184
1185         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1186         with a generic sharing failure.
1187
1188         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1189
1190         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1191         CEE_RETHROW. Fixes #419634.
1192
1193         * mini.c (mono_method_to_ir): Ditto.
1194
1195         * exceptions.cs: Add a new test.
1196         
1197         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1198         to mono_type_stack_size_internal () since some callers might not pass in
1199         an rgctx.
1200
1201         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1202         instrument_prolog. Fixes #419878.
1203
1204         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1205         doubles in soft float mode volatile.
1206
1207 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1208
1209         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1210
1211         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1212         to handle soft float correctly.
1213
1214         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1215         the fast path.
1216
1217         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1218
1219         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1220         to sp, since the generics catch code requires it.
1221
1222         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1223         copying.
1224
1225         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1226         mono_arch_emit_imt_argument ().
1227
1228         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1229
1230         * mini-arm.c tramp-arm.c: Generic sharing updates.
1231
1232 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1233
1234         * mini-arm.c: Fix the arm build.
1235
1236         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1237         handling enums, generic instances and generic sharing.
1238         (mini_type_stack_size_full): Ditto.
1239
1240         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1241         
1242         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1243
1244         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1245
1246         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1247         trampolines.
1248
1249         * mini-arm.c: Various small generic sharing changes.
1250
1251         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1252         this for x86.
1253         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1254         custom code.
1255
1256         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1257         helper function to return a generic class init trampoline.
1258
1259         * method-to-ir.c mini.c: Use it.
1260         
1261         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1262         arch-specfic function to return a generic class init trampoline.
1263
1264         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1265         the GENERIC_CLASS_INIT custom code.
1266
1267         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1268         a fatal error, not a sharing failure.
1269
1270         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1271         needed.
1272
1273         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1274         trampoline argument from MONO_ARCH_VTABLE_REG.
1275
1276         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1277         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1278         argument, and pass the vtable in VTABLE_REG.
1279
1280         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1281         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1282         argument, and pass the vtable in VTABLE_REG.
1283         (mono_arch_create_trampoline_code_full): Remove some special casing for
1284         the rgctx fetch trampoline.
1285
1286         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1287         Fixes #419273.
1288
1289         * iltests.il: Add a test for it.
1290
1291 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1292
1293         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1294
1295         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1296         no longer needed.
1297
1298         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1299         use mono_jit_info_table_find () to avoid recursion.
1300         (mono_delegate_trampoline): Add a sync wrapper here.
1301
1302         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1303         here.
1304
1305         * mini.c (mono_method_to_ir): Ditto.
1306         
1307         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1308         add_sync_wrapper argument. Don't add a sync wrapper here.
1309         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1310
1311         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1312         
1313 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1314
1315         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1316           of nonvolatile registers back from MonoContext to CONTEXT.
1317
1318         Contributed under MIT/X11 license.
1319
1320 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1321
1322         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1323           arguments on Winx64 there are only 4 argument registers.  For this
1324           logic to work the last argument must be pulled from the stack.  
1325
1326         Contributed under MIT/X11 license.
1327
1328 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1329
1330         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1331
1332         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1333         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1334         encode/decode_method_ref ().
1335
1336         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1337
1338         * aot-runtime.c (decode_patch): Ditto.  
1339
1340         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1341         MONO_PATCH_INFO_METHOD.
1342
1343         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1344         MonoGenericJitInfo.
1345
1346         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1347         MonoGenericJitInfo.
1348
1349         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1350
1351         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1352         one from the caller.
1353
1354         * aot-runtime.c (decode_generic_inst): New function to decode and
1355         return a interned generic inst.
1356         (decode_klass_ref): Use it.
1357         (decode_method_ref): Ditto.
1358
1359         * aot-compiler.c (emit_exception_debug_info): Save 
1360         jinfo->has_generic_jit_info too.
1361
1362 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1363
1364         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1365
1366         * iltests.il.in: Add a test for fconv_to_i.
1367
1368         * liveness.c: Disable the liveness2 pass for now to save space.
1369
1370         * regalloc2.c: Include mempool-internals.h to fix warnings.
1371
1372         * aot-compiler.c (encode_method_ref): Encode the context of generic
1373         instance methods.
1374
1375         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1376         the context saved in the aot file.
1377
1378         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1379
1380         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1381
1382         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1383         volatile so they won't be optimized away.
1384
1385 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1386
1387         * ssa.c:
1388         * ssa2.c:
1389         * mini.c:
1390         * regalloc2.c:
1391         * dominators.c: Remove duplicated functions that now are in
1392         mempool-internals.h.
1393
1394 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1395
1396         * aot-compiler.c: Fix warnings.
1397
1398         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1399
1400         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1401
1402         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1403         as the patch type.
1404
1405         * mini.c (mono_resolve_patch_target): Ditto.
1406         
1407         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1408         (encode_klass_ref): Add support for encoding VARs/MVARs.
1409
1410         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1411
1412         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1413         the handling of the got entries into a separate 'decode_got_entry' function.
1414         Add support for RGCTX_FETCH.
1415
1416         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1417         clobbered by the trampoline code.
1418
1419         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1420         not clobbered by the indirect calling code.
1421
1422 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1423
1424         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1425         to fix the build.
1426
1427 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1428
1429         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1430         signature using the compilation mempool otherwise we would leak it.
1431
1432 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1435         mono_emit_abs_call ().
1436
1437         * patch-info.h: Add GENERIC_CLASS_INIT.
1438
1439         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1440
1441         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1442         as their target as a near call.
1443
1444         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1445         ABS handling code.
1446         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1447
1448         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1449         call to a runtime function described by a patch.
1450
1451         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1452         mono_emit_abs_call, this has the advantage that the ABS handling code in
1453         mono_codegen () can handle them both, and can handle other stuff in the
1454         future without additional code.
1455
1456         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1457         entry.
1458         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1459         abs addresses.
1460
1461         * mini.h: Add missing bblock related prototypes.
1462
1463         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1464         reverse_inst_list_len fields.
1465
1466         * mini.c: Refactor this file a bit by moving branch optimizations to 
1467         branch-opts.c.
1468
1469         * method-to-ir.c: Merge generic sharing changes missed earlier.
1470
1471         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1472
1473         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1474         shared patches. Process METHODCONST as a shared patch.
1475
1476         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1477         as it crashes on the 2.0 mscorlib.
1478
1479         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1480         to cause crashes.
1481         
1482         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1483         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1484         by IMT.
1485
1486         * aot-compiler.c: Reorganize the got handling code to be a bit more
1487         understandable.
1488
1489 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1490
1491         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1492         mono_patch_info_equals/hash, and use it to massively simplify
1493         get_plt_index ().
1494
1495         * mini.c (mono_patch_info_hash): Simplify this and add support for
1496         more patch types.
1497
1498         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1499
1500         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1501         handling code, since an offset is not enough to identify a trampoline.
1502
1503         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1504
1505 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1506
1507         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1508
1509         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1510
1511         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1512
1513         * decompose.c: PPC decompositions for various ops.
1514
1515         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1516
1517 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1518
1519         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1520         call the generic trampoline code using a call, instead of a jump, to
1521         remove some special casing from the generic trampoline code.
1522
1523         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1524         (mono_codegen): Ditto.
1525
1526         * aot-compiler.c aot-runtime.c: Ditto.
1527
1528         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1529
1530         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1531         helper function to find the offset corresponding to a lazy fetch trampoline.
1532
1533         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1534         when doing generic sharing.
1535
1536         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1537         places.
1538         
1539         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1540         mini-trampolines.c to be with the other trampoline creation functions.
1541
1542         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1543         as it is equal to method->signature in most cases, add a 
1544         mono_emit_method_call_full variant which takes a signature and an imt
1545         argument as well.
1546
1547 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1548
1549         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1550         to this function, since it could be computed easily from the method 
1551         argument.
1552         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1553         more.
1554
1555         * method-to-ir.c mini.c: Remove references to 
1556         compile_generic_method_wo_context.
1557
1558         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1559         generic method calls.
1560         
1561         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1562         dimensional non-szarrays.
1563
1564         * mini.c (mini_init): Register mono_array_new_1.
1565
1566         * jit-icalls.c (mono_array_new_1): New jit icall.
1567
1568         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1569         pointing to the method.
1570
1571         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1572         method addresses belonging to METHOD_JUMP patches in the 
1573         jump_target_got_slot_hash.
1574         (mono_aot_load_method): Ditto.
1575
1576         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1577         METHOD_JUMP patches.
1578
1579         * mini.c (mini_create_jit_domain_info): New helper function which 
1580         initializes/frees domain->runtime_info.
1581         (mini_free_jit_domain_info): Ditto.
1582         (mini_init): Install the domain hook functions with the runtime.
1583
1584         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1585         information maintained by the JIT.
1586
1587         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1588         insertion into jump_table_hash into mono_codegen (), also implement proper
1589         locking.
1590
1591         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1592         tail calls, it is already done by the aot code.
1593         
1594         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1595         mechanism on amd64.
1596
1597         * iltests.il.in: Make the jmp test a bit more complex.
1598
1599         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1600         generic instances which doesn't have a token.
1601
1602         * aot-runtime.c (decode_method_ref): Ditto.
1603         
1604         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1605         can handle this case now.
1606         (handle_box): Ditto.
1607
1608 2008-08-15  Geoff Norton  <gnorton@novell.com>
1609
1610         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1611         debugging check.
1612
1613 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1614
1615         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1616         calling generic methods.
1617
1618         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1619
1620         * aot-runtime.c (decode_patch_info): Ditto.
1621
1622         * mini.c (mono_resolve_patch_target): Ditto.
1623         
1624         * patch-info.h: Add METHOD_RGCTX.
1625
1626         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1627
1628 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1629
1630         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1631         arguments in registers.
1632
1633         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1634         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1635
1636         * mini.c (mini_method_compile): Abort aot compilation for generic
1637         methods if generic sharing is disabled.
1638         
1639         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1640         an mrgctx.
1641
1642         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1643         requiring an mrgctx.
1644
1645         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1646         store instructions when converting a vcall to a normal call.
1647
1648         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1649         mono_arch_find_jit_info.
1650
1651 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1652
1653         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1654         avoid calling mono_method_full_name () for every method even if the
1655         env var is not set.
1656         (check_inline_caller_method_name_limit): Ditto.
1657
1658 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1661         assemblies in one run.
1662
1663         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1664         skipped methods if it is not 0.
1665
1666         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1667
1668 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1669
1670         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1671           MONO_ARCH_HAVE_UNWIND_TABLE.
1672
1673         Contributed under MIT/X11 license.
1674
1675 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1676
1677         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1678           from default optimizaton list on Winx64.
1679
1680         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1681
1682         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1683           the LMF from the MonoJitTlsData structure.
1684
1685         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1686
1687         Contributed under MIT/X11 license.
1688
1689 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1690
1691         * mini.c (sigsegv_signal_handler): Fix the build.
1692
1693         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1694         assembly->aot_module.
1695
1696         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1697         hash table. This simplifies and speeds up a lot of code, and fixes support
1698         for .netmodules.
1699
1700         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1701         with the runtime.
1702
1703         * mini-exceptions.c: Ditto.
1704         
1705         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1706         'native_offset' argument, since these are computed in the 
1707         mono_find_jit_info () function.
1708
1709         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1710         is used by exceptions-ppc.c.
1711
1712         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1713         mono_arch_find_jit_info ().
1714         
1715         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1716         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1717         generic code in mini-exceptions.c.
1718
1719 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1720
1721         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1722
1723         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1724         
1725         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1726         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1727         called while holding the loader lock. Fixes #415608.
1728         (mono_aot_get_method_from_token_inner): Ditto.
1729
1730 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1731
1732         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1733         to reduce differences between this and the generic implementation in
1734         mini-exceptions.c.
1735         (ves_icall_get_frame_info): Ditto.
1736
1737         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1738
1739         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1740         longer neccesarry.
1741
1742         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1743         mono_arch_get_call_filter () and make it non-static, for consistency with the
1744         other architectures.
1745
1746 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1747
1748         * mini.c:
1749         * local-propagation.c:
1750         * mini-x86.c: Correct the name of arch defines.
1751
1752 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1755         NO_EMULATE_LONG_SHIFT_OPS define.
1756
1757 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1758
1759         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1760         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1761
1762         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1763         MACH fixes. Merged from the 2.0 branch.
1764
1765         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1766
1767         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1768         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1769
1770         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1771
1772         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1773         mono_marshal_get_native_wrapper () signature changes.
1774
1775 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1776
1777         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1778         conversion bug under arm.
1779
1780 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1781
1782         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1783
1784         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1785         with overflow checking.
1786
1787 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1788
1789         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1790         to the genmdesc.pl file
1791
1792 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1793
1794         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1795         arg_array in the soft-float versions of the LOAD/STORE macros.
1796
1797         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1798         implementation.
1799
1800         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1801
1802 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1803
1804         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1805         a float HFA. Fixes #413621.
1806
1807 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1808
1809         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1810         frame_size to args_size. Fixes build.
1811
1812 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1813
1814         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1815         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1816
1817         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1818         the stack are not unaligned. Fixes #413247.
1819         
1820 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1821
1822         * mini.c: update jitted methods performance counters.
1823
1824 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1825
1826         * mini-exceptions.c: increase the exceptions thrown performance
1827         counter in mono_handle_exception ().
1828
1829 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1830
1831         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1832         can work with netmodules.
1833
1834 2008-07-28  Geoff Norton  <gnorton@novell.com>
1835
1836         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1837         regression tests.
1838
1839 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1840
1841         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1842         correct place.
1843
1844 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1845
1846         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1847           The float param registers and other param registers must be the 
1848           same index on Windows x64.
1849
1850         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1851           ArgValuetypeAddrInIReg argument case.  Setting the argument
1852           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1853
1854         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1855           variable computed above as the copy length for arguments of storage
1856           type ArgValuetypeAddrInIReg.
1857
1858         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1859           ArgValuetypeAddrInIReg argument case.  This case will rely on
1860           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1861
1862         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1863           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1864           jump and tail call instructoins as they do not follow the typical call behavior.
1865
1866         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1867           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1868           local variable and pass the local variable by reference to the called method.
1869
1870         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1871           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1872           of a struct is passed in a register it must be saved with the other
1873           volatile argument on the stack.
1874
1875         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1876           frame pointer the stack adjustment value must be saved to the unwind 
1877           info structure.
1878
1879         Contributed under MIT/X11 license.
1880
1881 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1884         which got lost in the merge.
1885
1886 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1889         build.
1890
1891         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1892         
1893         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1894         icalls, since they won't be patched.
1895
1896         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1897         different code sequence when running under valgrind to prevent some valgrind
1898         errors.
1899
1900         * iltests.il.in: Add new regression test.
1901
1902         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1903         end with a throw.
1904
1905         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1906         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1907
1908         * iltests.il.in: Add new test.
1909
1910         * aot-compiler.c: Fix some warnings.
1911
1912         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1913         Fixes #412494.
1914
1915 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1916
1917         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1918         (mini_usage_jitdeveloper): Add a missing --wapi option.
1919
1920 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1921
1922         * mini-codegen.c: Simplify the is_fp macros.
1923         (free_up_ireg): Remove, use free_up_reg instead.
1924         (free_up_reg): Fix the fp case.
1925
1926 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1927
1928         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1929         lowered earlier.
1930
1931         * exceptions-x86.c: Merge some changes which seemed to have got lost
1932         in the linear-ir merge.
1933
1934         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1935
1936         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1937         long vreg volatile even if the variable was already created.
1938
1939         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1940         volatile variables.
1941
1942 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1945
1946         * mini.c (mono_jit_compile_method_inner): Add support for 
1947         MONO_EXCEPTION_BAD_IMAGE.
1948
1949         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1950         mini_method_get_context () returns NULL. Fixes #356531.
1951
1952         * mini.c (mono_method_to_ir): Ditto.
1953         
1954         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1955         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1956
1957 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1958
1959         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1960         in the LDFTN implementation.
1961
1962 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1963
1964         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1965         code, patch calls to icalls, too, even if they're not in the
1966         shared generic code hash.  Fixes #411962.
1967
1968 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * cpu-x86.md: Increase the length of the fcall opcodes.
1971
1972         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1973         calls returning floats.
1974
1975         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1976         on NEWARR.
1977         
1978         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1979         missed earlier.
1980
1981         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1982         into the domain->method_code_hash.
1983
1984         * aot-compiler.c: Fix win32 build.
1985
1986         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1987         
1988         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1989         gshared NEWARR implementation.
1990
1991         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1992
1993         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1994         can be used outside of method_to_ir.
1995
1996         * mini.h (MonoCompile): Add arg_types field.
1997
1998         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1999         
2000         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2001         the values of the local arg_array and param_types array.
2002
2003 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2004
2005         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2006         got accesses might only get generated later when NEWOBJ is decomposed.
2007         
2008         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2009         looking up the native code of the target method when a delegate is called
2010         for the first time.
2011
2012         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2013         optimization.
2014
2015         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2016
2017         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2018         AOT work on platforms without a working dlsym implementation.
2019
2020         * mini.h: Bump AOT image format version.
2021         
2022 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2023
2024         * mini-exceptions.c: Free a MonoType with
2025         mono_metadata_free_type() instead of g_free().
2026
2027         * aot-runtime.c: Free a MonoType.
2028
2029 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2030
2031         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2032         optimization.
2033
2034         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2035         fp stack on x86.
2036
2037 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2038         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2039         profiler hook.
2040
2041 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2042
2043         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2044         NEWOBJ calls on valuetypes.
2045
2046         * iltests.il.in: Add new test.
2047
2048         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2049
2050 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2051
2052         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2053         is no longer needed.
2054
2055         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2056         non register sized integer arguments.
2057         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2058         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2059         emit_memcpy2 ().
2060
2061         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2062         CEE_MONO_RETOBJ.
2063         
2064         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2065         two a binop with different sized arguments is emitted.
2066
2067         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2068         instruction in the ins==NULL case.
2069
2070 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2071
2072         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2073
2074         * mini-x86.c: Fix osx build.
2075
2076         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2077         opcodes as well.
2078
2079         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2080         instruction for non int sized variables.
2081
2082         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2083         implementation.
2084
2085 2008-07-23  Robert Jordan  <robertj@gmx.net>
2086
2087         * method-to-ir.c: Fix MSVC build.
2088
2089 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2090
2091         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2092         a non int sized type, widen it to an int since newer versions of gcc seem to
2093         generate code which needs this.
2094
2095         * ssa2.c abcremoval2.c: Fix warnings.
2096
2097         * *: Merge the Linear IR branch.
2098
2099         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2100         the ChangeLog file there describes all the changes done over the years. 
2101         Further documentation can be found at www.mono-project.com/Linear_IL.
2102
2103 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2104
2105         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2106           The float param registers and other param registers must be the 
2107           same index on Windows x64.
2108
2109         Contributed under MIT/X11 license.
2110
2111 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2112
2113         * mini.c: Make the previous fix GC safe.
2114
2115 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2116
2117         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2118
2119 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2120
2121         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2122           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2123           ArgValuetypeAddrInIReg instead.
2124
2125         Contributed under MIT/X11 license.
2126
2127 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2128
2129         * mini-codegen.c (get_register_spilling): Fix a warning.
2130
2131 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2132
2133         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2134         for types which the initialization fails. Raises the provided exception
2135         at the right stop after cleanup.
2136
2137 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2138
2139         * aot-compiler.c: Free most of the memory allocated during compilation.
2140
2141         * mini.c (mini_parse_debug_options): Fix a leak.
2142         
2143         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2144         during aot compilation.
2145
2146 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2147
2148         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2149         it has too much register pressure.
2150
2151 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2152
2153         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2154
2155 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2156
2157         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2158         on x86.
2159
2160         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2161         on amd64 similar to the way it is done on arm.
2162
2163         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2164
2165         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2166         consistency, normalize error messages, avoid loading aot-only modules in
2167         normal mode.
2168
2169         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2170         for consistency.
2171
2172         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2173
2174 2008-07-11  Martin Baulig  <martin@ximian.com>
2175
2176         * debug-debugger.h
2177         (MonoDebuggerInfo): Add `interruption_request'.
2178
2179 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2180
2181         * aot-compiler.c (emit_plt): Remove some dead code.
2182
2183         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2184
2185         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2186         return the plt info offset belonging to a given plt entry.
2187
2188         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2189         mono_aot_get_plt_info_offset.
2190         
2191         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2192         similar to the amd64 code by makeing jumps through a separate jump table 
2193         instead of embedding the jump addresses into the code.
2194
2195 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2196
2197         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2198         method.
2199
2200 2008-07-10  Martin Baulig  <martin@ximian.com>
2201
2202         * mini.c (mini_method_compile): Disable generics sharing when
2203         running in the debugger.
2204
2205 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2206
2207         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2208
2209         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2210         the local register allocator from running out of registers on x86 when 
2211         using aot.
2212
2213 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2214
2215         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2216         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2217         C4146.
2218
2219         Contributed under MIT/X11 license.
2220
2221 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2222
2223         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2224         speed up the assembler.
2225
2226 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2227
2228         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2229         support.
2230
2231         * mini.c: Move the soft float handling macros a bit earlier, add 
2232         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2233         place.
2234
2235         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2236
2237         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2238         read-only to help catch code allocation requests.
2239         
2240         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2241         and turn it off when using --aot-only or when compiling with --aot=full.
2242
2243         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2244         jump table for switches from the normal domain mempool, not the code
2245         manager.
2246
2247         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2248         unbox trampoline which handles aot-only mode too.
2249
2250         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2251         an AOTed unbox trampoline.
2252
2253         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2254
2255 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2256
2257         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2258         ""
2259
2260         Contributed under MIT/X11 license.
2261
2262 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2263
2264         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2265           the unwind information for the method at the end of the allocated block.
2266           
2267         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2268           MonoCompileArch to hold the unwind info for SEH on Winx64
2269         
2270         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2271           frame pointer info for the method being compiled.
2272           
2273         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2274           the call to mono_exception_from_token.
2275           
2276         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2277           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2278           information is stored a the end of the method block because it is all 32-bit offset based.
2279
2280         Contributed under MIT/X11 license.
2281
2282 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2283
2284         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2285
2286         * wapihandles.c: Fix warnings.
2287
2288         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2289         mode.
2290
2291         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2292         mono_jit_compile_method in aot-only mode since that calls the type 
2293         initializer.
2294         
2295         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2296         get_delegate_invoke_impl in aot-only mode.
2297
2298         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2299
2300 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2301
2302         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2303
2304         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2305         is on by default.
2306
2307         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2308
2309         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2310         init trampoline from the AOT file as well.
2311
2312         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2313         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2314         code.
2315
2316         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2317         mono_init.
2318
2319         * exceptions-amd64.c: Add _full variants for the remaining exception code
2320         creation functions as well, allow emission of relocatable code, remove
2321         caching since that is now done by the caller.
2322
2323         * mini-exceptions.c: Add _full variants for the remaining exception code
2324         creation functions as well, add aot-only support.
2325
2326         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2327         if we can determine a proper token for them.
2328         (add_wrappers): Add a few more wrappers.
2329         (emit_method_code): Remove some dead code.
2330         (emit_trampolines): Emit exception code too.
2331
2332         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2333
2334         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2335         mono_array_new_va which avoids varargs.
2336
2337         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2338
2339         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2340         mono_arch_create_specific_trampoline () in all places.
2341
2342         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2343         a bit so it can be used for other things as well.
2344         
2345         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2346         on demand as well.
2347
2348         * exceptions-amd64.c: Rename the caching from the exception code creation
2349         functions, it is done by the caller instead.
2350         
2351         * exceptions-amd64.c: Change the signature of the exception code creation 
2352         functions to allow the creation of relocatable code later.
2353
2354         * mini-exceptions.c: Add a set of functions to query the various 
2355         runtime-generated exception functions.
2356
2357         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2358         mono_arch_.. () functions.
2359         
2360 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2363
2364         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2365
2366         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2367         (mini_get_vtable_trampoline): Ditto.
2368
2369         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2370         code in the AOT case by returning the code size and a list of relocations to
2371         the caller.
2372
2373         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2374
2375 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2376
2377         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2378           clean the stack.
2379
2380         Contributed under MIT/X11 license.
2381
2382 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2383
2384         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2385         so the buffer size can be computed correctly. Fixes #404735.
2386
2387         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2388         normally as cfg->debug_info is already freed.
2389
2390 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * mini-amd64.c: For calls returning vtypes in registers, don't store
2393         the return address on the stack, instead allocate a separate local for
2394         it. Fixes #404729.
2395
2396 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2397
2398         * mini-trampolines.c, mini.h: Add an argument to
2399         mono_create_jit_trampoline_in_domain() for turning off the adding
2400         of the sync wrapper.
2401
2402         * mini.c: Use the JIT trampoline without sync instead of
2403         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2404         be patched.
2405
2406 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2407
2408         * driver.c: Turn on GSHARED optimization by default.
2409
2410 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2411
2412         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2413         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2414
2415         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2416         create a variant of the generic trampoline code callable from AOTed trampolines.
2417
2418         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2419         trampoline code callable from AOTed trampolines.
2420
2421         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2422
2423 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2424
2425         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2426         pass-through manner.
2427
2428         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2429         and don't fail sharing for them anymore.
2430
2431         * mini-exceptions.c: Handle exceptions in shared generic methods.
2432
2433         * generic-sharing.c: When checking the context of a generic
2434         method, also check its class's context.  Don't treat wrappers as
2435         sharable.
2436
2437         * mini-trampolines.c: Some code factored out to
2438         metadata/generic-sharing.c.  Handle the MRGCTX case.
2439
2440         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2441         we must deal with the method being of another instantiation of the
2442         class.  Add static rgctx invoke wrappers to generic methods.
2443
2444 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2445
2446         * mini.c: Provide all jit infos of generic shared methods with a
2447         generic jit info.
2448
2449         * mini-exceptions.c: Handle the new situation that a generic info
2450         might be available, but not info about the this/vtable/mrgctx
2451         variable.
2452
2453 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2454
2455         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2456         generic methods.
2457
2458 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2459
2460         * dominators.c (check_dominance_frontier): Fix a warning.
2461
2462         * mini.h: Add some missing prototypes.
2463
2464         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2465
2466         * driver.c (mono_jit_init_version): Correct the comments since the first
2467         argument should be the name of the root domain, not a filename.
2468
2469         * aot-runtime.c (make_writable): Error out if this is called while running
2470         with --aot-only.
2471         (load_aot_module): Ditto.
2472
2473         * aot-compiler.c: Really fix the computation of method indexes.
2474
2475         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2476         optimizations as this is no longer called frequently.
2477
2478         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2479         method and the invoke impl code and pass it to the delegate trampoline instead of
2480         just the delegate class.
2481
2482 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * aot-compiler.c: Fixup the computation of method indexes.
2485         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2486         the method builder infrastructure.
2487
2488         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2489         has no header.
2490
2491         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2492         mode, load the method right away instead of creating a trampoline.
2493
2494         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2495
2496         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2497         some checks a bit.
2498
2499 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2500
2501         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2502         (mono_aot_load_method): Use method_index instead of method->token.
2503
2504         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2505         can handle icalls etc. properly.
2506
2507         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2508
2509         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2510
2511         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2512         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2513         JIT_ICALL_ADDR patch type.
2514
2515         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2516
2517         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2518         request flag.
2519         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2520
2521         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2522
2523 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2524
2525         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2526         domain->jit_code_hash.
2527
2528 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2529
2530         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2531
2532 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2535         get_this_arg_from_call, let it compute it when needed.
2536
2537         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2538         gsctx from code only when needed.
2539
2540         * mini-trampolines.c (get_generic_context): Rename this to 
2541         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2542         it can be called by the arch backends.
2543
2544         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2545
2546 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * driver.c (mono_main): Add experimental --aot-only command line option.
2549
2550         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2551         set.
2552
2553 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2554
2555         * driver.c (DllMain): Remove mono_module_handle.
2556
2557         Contributed under MIT/X11 license.
2558
2559 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2560
2561         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2562         for emitting methods which are not in the source assembly. Detect and report
2563         failure of assembling+linking.
2564         
2565         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2566
2567         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2568
2569 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2570
2571         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2572
2573 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2574
2575         * mini.h: Remove some obsolete prototypes.
2576
2577         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2578
2579 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2580
2581         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2582         supported by Visual Studio, so use alloca().
2583
2584 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2585
2586         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2587         Fixes #402585.
2588
2589 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2590
2591         * mini.c: Fail sharing of a generic method if it contains an open
2592         catch clause (because we don't pass MRGCTXs yet).
2593
2594 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2595
2596         * mini.c: When compiling a method with generic sharing, insert the
2597         method instantiated with an all-Object generic context into the
2598         jit info table, instead of the context of the first instantiation
2599         of the method we happen to compile.
2600
2601 2008-06-18  Martin Baulig  <martin@ximian.com>
2602
2603         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2604         `major_version' and `minor_version'.
2605
2606 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2607
2608         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2609         mono_method_is_generic_sharable_impl() takes an additional
2610         argument specifying whether to treat type variables as reference
2611         types.
2612
2613 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2614
2615         * mini.h: Removed obsolete prototypes.
2616
2617 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2618
2619         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2620         already handle them.
2621
2622 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2623
2624         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2625         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2626         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2627         tramp-x86.c: Added a MonoGenericContext* argument to
2628         mono_arch_get_unbox_trampoline() so that it can call other
2629         functions which require it.
2630
2631 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2632
2633         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2634         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2635         mono_arch_get_this_arg_from_call() takes a
2636         MonoGenericSharingContext* as well.
2637
2638 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2639
2640         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2641         implement generic sharing of unbox.
2642
2643 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2644
2645         * mini.c: Don't compute the vtable to determine whether a field is
2646         special static, because it might not work for open types.
2647
2648 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2649
2650         * mini.c: Removed the unused token_type and token_source arguments
2651         from get_runtime_generic_context_ptr().
2652
2653 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2654
2655         * mini.c (ADD_BINOP): fix the build
2656
2657 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2658
2659         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2660         a widening op.
2661
2662 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2663
2664         * mini.h: Removed class relations enum that's not used anymore.
2665
2666 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2667
2668         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2669
2670         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2671         the lazy fetch trampoline access code.
2672
2673 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2674
2675         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2676
2677 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2680
2681         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2682
2683         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2684
2685 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2688         intrinsics.
2689
2690         * mini-ops.h: Add MIN/MAX_UN opcodes.
2691
2692         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2693         intrinsics.
2694
2695         * basic-math.cs: Add more min/max tests.
2696
2697         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2698
2699 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2700
2701         * mini.c: Small fix in the prologue of emit_castclass.
2702
2703 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2704
2705         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2706
2707         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2708         do not work even for unsigned types. Fixes #400014.
2709
2710         * basic-math.cs: Add regression tests for unsigned Min/Max.
2711
2712 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2713
2714         * mini.c: Added additional context_used argument to several
2715         functions, which will be needed for sharing generic methods.  Use
2716         GET_RGCTX macro wherever appropriate.  Declare only one
2717         context_used in mono_method_to_ir().
2718
2719 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2720
2721         * mini.c, generic-sharing.c: Removed generic class relations.
2722
2723         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2724         functions due to MRGCTX changes.
2725
2726 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2727
2728         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2729         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2730         with calculated IMT.
2731
2732         * mini.c: Generic sharing of calls via generic interfaces.
2733
2734         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2735         generic method with non-constant MonoGenericContext*.  Instead,
2736         the context is taken out of the method itself.
2737
2738 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2739
2740         * mini.c: Generic sharing of ldvirtftn.
2741
2742 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2743
2744         * mini.c: Generic sharing of ldftn.
2745
2746 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2747
2748         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2749
2750 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2751
2752         * mini.c: Generic sharing of the special case of ldtoken followed
2753         by a call to GetTypeFromHandle.
2754
2755 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2756
2757         * mini.c: Generic sharing of box for nullable types.
2758
2759 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2760
2761         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2762         are passed on the stack. Fixes #324807.
2763
2764 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2765
2766         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2767         for the ArgValuetypeAddrInIReg case.
2768
2769         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2770         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2771
2772         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2773         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2774         local variable and pass the local variable by reference to the called method.
2775           
2776         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2777         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2778
2779         Contributed under MIT/X11 license.
2780
2781 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2782
2783         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2784
2785         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2786         everything.
2787
2788 2008-06-10  Martin Baulig  <martin@ximian.com>
2789
2790         * debug-mini.c
2791         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2792
2793 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2794
2795         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2796         possible error when no arguments are passed.
2797
2798         Contributed under MIT/X11 license.
2799
2800 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2801
2802         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2803         where the file name is NULL.
2804
2805 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini.c: Fix s390 build.
2808
2809 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * trace.c (mono_trace_parse_options): Fix warnings.
2812
2813         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2814
2815 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2816
2817         * mini.c (remove_block_if_useless): Avoid printing the method name.
2818         
2819         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2820         MONO_INST_NEW.
2821
2822         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2823         LMF. Not yet used.
2824
2825         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2826         translated code after it has been patched.
2827
2828 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2829
2830         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2831         avoid problems during code patching on SMP systems.
2832         (emit_call): Avoid adding a patch info which is already added by 
2833         emit_call_body.
2834         (mono_arch_emit_exceptions): Ditto.
2835
2836 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2837
2838         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2839         MONO_TYPE_ISSTRUCT already checks for it.
2840
2841 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2842
2843         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2844           structs with floats on Winx64 the float registers are not used.  
2845           The integer registers are always used..
2846         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2847           only one register will be used and only if the size of the struct 
2848           is 1,2,4, or 8 bytes.
2849
2850         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2851           to work for Winx64.
2852
2853         Contributed under MIT/X11 license.
2854
2855 2008-06-05  Martin Baulig  <martin@ximian.com>
2856
2857         * debug-debugger.c (debugger_lookup_class): Also call
2858         mono_class_setup_methods() here; we're only called from RTI.
2859
2860 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2861
2862         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2863         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2864         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2865         Post-process object files and add dtrace-generated object, if necessary.
2866
2867         Contributed under MIT/X11 license.
2868
2869 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2870
2871         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2872         element class.
2873
2874         * mini.c: Generic sharing for unbox.any and castclass.
2875
2876 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2877
2878         * mini.c: Ignore tailcall prefix in shared generic code and when
2879         doing calls which require a vtable/rgctx argument.
2880
2881 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2882
2883         * mini.c: Don't free the JIT info.
2884
2885         * driver.c: Changes in the JIT info table testing code.
2886
2887 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2888
2889         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2890         interruption. Fix some warnings.
2891
2892         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2893         interruption_checkpoint.
2894
2895 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2896
2897         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2898         from embedding applications.
2899
2900 2008-06-02  William Holmes  <billholmes54@gmail.com>
2901
2902         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2903           reserving 32 bytes on the stack when making calls. 
2904
2905         Contributed under MIT/X11 license.
2906
2907 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2908
2909         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2910         the linear IL branch.
2911
2912         * driver.c: Print out more information for --version on arm.
2913
2914 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2915
2916         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2917         bb_exit instead, since out of line bblocks might not actually be emitted
2918         out-of-line.
2919         
2920         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2921         maximum epilog size for out of line bblocks if tracing is enabled.
2922
2923         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2924
2925 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2926
2927         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2928
2929 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2930
2931         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2932         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2933         opcodes.
2934
2935 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2938         the 'value' to store is a constant.
2939
2940         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2941
2942         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2943         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2944
2945 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2948         for accessing method->generic_container.
2949
2950 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2951
2952         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2953         
2954         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2955
2956         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2957
2958         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2959         fails.
2960
2961 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2962
2963         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2964
2965         * mini.c: Handle the case when mono_class_vtable () fails.
2966
2967 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2968         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2969         the stat profiler.
2970
2971 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2972
2973         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2974         together with domain sharing.
2975
2976 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2977
2978         * mini.c: Treat callvirts to final methods like non-virtual calls
2979         when doing generic sharing, i.e. look them up in the runtime
2980         generic context.
2981
2982 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2983
2984         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2985         with computed types (for generic sharing).
2986
2987         * mini.c: Generic sharing for mkrefany and refanyval.
2988
2989 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2990
2991         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2992         possible.
2993
2994         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2995         the generic sharing code.
2996         
2997         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2998         when needed.
2999
3000 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3001
3002         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3003
3004 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3005
3006         * driver.c: updated copyright date
3007
3008 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3009
3010         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3011         needed.
3012
3013 2008-05-19  Martin Baulig  <martin@ximian.com>
3014
3015         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3016         pointing to the new `_mono_debug_using_mono_debugger' variable.
3017
3018         * driver.c
3019         (mono_main): Check mono_debug_using_mono_debugger() rather than
3020         the `MONO_INSIDE_MDB' environment variable to check whether we're
3021         inside the debugger.
3022
3023 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3024
3025         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3026         argument.
3027
3028 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3029
3030         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3031
3032         * mini.c: Added mini_assembly_can_skip_verification. This
3033         function checks if the assembly requested to skip verification. 
3034         Fixes part of #387274.
3035
3036 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3037
3038         * mini.c (mini_get_method): Disable the check for open generic classes when
3039         using generic sharing.
3040
3041         * generics.cs: Add a test for #387034.
3042
3043         * mini.c (mini_get_method): Check whenever the method class is an open generic
3044         type, and return NULL in that case, causing a verification error. Fixes
3045         #384123.
3046
3047 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3048
3049         * driver.c (mono_main): Revert r102623. The right
3050         thing to do is to enable the verifier under verifiable
3051         unless a --security flag was passed.
3052
3053         We need this non-trivial behavior for --verify-all otherwise
3054         mcs-compileall won't be able to use it. As it needs everything to
3055         be verified under validil.
3056
3057 2008-05-06  Martin Baulig  <martin@ximian.com>
3058
3059         Fix #383749.
3060
3061         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3062         (mono_debugger_thread_cleanup): Likewise.
3063         (mono_debugger_extended_notification): Likewise.
3064
3065 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3066
3067         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3068         against both inflated and non-inflated methods. We need to check against the
3069         generic definition for cases where the instantiated method is not visible.
3070         We need to check against the inflated types for cases where the instantiation
3071         changes any super type. This fixes #382986.
3072
3073         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3074         that check for visibiliy as generic params only appears as the type subject
3075         of tokens on call opcodes. Field manipulation and ldftn must always
3076         target an exact type.
3077
3078 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3079
3080         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3081         if no related --security flag is passed.
3082
3083 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3084
3085         * mini-arch.h: Prepare support for ppc64.
3086
3087         Contributed under MIT/X11 license.
3088
3089 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3090
3091         * aot-runtime.c: Prepare support for ppc64.
3092
3093         Contributed under MIT/X11 license.
3094
3095 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3096
3097         * mini-ops.h: Prepare support for ppc64.
3098
3099         Contributed under MIT/X11 license.
3100
3101 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3102
3103         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3104
3105         Contributed under MIT/X11 license.
3106
3107 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3110         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3111         assemblies on windows.
3112
3113 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3114
3115         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3116         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3117         * main.c: Use UTF-8 encoded command line instead of Windows default code
3118         page on Windows to support Unicode.
3119         * driver.c (DllMain): New function for mixed-mode assembly support.
3120         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3121         export __stdcall functions without decoration.
3122
3123         Contributed under MIT/X11 license.
3124
3125 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3126
3127         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3128         saving it very early.
3129
3130 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3131
3132         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3133         deleted.  The only way to access the new RGCTX is via the
3134         trampline.
3135
3136         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3137         vtable instead of the RGCTX to static methods.
3138
3139         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3140         accessing the new RGCTX.
3141
3142         * generic-sharing.c: There is no separation between self, type
3143         arguments and other types in the RGCTX anymore.
3144
3145 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3146
3147         * mini-amd64.c (add_general): Remove previous stack adjustment.
3148         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3149         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3150         for 32 bytes of stack space reserved for all calls.
3151         
3152         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3153         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3154         adjustment.
3155         
3156         Code contributed under MIT/X11 license.
3157
3158 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3159
3160         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3161         against the root definition, peeling out method and type instantiations.
3162         Cache verify success results, code that fails verification is still
3163         checked multiple times.
3164
3165 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3168
3169 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3170
3171         * mini-amd64.c (add_general): Always increment stack on Win64.
3172         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3173         on Win64.
3174         
3175         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3176         stack based argument handling on Win64.
3177         
3178         Code contributed under MIT/X11 license.
3179
3180 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3181
3182         * Makefile.am (version.h): Add support for git-svn.
3183
3184 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3185
3186         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3187         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3188         avoiding allocations and libc functions which might deadlock.
3189         
3190         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3191         'no-gdb-backtrace' option is set.
3192
3193         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3194
3195         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3196
3197 2008-04-21  Martin Baulig  <martin@ximian.com>
3198
3199         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3200         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3201
3202 2008-04-21  Martin Baulig  <martin@ximian.com>
3203
3204         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3205         `thread_vtable', `event_handler_ptr' and `event_handler'.
3206
3207 2008-04-21  Martin Baulig  <martin@ximian.com>
3208
3209         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3210         allows delayed initialization of the `executable_code_buffer' when
3211         attaching.
3212
3213 2008-04-21  Martin Baulig  <martin@ximian.com>
3214
3215         * mini.h (mono_debugger_create_notification_function): Removed.
3216         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3217
3218         * mdb-debug-info64.s
3219         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3220
3221         * mdb-debug-info32.s
3222         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3223
3224         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3225         currently only works on x86 and x86_64, so don't create it on ppc.
3226
3227 2008-04-21  Martin Baulig  <martin@ximian.com>
3228
3229         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3230
3231         * mini.c
3232         (mini_method_compile): In the fp elimination check, check
3233         `debug_options.mdb_optimizations' in addition to
3234         mono_debug_using_mono_debugger().       
3235
3236         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3237         disable some JIT optimizations which are only disabled when
3238         running inside the debugger.
3239         Added `--help-debug' option to describe the debugging options.
3240         (parse_debug_options): New static function to parse the `--debug'
3241         options, so we can easily add more stuff in future.
3242
3243 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3244
3245         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3246         the method has no body.
3247
3248 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3249
3250         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3251         assembly is not allowed in MSVC 64-bit compiler. 
3252         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3253         as we get floating point exceptions everywhere.
3254         
3255         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3256         correctly align arguments for call to throw_exception.
3257         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3258         
3259         Code contributed under MIT/X11 license.
3260
3261 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3262
3263         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3264
3265 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3266
3267         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3268
3269         * mini-amd64.c (NEW_INS): Set cil_code.
3270
3271         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3272         from mini-amd64.c so all debugger related logic is in one place.
3273
3274         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3275         later won't have a random ip assigned to them.
3276
3277 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3280         the arch specific function initializes code_size.
3281         (mono_create_delegate_trampoline): Ditto.
3282
3283         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3284         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3285         platforms.
3286
3287         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3288         running under the debugger.
3289
3290         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3291         debugger.
3292
3293         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3294         debugger. Also move the disabling of optimizations here from driver.c.
3295         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3296         debugger.
3297
3298         * mini.h (MonoCompile): Add a few new flags.
3299
3300 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3301
3302         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3303         so the cil_code field of created MonoInst's is properly set.
3304         (mini_select_instructions): Ditto.
3305
3306         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3307         (MONO_INST_NEW_CALL): Ditto.
3308
3309         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3310         in many places so the ins->cil_code field is properly initialized.
3311
3312         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3313         place.
3314
3315 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3316
3317         * mini.c (mini_method_compile): Print a different message when compiling a 
3318         shared method.
3319         
3320         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3321         > 1.
3322
3323 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3324
3325         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3326         SSE2 instructions.
3327
3328         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3329         
3330 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3331
3332         * mini.c (handle_stack_args): Make this return void since its return value was
3333         never used. Also set cfg->unverifiable for invalid IL instead of calling
3334         G_BREAKPOINT ().
3335
3336 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3337
3338         * mini.c: Make sure "this" is live in catch clauses with type
3339         variables in shared generic code.
3340
3341 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3342
3343         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3344         generic_class_is_reference_type() to ensure the proper behaviour
3345         when sharing generic code and the type in question is a type
3346         argument.
3347
3348 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3349
3350         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3351         race conditions when printing thread dumps. Fixes #377738.
3352
3353 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3354         
3355         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3356         shows up when both MonoInst arguments can cause aliasig.
3357         There is likely no way in the current JIT to trigger this problem, but
3358         it showed up in the development of generics sharing, when in a new
3359         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3360         When the generics sharing code will be committed, its tests will be
3361         valid also for this bug.
3362
3363 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3364
3365         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3366         PATCH_INFO_METHOD.
3367
3368         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3369         NULL.
3370
3371 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3372
3373         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3374         use a more detailed exception message for InvalidCastException.
3375
3376         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3377
3378         * driver.c (mono_main): Add --debug=casts option to turn on better 
3379         InvalidCastException message details.
3380
3381         * mini.c (mini_get_debug_options): New helper function to return the address of
3382         the debug_options variable.
3383
3384         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3385         the jit_tls TLS variable.
3386
3387         * mini.c (mono_jit_tls): New TLS variable.
3388
3389         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3390         option is used.
3391
3392 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3393
3394         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3395
3396         * mini.c: Removed verifer related stuff, code moved to verify.c.
3397
3398         * driver.c: Using code from verify.c instead of mini.c.
3399
3400 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3403         longer valid.
3404
3405 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3406
3407         * mini.c (check_for_method_verify): Enabling verification of
3408         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3409         have been fixed.
3410
3411 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3412
3413         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3414         caller saved registers as well.
3415         
3416         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3417         saved registers as well.
3418
3419 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3422
3423         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3424         code.
3425
3426 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3427
3428         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3429         to get_call_info.
3430         (get_call_info): Take a gsctx argument instead of 'cfg'.
3431
3432 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3433
3434         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3435         mono_verify_all is set.
3436
3437         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3438
3439         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3440
3441 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3444         an exception.
3445
3446         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3447         verifier and the code generated by the compiler.
3448
3449 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3450
3451         * mini.c: Generic sharing of the non-nullable case of the box
3452         instruction.
3453
3454 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3455
3456         * inssel.brg: Fix the build.
3457
3458         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3459
3460 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3461
3462         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3463         Array:Address. Fixes #372410.
3464
3465         * iltests.il.in: New tests for readonly prefix.
3466
3467 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3468
3469         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3470         mini-trampolines.c.
3471
3472         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3473         mini-exceptions.c.
3474
3475         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3476         
3477         * mini.c (mono_decompose_op_imm): New helper function.
3478
3479         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3480         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3481         return value.
3482
3483         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3484         mono_arch_output_basic_block. Fix warnings.
3485
3486         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3487         for now.
3488
3489 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3490
3491         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3492         since the extra frame is now detected automatically inside the loop.
3493
3494         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3495         opts which are now in mono_peephole_ins ().
3496         
3497         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3498
3499         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3500         frames and skip duplicate managed-to-native frames. Fixes #367665.
3501
3502         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3503         opts which are now in mono_peephole_ins ().
3504         (mono_arch_peephole_pass_2): Ditto.
3505
3506         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3507
3508         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3509         arch independent peephole optimizations.
3510
3511         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3512         opts which are now in mono_peephole_ins ().
3513
3514         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3515         
3516         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3517
3518         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3519         pattern.
3520
3521         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3522         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3523         opcode. 
3524
3525 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3528         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3529         return value.
3530
3531         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3532         mono_arch_output_basic_block. Fix warnings.
3533
3534 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3537         conv.ovf.u.un.
3538
3539 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3540
3541         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3542         conv.ovf.u.un.
3543
3544         * iltests.il: Add new tests.
3545
3546 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3547
3548         * mini.c: Removed Windows version macros.
3549
3550 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3551
3552         * generic-sharing.c: Put reflection types in the extensible part
3553         of the runtime generic context.
3554
3555         * mini.c: Generic sharing of the GetTypeHandle special case of the
3556         ldtoken instruction.
3557
3558 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3559
3560         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3561
3562         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3563         
3564         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3565         consistency with the other version on the linear IR branch.
3566
3567         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3568
3569         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3570
3571         * iltests.il.in: Add new tests.
3572
3573 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3574
3575         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3576
3577         * iltests.il.in: Add new tests.
3578
3579 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3580
3581         * mini.c: Two variables with the same name were declared in
3582         nesting contexts and one wasn't initialized.  Fixed.
3583
3584 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3585
3586         * mini.c: Generic sharing of the initobj instruction.
3587
3588 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3589
3590         * mini.c: make the test to optimize ldtoken from typeof() more
3591         precise.
3592
3593 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3594
3595         * mini.c: Generic sharing of the initobj instruction for reference
3596         types.
3597
3598 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3599
3600         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3601         the mono_breakpoint_clean_code() code to perform bound checks.
3602
3603 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3604
3605         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3606         mono_arch_patch_callsite() to include the start of the managed method
3607         to be able to perform bound checks.
3608
3609 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3610
3611         * mini.c: Generic sharing for the isinst instruction.
3612
3613 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3614
3615         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3616         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3617         with the runtime generic context argument.
3618
3619         * mini.c: Share calls to several types of unsharable methods by
3620         putting the address of the method code in the runtime generic
3621         context and doing an indirect call.
3622
3623         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3624         to switches.
3625
3626 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3627
3628         * generic-sharing.c: Change due to a change in the runtime genric
3629         context API.
3630
3631 2008-03-15  Martin Baulig  <martin@ximian.com>
3632
3633         * tramp-x86.c
3634         (mono_arch_nullify_class_init_trampoline): Add call to
3635         mono_breakpoint_clean_code() to make things work when running
3636         inside the debugger.
3637
3638         * tramp-amd64.c
3639         (mono_arch_nullify_class_init_trampoline): Add call to
3640         mono_breakpoint_clean_code() to make things work when running
3641         inside the debugger.
3642
3643 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * inssel-long.brg (reg): Fix 64 bit build.
3646
3647 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3648
3649         * mini.c, mini.h: Share static generic code by passing it an
3650         implicit argument pointing to the runtime generic context.
3651
3652         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3653         inssel-long32-mips.brg: New opcodes for calling shared static,
3654         which need to be passed the runtime generic context.
3655
3656         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3657         argument on the stack in the prologue if needed.  New function for
3658         finding the runtime generic context argument from the registers
3659         saved by the trampoline.
3660
3661         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3662         runtime generic context argument.
3663
3664         * tramp-amd64.c: Also restore the register used for the runtime
3665         generic context argument.
3666
3667         * mini-trampoline.c: Resolve shared static calls by consulting the
3668         runtime generic context via the new argument.
3669
3670         * generic-sharing.c: Add an argument to sharability-checking
3671         functions that specifies whether type variables should be treated
3672         as sharable type arguments.
3673
3674         * inssel-x86.brg: Removed a superfluous, buggy rule.
3675
3676         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3677         to switches.
3678
3679 2008-03-14  Martin Baulig  <martin@ximian.com>
3680
3681         * debug-debugger.c (main_thread_handler): Call
3682         mono_runtime_run_main() without sending any notifications.
3683
3684         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3685
3686 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3687
3688         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3689
3690 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3691
3692         * tramp-x86.c: Fixed register restore offsets in the trampoline
3693         code for ECX and EDX.
3694
3695 2008-03-12  Geoff Norton  <gnorton@novell.com>
3696
3697         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3698         different ucontext_t implementations.
3699         * exceptions-arm.c: Use the above defines to get exceptions working on 
3700         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3701         * mini-arm.c: Implement iPhone icache support (based on a patch by
3702         Luke Howard lukeh@padl.com)
3703
3704 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3705
3706         * mini.c: Enable generic sharing of calls to non-static
3707         non-interface non-generic non-value-type methods.
3708
3709         * mini-trampolines.c: Resolve calls from shared generic code.
3710
3711 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3712
3713         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3714
3715         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3716
3717 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3718
3719         * mini.c: some fixes for the AOT compiler.
3720
3721 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3722
3723         * cpu-amd64.md: Add clob:1 to some float opcodes.
3724
3725 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3726
3727         * mini.h: Added MiniVerifierMode enumeration.
3728
3729         * mini.c: Added mini_verifier_set_mode to control
3730         the usage of the new verifier.
3731
3732         * mini.c (mono_method): Integrated the new verifier.
3733
3734         * driver.c: Extended --security option with validil and
3735         verifiable options to activate the new verifier.
3736
3737 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3738
3739         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3740         optimization to ctors taking 0 or 2 arguments too.
3741
3742         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3743         a bit.
3744
3745         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3746
3747         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3748
3749 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3750
3751         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3752         non-aot case as well.
3753
3754         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3755
3756         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3757         changes.
3758
3759         * aot-compiler.c (encode_patch): Ditto.
3760
3761         * mini.h (G_MININT32): Fix the definition of this.
3762
3763 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3766
3767         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3768
3769 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3772         methods returning vtypes in registers.
3773         (mono_arch_allocate_vars): Ditto.
3774
3775         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3776
3777         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3778
3779         * generics.cs: Add a test from the linear IR branch.
3780
3781         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3782
3783         * mini.c (inline_method): Cache failed inline attempts.
3784
3785 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3786
3787         * mini.c: For shared methods of generic classes put the location
3788         of "this" into the MonoGenericJitInfo.
3789
3790         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3791         register out of a MonoContext by register number.  Add the generic
3792         sharing context as an argument to mono_arch_find_this_argument().
3793
3794         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3795         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3796         for new arch function.
3797
3798         * mini-exception.c: Handle open exception clauses in shared
3799         generic code.
3800
3801         * mini-trampolines.c: Supply additional argument to
3802         mono_arch_find_this_argument().
3803
3804 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * Makefile.am (regtests): Run the bench.exe tests last.
3807
3808 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3809
3810         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3811         a bit.
3812
3813 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3814
3815         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3816         with MS.
3817
3818         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3819         
3820         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3821
3822         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3823         whose class has no cctor.
3824
3825         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3826
3827 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3828
3829         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3830         unverified.
3831
3832 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3833
3834         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3835         to be in sync with the code on the linear IR branch.
3836
3837         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3838
3839         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3840
3841 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3842
3843         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3844
3845         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3846
3847         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3848
3849         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3850
3851         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3852         
3853         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3854         body.
3855
3856 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3857
3858         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3859         OP_LOADR4_MEMBASE emission.
3860
3861         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3862         (mono_spillvar_offset_float): Ditto.
3863
3864         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3865
3866         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3867         emission.
3868
3869         * basic-long.cs: Add regression tests for them.
3870
3871         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3872         use.
3873         (mono_arch_allocate_vars): Fix representation of single-precision float
3874         argument.
3875         (mono_arch_output_basic_block): Ditto.
3876
3877         * inssel-mips.brg: Ditto, remove duplicate items.
3878
3879         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3880         arguments of tail calls as on other platforms.
3881         (mono_arch_output_basic_block): Handle tail calls.
3882
3883         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3884         register.
3885
3886         * objects.cs (test_5_pass_static_struct): Add test for it.
3887
3888         Contributed under MIT/X11 license.
3889
3890 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3891
3892         * Makefile.am: Use gmcs for compiling the regression tests.
3893
3894         * *.2.cs *.2.il: Rename to *.cs and *.il.
3895
3896 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3897
3898         * regalloc.h: Make the vassign array smaller.
3899
3900         * mini.c (mini_method_compile): Remove an unused field in cfg.
3901
3902         * mini-codegen.c: Add a bunch of micro optimizations.
3903
3904 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3905
3906         * regalloc.h: Remove some unused fields.
3907
3908 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3909
3910         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3911
3912         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3913
3914 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3915
3916         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3917
3918         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3919         trampoline: Fetch an entry from the runtime generic context.  If
3920         it's NULL, jump to the actual trampoline to fill the runtime
3921         generic context.  Otherwise, return it.
3922
3923         * mini.c: Call the lazy fetch trampoline to get entries out of the
3924         runtime generic context.
3925
3926         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3927         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3928         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3929
3930 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3931
3932         * mini.c: Fetch data out of the extensible part of the runtime
3933         generic context instead of calling a helper function.
3934
3935         * generic-sharing.c: Some functions moved into
3936         metadata/generic-sharing.c.  Helper function for fetching other
3937         types now checks and asserts against extensible rgctx (just for
3938         debugging purposes - the helper function isn't called anymore
3939         unless for debugging).
3940
3941 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3942
3943         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3944         for tail calls up to the point that the tests in iltests.exe run. Also add a
3945         dummy CKFINITE implementation.
3946         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3947         needed for trampoline LMF frames.
3948
3949         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3950         trampoline LMF frames.
3951
3952 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3953
3954         * mini.c (inline_method): clean any pending loader error when inlining fail.
3955         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3956
3957 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3958
3959         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3960
3961         * aot-runtime.c (decode_patch_info): Ditto.
3962
3963         * mini.c (mono_resolve_patch_target): Ditto.
3964         
3965         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3966         icall wrappers.
3967
3968         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3969         
3970         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3971         if it references an icall address.
3972
3973 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * cpu-s390x.md: Remove some more unused opcodes.
3976         
3977         * cpu-s390x.md: Remove some unused opcodes.
3978
3979         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3980         mono_op_imm_to_op ().
3981
3982         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3983         instead of a switch statement.
3984         
3985         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3986         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3987
3988         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3989         
3990         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3991
3992         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3993         -1.
3994
3995 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3996
3997         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3998         opened. Fixes #362607.
3999
4000         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4001
4002         * iltests.il.in: Add a test for static methods in interfaces.
4003
4004 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4005
4006         * genmdesc.c (build_table): Fix a crash on older glib versions.
4007
4008         * cpu-sparc.md: Remove some unused opcodes.
4009         
4010         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4011         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4012
4013         * cpu-amd64.md: Remove some unused opcodes.
4014
4015         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4016         like the other opcodes.
4017
4018 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4019
4020         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4021
4022         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4023
4024         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4025         variables 'cfg' instead of 'm' for consistency.
4026
4027         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4028
4029         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4030         argument holding the vtype return address, to avoid the ambigious use of
4031         cfg->ret for this purpose.
4032
4033         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4034
4035         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4036         
4037         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4038         new mono_print_ins () function which only takes one argument.
4039
4040 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4041
4042         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4043         macro arguments.
4044
4045 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4046
4047         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4048
4049         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4050
4051         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4052         opcodes and other small changes.
4053
4054         * mini-ops.h: Add some new opcodes from the linear IR branch.
4055
4056         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4057
4058         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4059         opcodes, use the REG_MEMBASE opcodes instead.
4060         
4061         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4062         opcodes, use the REG_MEMBASE opcodes instead.
4063         
4064         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4065         linear IR branch.
4066
4067         * mini.c (mono_op_imm_to_op): New helper function.
4068
4069         * mini-ops.h: Add some opcodes from linear IR branch.
4070
4071 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4072
4073         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4074         <tsv@solvo.ru>.
4075
4076 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4077
4078         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4079         OP_ICONV_TO_R4/R8.
4080
4081         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4082
4083 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * aot-compiler.c (emit_method_code): Add an assert.
4086
4087         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4088         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4089         methods.
4090
4091 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4092
4093         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4094         some load/store opcodes so they are consistent. 
4095         (mono_arch_emit_prolog): Simplify some code.
4096
4097         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4098
4099         * objects.cs: Add tests for large argument offsets on ARM.
4100
4101         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4102         stack offsets. Fixes #359651.
4103
4104         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4105
4106         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4107
4108         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4109
4110         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4111
4112         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4113
4114         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4115         rid of CEE_CONV_R_UN.
4116
4117         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4118
4119 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4120
4121         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4122
4123         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4124
4125         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4126
4127         * cpu-amd64.md: Remove some unused opcodes.
4128
4129         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4130
4131         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4132
4133         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4134         arch specific functions for its parts. Call the peephole pass after local
4135         regalloc so the prolog can compute a more accurate max_offset.
4136         
4137         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4138         the corresponding OP_I/OP_L opcodes.
4139
4140         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4141
4142         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4143
4144 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4145
4146         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4147         as they are handled in mini.c.
4148
4149         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4150         
4151         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4152         case since it is handled in mini.c.
4153
4154         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4155
4156         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4157
4158         * *.c: Use the new opcodes in the IR and back end code.
4159
4160         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4161
4162         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4163
4164 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4165
4166         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4167         an assert because it has a race condition.
4168
4169 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4172
4173         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4174
4175         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4176
4177         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4178         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4179
4180 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4181
4182         * cpu-amd64.md (move): Correct the maximum size of move.
4183
4184 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4185
4186         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4187         the generic class init trampoline to return quickly if the class
4188         is already inited.
4189
4190 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4191
4192         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4193         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4194
4195 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4196
4197         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4198         branch.
4199
4200 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4201
4202         * objects.cs: Add some soft-float tests.
4203
4204         * mini.c: Fix a couple more soft-float issues.
4205
4206         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4207
4208         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4209         avoid a REX prefix.
4210
4211 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4212
4213         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4214         exception happens while compiling a virtual method.
4215
4216 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4217
4218         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4219         
4220         * mini-sparc.c: Fix build.
4221
4222         * mini-sparc.c (get_call_info): Add support for generic sharing.
4223
4224         * mini-exceptions.c: Add a FIXME.
4225
4226 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4227
4228         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4229         altstack handling code.
4230
4231         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4232         
4233         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4234
4235         * mini-s390.c: Add support for generic sharing.
4236
4237         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4238         Fix CAS on s390.
4239         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4240
4241         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4242
4243         * mini-s390x.c: Add support for generic sharing.
4244         
4245         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4246         Fix CAS on ia64.
4247         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4248
4249         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4250         can be used since it takes a 16 bit signed immediate.
4251
4252         * inssel-s390x.brg: Fix OP_SETRET.
4253
4254         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4255
4256         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4257
4258         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4259
4260         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4261
4262         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4263         in one place.
4264
4265         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4266         stuff.
4267
4268         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4269         of the unused mono_arch_patch_delegate_trampoline stuff.
4270
4271 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4272
4273         * basic-long.cs: Move the fp related tests to basic-float.cs.
4274
4275         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4276
4277         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4278
4279         * basic-calls.cs: Add a test for proper float argument passing.
4280
4281         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4282         if the context corresponds to an exception received through a signal.
4283
4284         * exceptions.cs: Add a test for nullref handling at the start of a try
4285         clause.
4286
4287         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4288
4289         * jit-icalls.c (mono_break): New JIT icall.
4290
4291         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4292
4293         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4294
4295 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4296
4297         * cpu-*.md: Get rid of unused opcodes.
4298
4299         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4300
4301         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4302         by all platforms.
4303
4304         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4305         define.
4306
4307         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4308         the arch independent trampoline code in mini-trampolines.c.
4309
4310         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4311
4312         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4313
4314         * mini-s390.h: Remove an unused define.
4315         
4316         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4317         the arch independent trampoline code in mini-trampolines.c.
4318
4319         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4320
4321 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4322
4323         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4324
4325         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4326
4327         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4328
4329         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4330
4331         * cpu-amd64.md: Use smaller sizes for int opcodes.
4332
4333         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4334
4335         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4336         objects.cs.
4337
4338         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4339         debugging.
4340
4341         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4342         instead of though a pointer to save an indirection when accessing elements of
4343         the array.
4344
4345         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4346         some typos.
4347         (NOT_IMPLEMENTED): New helper macro.
4348         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4349         of a bb.
4350
4351         * *.c: Use the new helper macro.
4352
4353 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4354
4355         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4356
4357 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4358
4359         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4360         stack slots.
4361
4362 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4363
4364         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4365         profiling is enabled.
4366         
4367         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4368         the end.
4369         (mono_arch_emit_prolog): Add more first bblock optimizations.
4370
4371         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4372         in order if possible.
4373         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4374         bblock, since the arguments are still in their original registers.
4375
4376         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4377
4378 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4379
4380         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4381         as well.
4382
4383         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4384         offset 0.
4385
4386         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4387
4388         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4389         process async exceptions received while in unmanaged code.
4390
4391         * mini.c (mini_init): Install a callback with the runtime which will be called
4392         when a thread receives an async exception while in unmanaged code.
4393
4394         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4395
4396         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4397
4398 2008-01-16  Wade Berrier  <wberrier@novell.com>
4399
4400         * cpu-g4.md:
4401         * cpu-arm.md:
4402         * cpu-s390x.md:
4403         fix build
4404
4405 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4406
4407         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4408         compilation with sun cc.
4409
4410         * cpu-*.md: Fix the build.
4411
4412         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4413
4414         * mini-amd64.h: Add some comments to the MonoLMF structure.
4415
4416         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4417         
4418         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4419         in the LMF structure if possible. This saves two instructions in the
4420         managed->native wrappers.
4421
4422         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4423
4424 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4425
4426         * generic-sharing.c: New type argument lookup code which uses the
4427         runtime generic context template.
4428
4429 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4430
4431         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4432
4433         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4434         (mono_arch_output_basic_block): Fix localloc implementation.
4435
4436         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4437
4438         * mini-ia64.c (peephole_pass): Fix ia64 build.
4439
4440         * mini-amd64.c (peephole_pass): Fix a warning.
4441         
4442         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4443         at a constant offset from sp/fp.
4444
4445         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4446         instead of obtaining it from *lmf in the managed method case.
4447
4448 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4451
4452 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4453
4454         * mini.h (MonoInstList): New type.
4455         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4456         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4457         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4458         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4459         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4460         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4461         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4462         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4463         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4464         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4465         MONO_INST_LIST_FOR_EACH_ENTRY,
4466         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4467         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4468         mono_inst_list_first, mono_inst_list_last,
4469         mono_inst_list_next, mono_inst_list_prev): New instruction
4470         list handling interfaces.
4471         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4472         list head 'ins_list'.
4473         (MonoInst): Replace next pointer with list head 'node'.
4474         (MonoCallInst): Make 'out_args' a MonoInstList.
4475         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4476         (MonoCompile): Delete reverse_inst_list and
4477         reverse_inst_list_len.
4478         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4479         mono_arch_lowering_pass, mono_arch_local_regalloc,
4480         mono_arch_output_basic_block, mono_arch_emit_prolog):
4481         Convert to new instruction lists.
4482         (insert_after_ins): Delete.
4483         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4484         instruction lists.
4485         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4486         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4487         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4488         mono_emulate_opcode, mono_emit_load_got_addr,
4489         inline_method, mono_method_to_ir, mono_print_bb_code,
4490         print_dfn, decompose_pass, nullify_basic_block,
4491         replace_out_block_in_code, remove_block_if_useless,
4492         merge_basic_blocks, move_basic_block_to_end,
4493         try_unsigned_compare, optimize_branches, mono_print_code,
4494         mini_select_instructions, remove_critical_edges): Likewise.
4495         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4496         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4497         mono_arch_output_basic_block, mono_arch_emit_prolog):
4498         Likewise.
4499         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4500         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4501         mono_arch_output_basic_block): Likewise.
4502         (inst_list_prepend, insert_after_ins): Delete.
4503         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4504         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4505         instruction lists.
4506         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4507         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4508         mono_arch_emit_prolog): Likewise.
4509         * cfold.c (mono_constant_fold): Likewise.
4510         * liveness.c (visit_bb, mono_analyze_liveness,
4511         optimize_initlocals): Likewise.
4512         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4513         * graph.c (mono_draw_code_cfg): Likewise.
4514         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4515         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4516         mono_ssa_cprop): Likewise.
4517         * abcremoval (get_relations_from_previous_bb, process_block):
4518         Likewise.
4519         * local-propagation (mono_cprop_invalidate_values,
4520         mono_local_cprop_bb): Likewise.
4521         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4522         peephole_pass, mono_arch_output_basic_block,
4523         mono_arch_emit_prolog): Likewise.
4524         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4525         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4526         mono_arch_emit_prolog): Likewise.
4527         (insert_after_ins): Delete.
4528         * aliasing.c (print_code_with_aliasing_information,
4529         mono_build_aliasing_information, mono_aliasing_deadce):
4530         Convert to new instruction lists.
4531         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4532         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4533         mono_arch_local_regalloc, mono_arch_output_basic_block):
4534         Likewise.
4535         (insert_after_ins): Delete.
4536         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4537         peephole_pass, mono_arch_output_basic_block): Convert to
4538         new instruction lists.
4539         * mini-codegen (InstList, inst_list_prepend,
4540         insert_after_ins): Delete.
4541         (insert_before_ins, get_register_force_spilling,
4542         get_register_spilling, free_up_ireg, free_up_reg,
4543         create_copy_ins, create_spilled_store, alloc_int_reg,
4544         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4545         to new instruction lists.
4546         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4547         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4548         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4549         (insert_after_ins): Delete.
4550         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4551         mono_arch_local_regalloc, mono_arch_output_basic_block,
4552         mono_arch_call_opcode): Convert to new instruction lists.
4553         (insert_after_ins): Delete.
4554         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4555         peephole_pass, mono_arch_output_basic_block,
4556         mono_arch_emit_prolog): Convert to new instruction lists.
4557
4558 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4559
4560         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4561
4562         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4563         Fixes #353182.
4564
4565         * Makefile.am (version.h): Make this work with non-bash shells.
4566
4567 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4568
4569         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4570
4571 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4572
4573         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4574         the InitializeArray optimization.
4575
4576 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4577
4578         * mini.c driver.c: Don't include os/gc_wrapper.h.
4579
4580 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4581
4582         * mini.c (print_jit_stats): Print GC statistics if available.
4583
4584 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4585
4586         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4587
4588 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4591
4592 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4595         
4596         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4597
4598         * driver.c (mono_main): Ditto.
4599
4600 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4601
4602         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4603
4604         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4605         in the vtable can't be encoded.
4606         (compile_method): Ditto.
4607
4608 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4609
4610         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4611         defined.
4612
4613         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4614         lmf->rbp.
4615
4616         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4617         the top LMF entry belongs to the current method.
4618
4619         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4620
4621 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4622
4623         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4624         
4625         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4626
4627         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4628
4629         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4630
4631         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4632
4633         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4634         implementation.
4635
4636         * basic-float.cs: Add an ulong->double cast test.
4637
4638 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4639
4640         * mini.c (mono_method_to_ir): Fix a warning.
4641
4642 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4643
4644         * mini-ops.h: Add OP_SWITCH.
4645
4646         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4647         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4648
4649 2007-12-11  Geoff Norton  <gnorton@novell.com>
4650
4651         * mini-s390x.c: Minor change to the MAX() define to allow
4652         it to compile with other gcc versions.
4653
4654 2007-12-11  Geoff Norton  <gnorton@novell.com>
4655
4656         * cpu-s390x.md:
4657         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4658
4659 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4660
4661         exceptions-arm.c (mono_arch_get_restore_context): Restore
4662         the frame pointer.
4663
4664         exceptions-arm.c (throw_exception): Save the frame pointer.
4665         This is a partial fix for #323747. Only the client side is
4666         fixed.
4667
4668 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4669
4670         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4671         was using an unrelated variable to log the class which
4672         needed the cctor to be called. This was crashing on arm.
4673
4674 2007-12-09  Robert Jordan  <robertj@gmx.net>
4675
4676         * mini-x86.c (mono_arch_emit_epilog):
4677         Consider all kinds of 64-bit types. Fixes #323114.
4678
4679 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4682
4683 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4684
4685         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4686
4687 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4688
4689         * mini.c: run type ctor before allocating an object, not only
4690         when running it's constructor method (fixes at least part of bug #342507).
4691
4692 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4693         
4694         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4695         
4696         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4697         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4698         function.
4699
4700         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4701         mono_generic_class_init_trampoline () the same as it is done with the other
4702         trampolines.
4703
4704         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4705         aot-runtime.c aot-compiler.c: Implement AOT support.    
4706
4707 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4708
4709         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4710         build for archs which don't have the vtable trampoline defined
4711         yet.
4712
4713 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4714
4715         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4716
4717         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4718
4719         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4720
4721         * tramp-<ARCH>.c: Use the new helper function.
4722
4723 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4724
4725         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4726         trampoline call, which takes a vtable argument.
4727
4728         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4729         OP_TRAMPCALL_VTABLEs like other calls.
4730
4731         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4732         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4733         call.  Implemented a support function which fetches the vtable
4734         from a register set.
4735
4736         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4737         Implemented a generic class init trampoline, using the
4738         OP_TRAMPCALL_VTABLE opcode.
4739
4740         * mini.c: Implemented static field access when sharing generic
4741         code.  This implies initing the class using the new
4742         OP_TRAMPCALL_VTABLE call.
4743
4744 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4745
4746         * mini.c: Don't compile methods with sharing enabled if their
4747         classes are disabled for sharing.
4748
4749 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4750
4751         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4752         opcodes. Fixes #346563.
4753
4754         * objects.cs: Add a new test.
4755
4756         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4757
4758         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4759         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4760
4761 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4762
4763         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4764
4765 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4766
4767         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4768         code stream.
4769
4770 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4771
4772         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4773
4774         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4775         optimization in the AOT case.
4776         
4777 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4780         
4781         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4782
4783         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4784
4785         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4786
4787         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4788         is created by the inlined delegate ctor.
4789
4790         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4791
4792         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4793
4794 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4795
4796         * cpu-x86.md: Fix the length of ckfinite.
4797
4798 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4799
4800         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4801         
4802         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4803         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4804
4805         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4806
4807         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4808         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4809
4810 2007-11-28  Martin Baulig  <martin@ximian.com>
4811
4812         * mini-x86.c
4813         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4814         after creating the trampoline.
4815
4816 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4817
4818         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4819
4820         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4821         the same version.
4822
4823         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4824         instead of the calling method to help AOT.
4825
4826         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4827
4828 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4829
4830         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4831         is defined.
4832
4833 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4834
4835         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4836         
4837         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4838         (encode_method_ref): No need to handle generic method definitions specially.
4839
4840         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4841
4842         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4843         decode_klass_info.
4844
4845         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4846         encode_klass_info.
4847         (compile_method): Enable generic sharing.
4848
4849 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4850
4851         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4852         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4853
4854         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4855         generic code.
4856
4857         * mini-trampolines.c: Fix a warning.
4858
4859         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4860         NEW_PCONST.
4861         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4862         (generic_class_is_reference_type): Remove unused function.
4863
4864         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4865         in the generic vtable trampoline case.
4866
4867         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4868         
4869         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4870         return an AOT method based on a vtable slot.
4871
4872         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4873
4874         * mini.c (mini_get_vtable_trampoline): Export this.
4875
4876 2007-11-22  Martin Baulig  <martin@ximian.com>
4877
4878         * debug-debugger.h
4879         (MonoDebuggerInfo): Move `debugger_version' up.
4880
4881 2007-11-22  Martin Baulig  <martin@ximian.com>
4882
4883         * mini-amd64.c
4884         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4885
4886         * mini-trampolines.c
4887         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4888         after compiling the method.
4889
4890 2007-11-20  Martin Baulig  <martin@ximian.com>
4891
4892         * debug-mini.c
4893         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4894         (mono_debugger_remove_breakpoint): Likewise.
4895         (mono_debugger_check_breakpoints): Likewise.
4896
4897         * debug-debugger.c: Implement the new breakpoint interface here.
4898
4899 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4900
4901         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4902         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4903
4904         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4905
4906 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4907
4908         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4909
4910         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4911         mini.c.
4912
4913         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4914         mini.c.
4915
4916         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4917         returning a vtype in a register.
4918
4919         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4920         here from the arch specific code.
4921
4922         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4923         mini.c.
4924
4925         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4926         (mono_arch_emit_prolog): Increment maximum prolog size.
4927
4928         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4929         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4930
4931         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4932         MonoGenericSharingContext.
4933
4934         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4935         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4936
4937 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4938
4939         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4940         which extract fields out of the runtime generic context.  Full
4941         sharing of the NEWARR opcode.
4942
4943 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4944
4945         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4946         --enable-minimal=ssa.
4947
4948 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4949
4950         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4951         mono_marshal_get_delegate_invoke () signature change.
4952
4953 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4954
4955         * mini.c: Removed the shared context in favor of the generic
4956         sharing context.  Allocate the MonoJitInfo structure with room for
4957         the generic sharing context if it's needed.
4958
4959         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4960         domain-internals.h now.
4961
4962         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4963
4964         * generic-sharing.c: Several changes for working without a shared
4965         context and instead operating on open types instead.
4966
4967 2007-11-12  David S. Miller  <davem@davemloft.net>
4968
4969        * inssel-sparc.brg: Fix double instruction emit.
4970
4971 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4972
4973         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4974         Get/Set/Address methods.
4975         
4976         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4977         mono_marshal_get_delegate_invoke signature change.
4978
4979 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4980
4981         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4982         This can happens with dynamic methods. Fixes the other bug in #322722.
4983
4984 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4985
4986         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4987         BX call sequence.
4988
4989         * mini-arm.c (arm_patch): Implement patching of BX call
4990         sequence. Fixes one of the bugs in #322722.
4991
4992 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4993
4994        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4995        under Linux.  We only need to flush every 32-byte cache line.    
4996
4997 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4998
4999         * mini.c:
5000         move_basic_block_to_end: Add branches when needed, eventually creating
5001         a new BB.
5002         optimize_branches: added a parameter that tells if it's ok to create
5003         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5004         and avoid calling move_basic_block_to_end when it's not ok.
5005         Fixes bug 318677.
5006
5007 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5008
5009         * mini.c: Abort inlining call to InitializeArray if something
5010         looks wrong.  Let the icall handle it, which now has proper safety
5011         checks.
5012
5013 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5014
5015         * mini.c (mono_spill_call): add support for soft-float.
5016
5017         * mini.c (mono_method_to_ir): add support for soft-float
5018         to inlined functions that return float.
5019
5020         * mini.c (mono_method_to_ir): add support for soft-float
5021         to cee_stsfld opcode on float fields.
5022
5023 2007-11-05  Geoff Norton  <gnorton@novell.com>
5024
5025         * mini-x86.h: Fix the structure access for X86 Leopard.
5026
5027
5028 2007-11-05  Martin Baulig  <martin@ximian.com>
5029
5030         * mini-trampolines.c
5031         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5032         after compiling the method to notify the debugger.
5033
5034 2007-11-05  Martin Baulig  <martin@ximian.com>
5035
5036         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5037
5038 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5039
5040         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5041         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5042
5043 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5044
5045         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5046         native-to-managed wrappers.
5047         
5048 2007-11-01  Geoff Norton  <gnorton@novell.com>
5049
5050         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5051         members.
5052
5053 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5054
5055         * mini.c, mini-x86.c: when getting back from unmanaged code
5056         to managed via a marshaled delegate we also need to set the
5057         right domain.
5058
5059 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5060
5061         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5062         for amd64.
5063
5064 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5065
5066         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5067         let the debugger or other external agents to tell the JIT when
5068         a sw breakpoint has been inserted in the code that the JIT needs
5069         to be able to inspect.
5070
5071 2007-10-31  Martin Baulig  <martin@ximian.com>
5072
5073         * debug-debugger.h
5074         (MonoDebuggerInfo): Remove `runtime_class_init'.
5075
5076 2007-10-30  Martin Baulig  <martin@ximian.com>
5077
5078         * debug-mini.h
5079         (mono_debugger_thread_created): Added `MonoThread *' argument.
5080         (mono_debugger_extended_notification): New public method.
5081         (mono_debugger_trampoline_compiled): New public method.
5082
5083         * debug-mini.c
5084         (MonoDebuggerThreadInfo): Added `thread' and
5085         `extended_notifications' fields.
5086
5087         * debug-debugger.c
5088         (debugger_executable_code_buffer): New static variable.
5089
5090         * debug-debugger.h
5091         (MonoDebuggerInfo): Added `executable_code_buffer',
5092         `executable_code_buffer_size', `breakpoint_info_area',
5093         `breakpoint_table' and `breakpoint_table_size'.
5094
5095 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5096
5097         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5098         that IP  either is an unused value or the vtable pointer. IMT 
5099         calls use vtable + offset now. Reduced by almost half the size
5100         of IMT entries.
5101
5102 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5103
5104         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5105         defines to access param registers. Replace long usage with
5106         gsize as sizeof(long) != sizeof(void*) on Win64.
5107
5108         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5109         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5110         instead of non-existant _GetAddressOfReturnAddress.
5111
5112         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5113         param registers. Save/restore %rdi and %rsi in MonoLMF.
5114
5115         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5116         param registers. Modify (throw_exception) signature to take 
5117         %rdi and %rsi on Win64. 
5118
5119         Code is contributed under MIT/X11 license.
5120
5121 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5122
5123         * helpers.c: unlink debugging output files.
5124
5125 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5126
5127         * mini.c: Move mono_create_ftnptr () to object.c.
5128
5129 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5130
5131         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5132         optional. This function can now be used to disassemble code generated
5133         outside the JIT such as trampolines and IMT thunks.
5134
5135         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5136
5137         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5138         vtable pointer from a ldr instruction.
5139
5140         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5141         new IMT call sequence.
5142
5143         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5144         call sequence for interface invocations.
5145
5146         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5147         for imt support. This function is empty since IMT on ARM requires no
5148         special handling on the IR side.
5149
5150         * mini-arm.c (mono_arch_find_imt_method): added, required for
5151         imt support.
5152
5153         * mini-arm.c (mono_arch_find_this_argument): added, required
5154         for imt support.
5155
5156         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5157         a ldr instruction to load a value stored in the code stream.
5158
5159         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5160         for imt support.
5161
5162
5163 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5164
5165         * mini.c (mini_init): Install the jump trampoline callback.
5166
5167 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5168
5169         * mini-trampolines.c: handle synchronized methods with the common
5170         vtable trampoline (bug #335601).
5171
5172 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5175
5176         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5177         64 bit platforms.
5178
5179         * mini-ia64.h mini-ia64.c: Add support for IMT.
5180
5181         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5182         prolog. Fixes #331958.
5183
5184 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5185
5186         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5187
5188 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5189
5190         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5191         trampoline.
5192
5193 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5194
5195         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5196         trampoline.
5197
5198 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5199
5200         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5201         trampoline.
5202
5203 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5204
5205         * mini-trampolines.c: changed the magic rampoline to understand
5206         the common vtable trampoline method: the method to invoke is
5207         determined by the vtable displacement of the call.
5208
5209 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5210
5211         * mini.c, mini.h: register the common vtable trampoline if the
5212         architecture supports it.
5213
5214 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5215
5216         * cpu-amd64.md: use the correct max length for tls_get.
5217
5218 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5219
5220         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5221         CEE_STELEM_ANY. Fixes #333696.
5222
5223 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5224
5225         * exceptions-x86.c: provide more graceful handling of the case where
5226         we followed a bogus function pointer from managed code (bug #332866).
5227
5228 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5229
5230         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5231         replaces the generic_shared flag and will carry more information
5232         in the future.
5233
5234         * generic-sharing.c: Added mini_type_stack_size() which allows
5235         allows open types if given a generic sharing context.
5236         mini_get_basic_type_from_generic() takes a
5237         MonoGenericSharingContext* instead of a MonoCompile* now.
5238
5239         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5240         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5241         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5242         changes above.  Just passing arguments through to the right
5243         places.
5244
5245 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5246
5247         * mini-arm.c: unify the call emission to emit_code_seq().
5248
5249 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5250
5251         * tramp-arm.c: reduced the trampoline size.
5252
5253 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5254
5255         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5256         variable handling out of arch-specific code.
5257
5258 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5259
5260         * mini-arm.c: implemented fast delegate dispatch.
5261
5262 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5263
5264         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5265         that fp elimination is turned off if the space required by locals is too
5266         big. Fixes #331958.
5267
5268 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5269
5270         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5271         ARM to the new style trampoline.
5272
5273 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5274
5275         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5276
5277         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5278
5279 2007-10-09  Martin Baulig  <martin@ximian.com>
5280
5281         * debug-debugger.h
5282         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5283         `field_info_offset_offset'.     
5284
5285 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5286
5287         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5288         removed more internal usage of the r11 register and made it available
5289         to the register allocator.
5290
5291 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5292
5293         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5294         when sharing generics and treat type variables as references.
5295
5296 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5297
5298         * mini-ppc.c: started removing the internal uses of register r11
5299         to eventually allow the register allocator to manage it as an
5300         additional available register.
5301
5302 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5303
5304         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5305
5306 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5307
5308         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5309         specific trampolines as they are not performance critical as a jump
5310         target (maybe align as before only for AOT code?). This saves about
5311         200 KB of native code on x86 for monodevelop startup.
5312
5313 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5314
5315         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5316         monodevelop startup.
5317
5318 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5319
5320         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5321
5322         * mini-sparc.h mini-sparc.c: Implement IMT support.
5323
5324         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5325         its smaller and doesn't clobber sparc_g1.
5326
5327         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5328
5329 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5330
5331         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5332
5333 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5334
5335         * mini-ppc.c: implemented fast delegate invocation.
5336
5337 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5338
5339         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5340
5341 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5342
5343         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5344         code to the new style trampoline in preparation for IMT support.
5345
5346 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5347
5348         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5349         systems already. This also reduces the specific trampiline sizes and
5350         prepares for the use of r12 as the IMT identifier register.
5351
5352 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5353
5354         * mini-mips.h: endianess fix (simplified from a patch by
5355         Thomas Kunze <thommy@tabao.de>, bug #323737).
5356
5357 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5358
5359         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5360         to access ucontext fields and enable netbsd support
5361         (partially from Magnus Henoch <mange@freemail.hu>).
5362
5363 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5364
5365         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5366         use the preprocessor from the CPP env var if it is set.
5367
5368 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5369
5370         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5371         code, before interface_offset gets used.
5372
5373 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5374
5375         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5376         mono_class_setup_vtable () before accessing klass->vtable.
5377
5378 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5381         hackish.
5382
5383 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5384
5385         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5386         IMT slots (this saves hundreds of KB of memory in programs like
5387         IronPython and Monodevelop).
5388
5389 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5390
5391         * mini.c: print the delegate counter.
5392
5393 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5394
5395         * mini-x86.c: make it easier to enable the debugging code for IMT
5396         slots.
5397
5398 2007-09-28  Martin Baulig  <martin@ximian.com>
5399
5400         * debug-debugger.h
5401         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5402         `mono_method_klass_offset' and `mono_method_token_offset'.
5403
5404 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5405
5406         * mini.c: First generics sharing implementation.  Can only share
5407         in very simple cases.  If sharing doesn't work it falls back to
5408         dedicated compilation.
5409
5410         * mini.h: Flag in MonoCompile to specify whether generic
5411         compilation is shared.  Flags enum for marking which generic inst
5412         of a context is used.  Prototypes for helper functions.
5413
5414         * generic-sharing.c: Helper functions for generic method sharing.
5415
5416         * optflags-def.h: Optimization flag (gshared) for enabling generic
5417         method sharing added.
5418
5419         * Makefile.am: generic-sharing.c added.
5420
5421 2007-09-19 Daniel Nauck <dna@mono-project.de>
5422
5423         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5424
5425 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5426         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5427         fixes bug 325507.
5428
5429 2007-09-19  Martin Baulig  <martin@ximian.com>
5430
5431         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5432         mono_debug_cleanup() is now part of mono_cleanup().
5433
5434 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5435
5436         * driver.c (mono_main): Fix a warning.
5437
5438 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5439
5440         * aot-compiler.c: Optimize various parts when processing large assemblies.
5441         Fixes ##325568.
5442
5443         * mini.c (mono_patch_info_hash): Improve hash function.
5444
5445 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5446
5447         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5448         
5449         Code is contributed under MIT/X11 license.
5450
5451 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5452
5453         * mini.c (mini_init): Fix a leak.
5454
5455         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5456
5457 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5458
5459         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5460
5461 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5462
5463         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5464
5465 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5466
5467         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5468         variance tests.
5469
5470         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5471
5472         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5473
5474         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5475
5476         * aot-runtime.c (decode_patch_info): Ditto.
5477
5478 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5479
5480         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5481         static case. Cache delegates in architecture specific code, 
5482         based on number of parameters.
5483         
5484         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5485         in architecture specific code, based on number of parameters.
5486         
5487         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5488         caching happen in architecture specific code now.
5489         
5490         Code is contributed under MIT/X11 license.
5491
5492 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5493
5494         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5495         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5496         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5497
5498         Code is contributed under MIT/X11 license.
5499
5500 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5501         * mini.c: (mono_thread_abort) Fixed bug #82416.
5502
5503 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5504
5505         * mini.: hook the new managed GC allocation feature into the JIT.
5506
5507 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5508
5509         * mini.c: implementation for the new runtime tls opcode.
5510
5511 2007-09-11  Martin Baulig  <martin@ximian.com>
5512
5513         * debug-debugger.h
5514         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5515         `mono_method_inflated_offset'.
5516
5517 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5518
5519         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5520         async exceptions into a method.
5521
5522         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5523         purpose of testing whenever the unwinder works at every instruction.
5524
5525 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5526
5527         * mini.c: check accessibility of method used in ldftn (fixes
5528         bug #82635).
5529
5530 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5531
5532         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5533
5534         * inssel.brg: Fix a warning.
5535
5536 2007-09-03  Martin Baulig  <martin@ximian.com>
5537
5538         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5539         now takes the `main_method' as argument.
5540
5541 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5542
5543         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5544
5545 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5546
5547         * driver.c: include the cil-coff.h header on Windows.
5548         
5549         Code is contributed under MIT/X11 license.
5550
5551 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5552
5553         * mini.c, driver.c: don't include the cil-coff.h header.
5554
5555 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5556
5557         * mini.c: flag places that needs fixes fo soft-float support.
5558
5559 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5560
5561         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5562         endian systems (partially from Dean Jenkins, bug #81924).
5563
5564 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5565
5566         * mini.c (check_linkdemand): Remove embedded reference object in
5567         call to LinkDemandSecurityException.
5568         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5569         with an IntPtr instead of a reference object.
5570
5571 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * mini.c (handle_initobj): Handle alignment properly.
5574
5575         * inssel.brg (mini_emit_memset): Ditto. 
5576
5577         * inssel.brg (mini_emit_memcpy): Ditto. 
5578
5579         * inssel-sparc.brg: Ditto.              
5580
5581         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5582
5583 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5584
5585         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5586         exceptions raised in unmanaged code. Fixes part of #82594.
5587
5588 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5589
5590         * mini.c (mono_method_to_ir), declsec.c
5591         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5592
5593 2007-08-22  Martin Baulig  <martin@ximian.com>
5594
5595         * debug-mini.h
5596         (MonoDebuggerThreadInfo): New typedef.
5597         (mono_debugger_thread_table): New global variable.
5598         (mono_debugger_thread_created): New public function.
5599         (mono_debugger_thread_cleanup): New public function.
5600
5601         * debug-debugger.h
5602         (MonoDebuggerInfo):
5603         - removed `get_current_thread' and `lookup_assembly'.
5604         - removed `data_table'.
5605         - added `thread_table'.
5606
5607         * mini.c
5608         (mono_thread_start_cb): Call mono_debugger_thread_created().
5609         (mono_thread_attach_cb): Likewise.
5610         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5611         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5612         initial domain.
5613
5614         * driver.c (mono_main): Move mono_debug_init() up, before calling
5615         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5616
5617 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5618
5619         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5620         together when passing several arguments of type double (gives a small
5621         speedup and saves a few bytes of generated code).
5622
5623 2007-08-20  Jb Evain  <jbevain@novell.com>
5624
5625         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5626
5627 2007-08-20  Jb Evain  <jbevain@novell.com>
5628
5629         * mini.c (mono_method_to_ir): throw MethodAccessException
5630         and FieldAccessException instead of InvalidProgramException.
5631
5632 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5633
5634         * mini.c: CoreCLR security checks.
5635
5636         * mini.h: Removed MonoSecurityMode (moved to
5637         metadata/security-manager.h) and mono_security_mode global var
5638         (replaced by set/get functions in security-manager.h).
5639
5640         * driver.c: Added "core-clr-test" security mode for testing.  Used
5641         set-function for setting security mode.
5642
5643 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5644
5645         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5646         the new jit_info_table.
5647
5648         * driver.c: Test code for the new jit_info_table (enabled by the
5649         define MONO_JIT_INFO_TABLE_TEST).
5650
5651 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5652
5653         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5654         detection of call <REG> instruction sequence. Fixes build on freebsd.
5655
5656 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5657
5658         * mini-exceptions.c: Fix a warning.
5659
5660 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5661
5662         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5663         stack overflow handling code on amd64 too.
5664
5665         * mini-exceptions.c (mono_setup_altstack): Make this use 
5666         mono_thread_get_stack_bounds ().
5667
5668         * mini-x86.h: Disable sigaltstack on solaris x86.
5669
5670 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5673
5674 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5675
5676         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5677
5678 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5679
5680         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5681
5682         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5683
5684 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5685
5686         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5687         due to alignment.
5688
5689 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5690
5691         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5692         to be emitted (bug #82281).
5693
5694 2007-08-01  Martin Baulig  <martin@ximian.com>
5695
5696         Merged the `debugger-dublin' branch.
5697
5698         * debug-debugger.h (MonoDebuggerInfo):
5699         Removed the `old_*' compatibility entries.
5700         Added `debugger_version' and `data_table'.
5701         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5702         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5703
5704         * debug-mini.c
5705         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5706         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5707         instead of a `gconstpointer'.
5708         (mono_debugger_insert_method_breakpoint): Return a
5709         `MonoDebugMethodAddressList *'.
5710
5711 2007-06-28  Martin Baulig  <martin@ximian.com>
5712
5713         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5714
5715 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5716
5717         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5718         __builtin_frame_address () since it is broken on older gcc versions.
5719
5720 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5721
5722         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5723         on the stack overflow handling and made the managed stack overflows
5724         catchable in most cases using soft guard pages.
5725         * exceptions-x86.c: added code to restore the protection in the soft
5726         guard pages at the end of exception handling.
5727
5728 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5729
5730         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5731
5732 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5733
5734         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5735         exception handling.
5736
5737 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5738
5739         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5740         signal handling support until it has been ported to the new mechanism.
5741         * mini.c: fixed stack overflow detection and use the new
5742         architecture code  to handle signals on the altstack.
5743
5744 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5745
5746         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5747         stack overflows on the alt stack.
5748
5749 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5750
5751         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5752         stack overflows on the alt stack.
5753
5754 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5755
5756         * exceptions-ppc.c: cleanup preparing for altstack support.
5757
5758 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5759
5760         * exceptions-arm.c: cleanup preparing for altstack support.
5761
5762 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5763
5764         * mini.c (print_jit_stats): Output hazard pointer stats.
5765
5766 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5767
5768         * driver.c, mini.c: Replaced security mode flags with a single
5769         enum variable.
5770
5771 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5772
5773         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5774
5775 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5776
5777         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5778         (which doesn't do anything yet) for activating Core CLR
5779         (Silverlight) security.
5780
5781 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5782
5783         * mini-codegen.c: work around a possible gcc bug on arm.
5784
5785 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5786
5787         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5788         message for platforms that don't support AOT compilation.
5789
5790 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5791
5792         * mini.h, mini.c, driver.c: temporary smcs hack.
5793
5794 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5795
5796         * mini-arm.h, mini-arm.c: arm EABI fixes.
5797
5798 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5799
5800         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5801         case.
5802
5803         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5804         trampolines taking a method argument.
5805
5806         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5807
5808         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5809         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5810
5811         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5812         JIT compilation throws an exception. Fixes #82050.
5813
5814 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5815
5816         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5817         with the MONO_EXCEPTION_ defines.
5818
5819 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5820
5821         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5822         #82117.
5823         
5824         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5825         the cause of an assertion.
5826
5827 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5828
5829         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5830         removed.
5831
5832 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5833
5834         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5835         assert. Should fix #82103.
5836
5837 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5838
5839         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5840         here too. Fixes #82095.
5841
5842         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5843         addresses.
5844
5845         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5846
5847         * mini-amd64.h: Enable IMT for amd64.
5848         
5849         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5850
5851 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5852
5853         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5854
5855 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5856
5857         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5858         as soon as check_linkdemand sets an exception_type.
5859
5860 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5861
5862         * mini-x86.c: fixed offsets for IMT call sequence.
5863         * mini-x86.h: enable IMT again.
5864
5865 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5866
5867         * trace.c (mono_trace_enter_method): Decode MonoType too.
5868
5869         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5870
5871         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5872
5873         * mini-amd64.c: Add preliminary IMT implementation.
5874         
5875 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5876
5877         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5878         understand the new IMT-base interface invocation (thanks to
5879         Daniel Nauck for the report and the remote debugging session).
5880
5881 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5882
5883         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5884
5885 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5886
5887         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5888
5889 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5890
5891         * mini-trampolines.c: implement AOT IMT support.
5892         * mini-x86.h: enable IMT support for wider testing.
5893
5894 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5895
5896         * inssel.brg (emit_imt_argument): Add aot support here.
5897
5898         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5899
5900 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5901
5902         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5903         of the IMT implementation, partially from massi, with my
5904         implementation of the bsearch sequence. Disabled by default until
5905         the AOT code is implemented.
5906
5907 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5908
5909         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5910
5911         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5912
5913 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5914
5915         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5916         arch-independent IMT JIT code from Massimiliano
5917         Mantione (massi@ximian.com) with small cleanups from me.
5918
5919 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5920
5921         * Makefile.am: fix svn invocation to get the svn revision to be
5922         independent of the local language (build fix).
5923
5924 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5925
5926         * mini.c (inline_method): Reset cfg->exception_type if the
5927         inlining is aborted.  Fixes: 82049.
5928
5929 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5930
5931         * mini.c: remove assert from exception handling code when exception_ptr
5932         is not set.
5933
5934 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5935
5936         * mini.c (mono_codegen): Add an assert.
5937
5938         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5939         enter and leave code.
5940         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5941
5942 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5943
5944         * mini-ppc.c: fixed memory corruption for localloc(0)
5945         (bug #81852).
5946
5947 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5948         
5949         * mini.c: Fix warnings.
5950
5951 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5952
5953         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5954         to emit better double->int conversions.
5955
5956 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5957
5958         * mini.c: the provided Min/Max optimizations are valid for unisgned
5959         ints.
5960
5961 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5962
5963         * 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
5964
5965 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5966
5967         * mini.c (mono_running_on_valgrind): Add support for reporting the
5968         method and  its boundaries to valgrind.
5969
5970 2007-06-28  Martin Baulig  <martin@ximian.com>
5971
5972         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5973
5974 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5975
5976         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5977
5978         * generic.2.cs: Add new test case.
5979
5980 2007-06-25  Martin Baulig  <martin@ximian.com>
5981
5982         Merged the `debugger-dublin' branch.
5983
5984         * debug-mini.c
5985         (mono_debugger_insert_method_breakpoint): New public method.
5986         (mono_debugger_remove_method_breakpoint): Likewise.
5987         (mono_debugger_check_breakpoints): New static method.
5988         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5989
5990         * debug-debugger.h (MonoDebuggerInfo):
5991         Renamed (to keep backward compatibility in the vtable):
5992         `insert_breakpoint' -> `old_insert_breakpoint'.
5993         `remove_breakpoint' -> `old_remove_breakpoint'.
5994         `create_string' -> `old_create_string'.
5995         `lookup_class' -> `old_lookup_class'.
5996         `lookup_type' -> removed; changed into a dummy field.
5997         `lookup_assembly' -> `old_lookup_assembly'.
5998         Added (same functionality, but different signature):
5999         `create_string', `lookup_class', `lookup_assembly'
6000         Added new:
6001         `get_method_addr_or_bpt', `remove_method_breakpoint',
6002         `runtime_class_init'.
6003
6004         * debug-debugger.c: Merged the `debugger-dublin' branch.
6005
6006 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6007
6008         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6009         well.
6010         (peephole_pass): Likewise.
6011
6012 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6013
6014         * driver.c: hopefully make setaffinity work also for ancient
6015         versions of linux.
6016
6017 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6018
6019         * driver.c : win32 build fix.
6020
6021 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6022
6023         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6024         processor if it is set.
6025
6026 2007-06-21  Martin Baulig  <martin@ximian.com>
6027
6028         * debug-mini.h: New file.
6029
6030         * debug-mini.c
6031         (mono_debugger_insert_breakpoint_full): Moved here from
6032         ../metadata/mono-debug-debugger.c.
6033         (mono_debugger_remove_breakpoint): Likewise.
6034         (mono_debugger_breakpoint_callback): Likewise.
6035
6036 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6037
6038         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6039         changes in MonoGenericClass.
6040
6041 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6042
6043         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6044
6045 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6046
6047         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6048         removal of MonoGenericMethod.
6049
6050 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6051
6052         * mini-exceptions.c: hooks for the exception events profiling API.
6053
6054 2007-06-14  Randolph Chung  <tausq@debian.org>
6055
6056         * Makefile.ma: Add hppa target.
6057         * mini-arch.h: Include mini-hppa.h
6058         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6059         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6060         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6061
6062 2007-06-14  Randolph Chung  <tausq@debian.org>
6063
6064         * inssel.brg: Add rules for "chained" compare-branch operations so that
6065         a single compare op can affect multiple branches.  Adjust cost for
6066         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6067         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6068         cost for some rules so that they can more easily be overridden by
6069         per-arch rules (with fixes from lupus).
6070         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6071
6072 2007-06-13  Randolph Chung  <tausq@debian.org>
6073
6074         * mini-ops.h: Reorder branch ops so that they match the order of the
6075         corresponding CEE_* ops.  The code expects them this way.
6076         Add new ops for HPPA target.
6077         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6078
6079 2007-06-13  Randolph Chung  <tausq@debian.org>
6080
6081         * mini-exceptions.c: Handle cases where the stack grows towards
6082         larger addresses.
6083         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6084
6085 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6086
6087         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6088         counter.
6089         * driver.c: explain where a non-matching corlib is found.
6090
6091 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6092
6093         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6094
6095 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6096
6097         * mini-exceptions.c: Generate a method profile leave event during
6098         an exception to ensure that the profiler gets notified.
6099
6100 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6101
6102         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6103         branch.
6104
6105         * cpu-amd64.md: Add long_and/or/xor opcodes.
6106
6107 2007-06-06  Wade Berrier  <wberrier@novell.com>
6108
6109         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6110         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6111         length of instruction shr_imm (expected 8, got 10)
6112
6113 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6114
6115         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6116
6117 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6118
6119         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6120         MonoInternalHashTable again (fixed bug in the internal hash table
6121         code).
6122
6123 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6124
6125         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6126         Have to figure out what makes it crash the SWF regression.
6127
6128 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6129
6130         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6131
6132 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6133
6134         * mini.c: optimize out the type check when storing null in a
6135         reference array.
6136
6137 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6138
6139         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6140         MonoInternalHashTable.
6141
6142 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6143
6144         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6145         signed integer methods.
6146
6147 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6148
6149         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6150         permanently since the current approach doesn't work.
6151
6152 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6153
6154         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6155         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6156
6157 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6158
6159         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6160         the sreg2==rdx case.
6161         
6162         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6163         account if it contains a rex prefix.
6164         (peephole_pass): Handle OP_FMOVE as well.
6165
6166 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6167
6168         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6169         as it causes regressions.
6170
6171 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6172
6173         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6174         static case as well.
6175
6176         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6177
6178         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6179         (mono_arch_get_this_arg_from_call): Ditto.
6180
6181         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6182
6183         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6184         invoke_impl field.
6185
6186         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6187         (mono_arch_get_this_arg_from_call): Ditto.
6188
6189         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6190         
6191         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6192         try to create optimized invoke code and use that for further invocations. 
6193         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6194
6195         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6196
6197 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6198
6199         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6200         sealed classes or methods.
6201         *devirtualization.cs: tests for the new optimization
6202
6203 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6204
6205         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6206         by the update_volatile () function.
6207
6208 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6209
6210         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6211         require it.
6212
6213         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6214
6215 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6216
6217         * mini.c: Add configure checks for header files.
6218         * mini-x86.c: Add configure checks for header files.
6219         * trace.c: Add configure checks for header files.
6220         * aot-runtime.c: Add configure checks for header files.
6221         * aot-compiler.c: Add configure checks for header files.
6222         * driver.c: Add configure checks for header files.
6223         * mini-codegen.c: Add configure checks for header files.
6224         
6225         Code is contributed under MIT/X11 license.
6226
6227 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6228
6229         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6230         icompare_imm -128 + op_iclt. Fixes #81703.
6231
6232 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6233
6234         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6235
6236 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6237
6238         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6239         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6240         so that all isinst checks now use "interface_bitmap".
6241
6242 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6243
6244         * cpu-amd64.md (jmp): Fix a warning.
6245
6246         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6247
6248         * basic.cs: Add new regression test.
6249
6250         * basic.cs: Remove test which is now in basic-long.cs.
6251
6252         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6253
6254         * basic-long.cs: Add new test.
6255         
6256 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6257
6258         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6259
6260 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6261
6262         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6263
6264         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6265         places.
6266         
6267         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6268         throwing code a bit.
6269
6270         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6271         the exception throwing code a bit.
6272
6273         * mini-x86.c (get_call_info): Allocate result from a mempool.
6274
6275 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6276
6277         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6278
6279         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6280
6281         * mini.h (MonoCompile): Add 'token_info_hash' field.
6282
6283         * mini.c: Save token->method associations during compilation so the AOT 
6284         compiler can use it.
6285         
6286         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6287         which reference generic classes and methods.
6288
6289 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6290
6291         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6292
6293         * aot-compiler.c (compile_method): Fix a typo in a comment.
6294
6295         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6296
6297         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6298         everything generic.
6299
6300         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6301
6302 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6303
6304         * mini.h (MonoCompile): Add 'args' field.
6305
6306         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6307         into cfg->args.
6308
6309         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6310
6311 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6312
6313         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6314
6315         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6316
6317         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6318         opcodes for some opcodes.
6319
6320         * mini.h *.brg *.c: Use the new opcodes.
6321
6322 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6323
6324         * mini.h: Bumped aot revision.
6325
6326         * inssel.brg: modified code generation of type checks for interfaces
6327         to use the new "MonoClass.interface_bitmap" instead of the old
6328         "MonoClass.interface_offsets".
6329
6330 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6331
6332         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6333
6334 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6335
6336         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6337         64 bit platforms.
6338
6339 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6340
6341         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6342
6343 2007-04-27  Wade Berrier  <wberrier@novell.com>
6344
6345         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6346         mini.h) to fix build.
6347
6348 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6349
6350         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6351         
6352         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6353         causes the corlib unit tests to fail.
6354
6355 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6356
6357         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6358
6359         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6360
6361         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6362         opcodes to the comparison relations.
6363
6364         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6365         opcodes to their types.
6366         
6367         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6368
6369         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6370         it in cfg->arch.cinfo.
6371
6372         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6373
6374         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6375         cfg->cil_offset_to_bb.
6376
6377 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6378
6379         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6380         created becase of initlocals.
6381
6382 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6383
6384         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6385         Sergey Tikhonov <tsv@solvo.ru>.
6386
6387 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6388
6389         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6390
6391 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * cpu-s390.md (break): Correct the length of break instruction.
6394
6395 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6396
6397         * mini.c: fix a couple of soft-float issues and comments.
6398
6399 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6400
6401         * trace.c (is_filenamechar): - is also a filename char.
6402
6403 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6404
6405         * mini-s390.c: Correct checking for enum type in return value processing.
6406
6407 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6408
6409         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6410         (version.h): Makefile is in the build directory.
6411
6412 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6413
6414         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6415
6416 2007-04-11  Martin Baulig  <martin@ximian.com>
6417
6418         * mini.c (can_access_member): Fix handling of generic classes;
6419         fixes #81259.
6420
6421 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6422
6423         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6424
6425 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6426
6427         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6428
6429 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6430
6431         * mini-codegen.c: make sure the right spill amount is
6432         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6433
6434 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6435
6436         * mini-ppc.c: fixes for the fp_branch_nan test.
6437
6438 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6439
6440         * basic.cs: Comment out new test which still fails on ia64.
6441
6442 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6443
6444         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6445
6446 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6447
6448         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6449
6450 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6451
6452         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6453         on 64 bit machines. Fixes part of #80738.
6454
6455         * basic.cs: Add regression test.
6456
6457 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6458
6459         * inssel.brg basic.cs: Revert previous change to fix build.
6460
6461         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6462         platforms.
6463         
6464         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6465
6466         * basic.cs: Add new regression test.
6467
6468 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6469
6470         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6471         many arguments.
6472
6473 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6474
6475         * cpu-s390x.md: Correct length of break instruction.
6476
6477 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6478
6479         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6480         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6481
6482 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6483
6484         * *.c: Begin WIN64 port.
6485         * mini.c:  Use correct register in profiler.
6486         * mini-amd64.c: No inline assembly on Win64.
6487         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6488         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6489         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6490         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6491         mono_arch_ip_from_context for Win64.
6492         
6493         Contributed under MIT/X11 license.
6494
6495 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6496
6497         * exceptions-amd64.c (seh_handler): Ditto.
6498
6499         * exceptions-x86.c (seh_handler): Fix a memory leak.
6500
6501 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6502
6503         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6504         mini-s390x.c: fixed peephole optimizations to deal
6505         correctly with 1 and 2 byte reload avoidance.
6506
6507 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6508
6509         * cpu-s390.md, cpu-s390x.md: update localloc length.
6510
6511 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6512
6513         * cpu-g4.md: added missing descriptions.
6514
6515 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6516
6517         *  Makefile.am: Add support so the tail tests are not executed on
6518         PowerPC as that is a known limitation of the PowerPC port.
6519
6520 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6521
6522         * runmdesc.bat:  Move to msvc directory.
6523         
6524 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6525
6526         * runmdesc.bat:  Run executable that was produced by the current
6527         target and sent via an argument.
6528         
6529 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6530
6531         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6532         #81102.
6533
6534         * generics.2.cs: Add regression test.
6535
6536 2007-03-09  Wade berrier  <wberrier@novell.com>
6537
6538         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6539
6540 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6541
6542         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6543         AOT code depends on this.
6544
6545 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6546
6547         * mini.c: more precise tracking of types in the eval stack
6548         (part of fix for bug #81044).
6549
6550 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6551
6552         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6553
6554         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6555
6556 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6557
6558         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6559
6560         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6561
6562 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6563
6564         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6565         a pointer on 64 bit systems. Fixes #80190.
6566
6567         * iltests.il: Add new regression test.
6568
6569 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6570
6571         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6572
6573 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6574
6575         * trace.c: Remove an erroneous alignemnt check when tracing.
6576           Fixes --trace on OSX86.
6577
6578 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6579
6580         * mini-$(arch).h: initialize SP in context for all the archs.
6581
6582 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6583
6584         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6585         regressions in the thread tests.
6586
6587 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6588
6589         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6590         - fixed implementation of LOCALLOC opcode
6591         - implemented non-un compare for floats
6592         - code cleanup
6593         - implementation of FDIV and CKFINITE opcodes
6594         - fixes for latest mono updates
6595         - additional arch opcodes
6596
6597 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6598
6599         * Makefile.am: simplify and merge rules for cross-compilation.
6600
6601 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6602
6603         * local-propagation.c: Actually *apply* the fix for bug 80591...
6604
6605 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6606
6607         * mini-exceptions.c: backuot part of the last change
6608         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6609
6610 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6611         * inssel.brg: Fix bug 59286.
6612
6613
6614 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6615
6616         * mini-exceptions.c: patch from Zoltan to correctly check for
6617         stack boundaries (using the stack register, not the frame register),
6618         fixes bugs #80724, #79717.
6619
6620 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6621
6622         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6623         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6624
6625         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6626         presence of frame pointer elimination.
6627
6628 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6629         
6630         * mini-x86.h: NetBSD UCONTEX_REG defines.
6631
6632 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6633
6634         * inssel-amd64.brg: Fix amd64 build.
6635
6636 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6637
6638         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6639         on amd64.
6640
6641 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6642
6643         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6644         ends.
6645
6646         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6647
6648 2007-01-30 Mark Mason <mason@broadcom.com>
6649
6650            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6651            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6652            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6653            beginning support for CEE_JMP [not quite working yet]
6654            * tramp-mips.c: LMF handling now works
6655         
6656 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6657
6658         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6659
6660         * mini.h (NULLIFY_INS): New macro.
6661
6662 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6663
6664         * mini.c: statistical profiler fix for windows, patch
6665         from Tor Lillqvist (tml@novell.com).
6666
6667 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6668         * local-propagation.c: Fix bug 80591.
6669
6670 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6671
6672         * Makefile.am: put back the --export-dynamic option as with
6673         the previous gmodule flags (thanks to Robert Jordan).
6674
6675 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6676
6677         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6678
6679         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6680         simplify and speed up the local register allocator. Also rename some fields
6681         like iassign->vassign.
6682         
6683         * regalloc.c: Remove some functions which are no longer used since their
6684         inlined version is in mini-codegen.c.
6685         
6686         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6687
6688         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6689
6690 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6693         narrowing. Fixes #80622.
6694
6695         * iltests.il: Add new regresssion test. 
6696
6697 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6698
6699         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6700         debug-debugger.c, debug-debugger.h: warning fixes.
6701         * driver.c: updated copyright year and made it fit in one line.
6702
6703 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6704
6705         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6706
6707 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6708
6709         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6710
6711         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6712
6713         * iltests.il: Add new test for bug #80507.
6714
6715 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6716
6717         * mini-arm.h: use soft-float also on vfp for now.
6718
6719 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6720
6721         * mini.c: fix some more soft-float issues.
6722
6723 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6724
6725         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6726
6727 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6728         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6729         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6730         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6731
6732 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6733
6734         * mini-arm.c: typo fix.
6735
6736 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6737
6738         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6739
6740 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6741
6742         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6743         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6744
6745         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6746
6747         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6748
6749         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6750         
6751         * inssel.brg: Fix a warning.
6752
6753         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6754
6755         * abcremoval.c ssa.c ssapre.c: Update after this change.
6756         
6757         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6758
6759         * dominators.c (df_set): Use mono_bitset_union_fast.    
6760
6761 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6762
6763         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6764         mini-codegen.c: reduce relocations and memory usage for the cpu
6765         description.
6766
6767 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6768
6769         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6770
6771         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6772         to reduce their size.
6773
6774 2007-01-19 Mark Mason <mason@broadcom.com>
6775
6776         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6777         * mini-mips.c: more configuration macros, support long conditional branches, additional
6778         asserts, fix epilog instrumentation.
6779         * mini-mips.h: use standard stack walk
6780         * cpu-mips.md: increase size of div, rem and conditional branches
6781         
6782 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6783
6784         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6785         to cpu spec data.
6786
6787 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6788
6789         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6790         (compile_method): Ditto.
6791
6792         * aot-runtime.c (decode_klass_info): Ditto.
6793
6794         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6795         needed by the code generated by inssel.brg. Also fix a warning.
6796
6797 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6798
6799         * mini.c: deal with enums that become genericinsts by
6800         being nested in a generic class (bug #79956).
6801
6802 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6803
6804         * mini.c: match the generic definition to check for
6805         private access with generic types (bug #78431).
6806
6807 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6808
6809         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6810         to make life easier for people cross-compiling that insist on not
6811         using scratchbox.
6812
6813 2007-01-17 Mark Mason <mason@broadcom.com>
6814
6815         * inssel-long.brg: patch to deal with mips missing flags
6816         * inssel-long32-mips.brg: implement overflow checks
6817         * insset-mips.brg: implement overflow checks
6818         * mini-mips.h: implement conditional exception handling
6819         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6820           Remove unused code, minor cleanups.
6821         * exceptions-mips.c: minor cleanups
6822         * mini-ops.h: add mips conditional exception ops
6823         * cpu-mips.md: add mips conditional exception ops
6824
6825         
6826 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6827
6828         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6829         to deal with mips missing of flags.
6830
6831 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6832
6833         * exceptions-ppc.c: execute fault handlers.
6834
6835 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6836
6837         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6838
6839 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6840
6841         * mini.c: handle also floating point values in initialize_array.
6842
6843 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6844
6845         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6846         array initialization and make it conditional on the intrins option.
6847
6848 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6849
6850         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6851         relocations and put the patch info names close to the enum definition.
6852
6853 2007-01-15 Mark Mason <mason@broadcom.com>
6854
6855         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6856
6857 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6858
6859         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6860
6861 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6862
6863         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6864
6865 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6866
6867         * Makefile.am: distribute the mips sources.
6868
6869 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6870
6871         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6872         directly.
6873
6874 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6875
6876         * cpu-x86.md: back out for now as this triggers other regressions.
6877
6878 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6879
6880         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6881         to eax:edx, so ecx can't get allocated to them (bug #80489).
6882
6883 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6884
6885         * mini.c, mini-exceptions.c: enabled running fault handlers
6886         (bug #80469).
6887
6888 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6889
6890         * driver.c: If nothing fail, do not use the string "failed",
6891         because it makes it very annoying to view test result logs on the
6892         web. 
6893
6894 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6895
6896         * debug-debugger.c (mono_debugger_main): Rename "main" to
6897         "main_method" to prevent a warning.
6898
6899         Remove a warning for unused field.
6900
6901 2006-12-28  Martin Baulig  <martin@ximian.com>
6902
6903         * debug-debugger.c
6904         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6905
6906 2006-12-22  Martin Baulig  <martin@ximian.com>
6907
6908         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6909         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6910         seperate `.mdb_debug_info' section, so we can access it from the
6911         debugger even if the binary is stripped.
6912
6913         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6914         from the `.mdb_debug_info' here to prevent the linker from
6915         removing that section.
6916
6917         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6918         mdb-debug-info64.s.
6919
6920 2006-12-19  Robert Jordan  <robertj@gmx.net>
6921
6922         * mini-x86: enable the code to return small structures in
6923         registers for FreeBSD as well. Fixes bug #80278.
6924         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6925
6926 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6927
6928         * mini-x86.c: align the stack when calling the profiler
6929         function instrumenting the prolog (on OSX).
6930
6931 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6932
6933         * mini.c: emit a break opcode where Debugger.Break () is called.
6934
6935 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6936
6937         * mini.c (mono_method_to_ir): Provide useful information on this
6938         assert, to prevent others from debugging like I did.
6939
6940 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6941
6942         * mini.c: enable code which was incorrectly commented
6943         (bug #80235).
6944
6945 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6946
6947         * mini-x86.c: enable on OSX, too, the code to return small
6948         structures in registers.
6949
6950 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6951
6952         * mini-x86.c: remove the use of the dynamic code manager here, too.
6953
6954 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6955
6956         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6957         mono_debugger_create_notification_function() to use
6958         mono_global_codeman_reserve () instead of a dynamic code manager.
6959
6960 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6961
6962         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6963         ves_array_element_address() jit icall and use a generated
6964         managed method instead (which is about 4 times faster for a rank 3
6965         array access).
6966
6967 2006-11-29  Mark Mason  <mason@broadcom.com>
6968
6969         * basic-calls.cs: additional tests for passing
6970         structures as function arguments.
6971
6972 2006-11-29  Mark Mason  <mason@broadcom.com>
6973
6974         * mini-mips.h: disable custom exception handling
6975         * mini-mips.c: throw/rethrow should use jalr to call
6976         exception stubs.  Fixed bug with passing structures
6977         by value. More support for tracing floating point
6978         functions.
6979
6980 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6981
6982         * mini.c: fixed typo in the soft-float ldind.r4 handling
6983         (bug #80086).
6984
6985 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6986
6987         * mini.c, mini.h, driver.c: added --runtime command line
6988         option to select a different runtime than the autodetected one.
6989         * jit.h: added API for embedders to initialize with a specific
6990         runtime version.
6991
6992 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6993
6994         * mini.c: handle also boxing of r4 values (bug #80024).
6995
6996 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6997
6998         * mini-ppc.c: force indirect calls until we reserve
6999         enough address space for all the generated code.
7000
7001 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7002
7003         * exceptions-arm.c: workaround bugs in the libc definition
7004         of struct ucontext.
7005
7006 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7007
7008         * inssel.brg: fixes from me and Mark Mason.
7009
7010 2006-11-23  Dick Porter  <dick@ximian.com>
7011
7012         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7013         semaphore display now we've fixed the initial value
7014
7015 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7016
7017         * inssel.brg: partially revert the last change to fix the build.
7018
7019 2006-11-21  Mark Mason  <mason@broadcom.com>
7020
7021         * inssel.brg: Add and use compare-and-branch macros to support
7022         architectures that do not have condition code registers (ie. MIPS).
7023         * *-mips.{c,brg,md}: Fix copyright statements
7024
7025 2006-11-20  Mark Mason  <mason@broadcom.com>
7026
7027         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7028         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7029         * mini.h: Added declaration for mono_print_ins()
7030         * mini-codegen.c: added ins_spec initializer for MIPS
7031         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7032         vreg to be virtual and hreg to be non-virtual.
7033         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7034         is not yet working/implemented correctly.
7035         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7036         non-static, fixup calls to print_ins() from other parts in the file.
7037
7038 2006-11-20  Mark Mason  <mason@broadcom.com>
7039
7040         * basic-calls.cs: added tests for passing structures as arguments
7041         to calls.
7042
7043 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7044
7045         * inssel-long32.brg: optimize signed division by power of two.
7046
7047 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7048
7049         * mini-arm.c: added support for interworking with thumb code
7050         (mono must be still be built using the ARM instruction encoding).
7051
7052 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7053
7054         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7055         verifier has different rules for it.   Fixes a few verifier issues
7056         in the test suite.
7057
7058         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7059         at the end, so people know what happened.
7060
7061 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7062
7063         * brach-opts.c: in optimize_exception_target() make sure we
7064         are in a catch clause (fixes bug #79871).
7065
7066 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7067
7068         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7069         more soft-float support fixes.
7070
7071 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7072
7073         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7074         that are passed half on the stack and half in registers.
7075
7076 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7077
7078         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7079         more mips integration work from Mark E Mason 
7080         <mark.e.mason@broadcom.com>.
7081
7082 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7083
7084         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7085         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7086         tramp-mips.c: added sources for the mips port, not
7087         integrated in the build yet. Contributed by
7088         Mark E Mason <mark.e.mason@broadcom.com>.
7089
7090 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7091
7092         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7093
7094 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7095
7096         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7097         put the soft-float rules in its own file since it seems to
7098         break s390 compilation.
7099
7100 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7101
7102         * mini-arm.c: fixed wrnings.
7103
7104 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7105
7106         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7107         inssel-arm.brg: ARM support for soft-float.
7108
7109 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7110
7111         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7112         loads and stores of 32 bit fp values.
7113
7114 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7115
7116         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7117
7118         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7119         works. Fixes #79852 and #79463.
7120
7121 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7122
7123         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7124         more soft-float support WIP and fixes.
7125
7126 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7127
7128         * mini-arm.c: some VFP updates.
7129
7130 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7131
7132         * mini-exceptions.c: 0 is a valid local var offset in some
7133         architectures, don't assert (bug #78508).
7134
7135 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7136
7137         * exceptions-arm.c: fixed off by one error in stack walk code.
7138
7139 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7140
7141         * mini.h, mini.c: more precise tracking of type load exceptions.
7142
7143 2006-11-03  Robert Jordan  <robertj@gmx.net>
7144
7145         * Makefile.am: [WIN32] Add monow.exe target.
7146         * driver.c: [WIN32] Don't detach the console when debugging.
7147         Fixes bug #79797.
7148         
7149 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7150
7151         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7152
7153 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7154
7155         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7156
7157         * driver.c (mini_regression): Fix --regression with AOT.
7158
7159         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7160
7161 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7162
7163         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7164
7165         * mini-sparc.h: Don't use sigaction on sparc/linux.
7166
7167         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7168
7169         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7170
7171         * mini-exceptions.c: Add proper include files for getpid ().
7172
7173 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7176         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7177         method.
7178
7179         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7180         name cache to reduce its size.
7181
7182         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7183
7184 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7185
7186         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7187         the mono_lmf TLS variable.
7188
7189         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7190         trampoline lmf frames.  
7191
7192         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7193
7194 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7195
7196         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7197         the mono_lmf TLS variable.
7198
7199         * mini-exceptions.c: Access the LMF structure through accessors.
7200
7201         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7202         variable instead of in jit_tls->lmf.
7203
7204         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7205         
7206         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7207         trampoline lmf frames.
7208
7209         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7210
7211 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7212
7213        * mini.c trace.c mini-x86.c: Revert these too.
7214         
7215        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7216        signature change.
7217
7218 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7219
7220         * genmdesc.c: removed now dead code.
7221
7222 2006-10-09  Robert Jordan <robertj@gmx.net>
7223
7224         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7225
7226 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7227
7228         * mini.h: do not leave gaps in the opcode values.
7229
7230 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7231
7232         * jit-icalls.h: flag functions as internal here, too.
7233
7234 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7235
7236         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7237         functions with the internal attribute.
7238
7239 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7240
7241         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7242
7243 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7244
7245         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7246         for soft-float.
7247
7248 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7249
7250         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7251         tail calls as on other platforms.
7252
7253         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7254
7255         * iltests.il: Add a few tailcall tests.
7256
7257 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7258
7259         * driver.c: fix loop for old compilers (bug #79521).
7260
7261 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7262
7263         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7264
7265         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7266
7267         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7268         metadata without any code.
7269
7270         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7271         more precise debugging information using gdb.
7272
7273 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7274
7275         * inssel-ia64.brg: Make the helper methods static.
7276
7277 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7278
7279         * inssel-x86.brg: make the helper methods static.
7280
7281 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7282
7283         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7284
7285 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7286
7287         * mini.c: updates for monoburg changes.
7288         * inssel.brg: make a few helper functions static as they should.
7289
7290 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7291
7292         * Makefile.am: Move mini-codegen.c to common_sources.
7293
7294 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7295
7296         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7297         instructions.
7298         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7299         mini-ppc.h: port to use the common local register allocator.
7300
7301 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7302
7303         * mini.h: Remove the comment too then.
7304
7305 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7306
7307         * mini.h: put back backend.data which is to be used shortly and
7308         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7309         pointers on 4 byte boundaries it'd have much bigger issues running
7310         and you can ifdef it out anyway.
7311
7312 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7313
7314         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7315         MonoInst size by 4 bytes on 64 bit machines.
7316
7317 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7318
7319         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7320         replacement with more meaningful field names. Arch maintainers, please
7321         check the assigned names are good enough for your arch.
7322
7323 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7324
7325         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7326         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7327
7328 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7329
7330         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7331         relocations and memory requirements, put the optimization flags
7332         definitions in their own file.
7333
7334 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7335
7336         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7337
7338         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7339
7340 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7341
7342         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7343
7344 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7345
7346         * inssel.brg: use the correct function to get the size of an item
7347         in an array, given an element class.
7348         * aot-compiler.c: do not access class->class_size directly.
7349
7350 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7351
7352         * mini.h, debug-mini.c: added a debugging function to print
7353         info about local variables and arguments in a jitted method.
7354
7355 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7356
7357         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7358
7359         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7360
7361 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7362
7363         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7364         inner and outer loops when passing vtypes.
7365
7366 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7367
7368         * mini-ppc.c: take into account the cpu errata for cache flushing
7369         which caused some random errors (bug #79381).
7370
7371 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7372
7373         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7374         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7375
7376 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7377
7378         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7379         loaded.
7380
7381         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7382         freebsd ports tree.
7383
7384         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7385         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7386
7387         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7388         displacement.
7389
7390 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7391
7392         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7393
7394 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7395
7396         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7397         macro does not have to be changed during debugging.
7398
7399         * 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>.
7400
7401         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7402
7403         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7404         
7405         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7406         MONO_ARCH_NO_EMULATE_MUL is defined.
7407
7408         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7409
7410         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7411
7412         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7413
7414         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7415         
7416 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7417
7418         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7419         stuff to mini-exceptions.c where it is used.
7420
7421         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7422         setup code, the real one is in mini-exceptions.c.
7423
7424         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7425         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7426         some changes from the freebsd ports tree.
7427
7428         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7429         constants.
7430         
7431         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7432
7433 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7434
7435         * mini.c: on Linux, check for /proc to be mounted
7436         (bug# 79351, novell bug#201204).
7437
7438 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7439
7440         * mini.c: handle cases where pthread_attr_getstack() behaves
7441         incorrectly (bug #78096).
7442
7443 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7444
7445         * mini-arm.c: support larger stack frames (bug #79272).
7446
7447 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7448
7449         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7450
7451         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7452         tokens.
7453
7454         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7455         mono_class_from_name () to find a class from its name.
7456
7457         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7458
7459 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7460
7461         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7462
7463 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7464
7465         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7466
7467 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7468
7469         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7470         callinfo->trampoline.
7471
7472         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7473         fixes #79271.
7474         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7475         future.
7476
7477 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7478
7479         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7480
7481 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7482
7483         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7484         stats.method_trampolines, it is already done by the generic trampoline code.
7485
7486         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7487         
7488 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7489
7490         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7491
7492         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7493
7494         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7495
7496         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7497         
7498         * mini.c (print_jit_stats): Print new stats.
7499
7500         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7501
7502 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7503
7504         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7505         Address on two dimensional arrays. Fixes #78729.
7506
7507         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7508
7509         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7510         a method.
7511
7512         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7513
7514         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7515         #79130.
7516         
7517         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7518         a race condition.
7519         (mini_get_ldelema_ins): Ditto.
7520
7521 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7522
7523         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7524         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7525         Fixes #79213.
7526
7527 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7528
7529         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7530         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7531
7532         * exceptions-s390x.c: Cosmetic change.
7533
7534         * tramp-s390.c: Fix warning.
7535
7536         * cpu-s390.md: Correct length of mul_imm.
7537
7538 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7539
7540         * aot-compiler.c: added binary writer with ELF backend
7541         implementation (only on Linux/x86 for now).
7542
7543 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7544
7545         * Makefile.am: Don't run net 2.0 AOT tests.
7546
7547         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7548         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7549
7550         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7551
7552 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7553
7554         * aot-compiler.c: simplified and refactored the asm-writing code
7555         to allow different backends.
7556
7557 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7558
7559         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7560
7561         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7562         little. Share patches of type TYPE_FROM_HANDLE as well.
7563
7564         * mini.c (mono_patch_info_equal): New helper function.
7565         (mono_patch_info_hash): Ditto.
7566
7567         * aot-compiler.c (emit_method_code): Fix s390 build.
7568
7569         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7570         is not handled because it is stored as a flag and not as a type ctor. Fixes
7571         #79016.
7572
7573 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7574
7575         * aot-compiler.c: Fix computation of GOT slot statistics.
7576         
7577         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7578         Also remove support for not PIC AOT.
7579
7580         * mini.h: Bump AOT file format version.
7581
7582         * objects.cs: Add a test for #78990.
7583
7584         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7585         (peter.dettman@iinet.net.au). Fixes #79087.
7586
7587         * basic-long.cs: Add a test for the above.
7588
7589 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7590
7591         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7592         
7593         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7594         code somewhat.
7595
7596 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7597
7598         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7599         exceptions.
7600
7601 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7602
7603         * mini.c: Don't verify COM proxy invoke calls
7604         
7605
7606 2006-08-10  Dick Porter  <dick@ximian.com>
7607
7608         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7609         which process is holding semaphores locked.
7610
7611 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7612
7613         * mini-ia64.c mini-amd64.c: Fix #79027.
7614
7615         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7616
7617         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7618
7619         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7620         implicit arguments in a vararg call. Fixes #79027.
7621
7622 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7623
7624         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7625         (mono_get_array_new_va_signature): Ditto.
7626
7627 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7628
7629         * aot-runtime.c: Call init_plt lazily.
7630
7631         * inssel-long.brg: Fix unsigned long->int conversion.
7632
7633         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7634
7635         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7636         that most data is now in the .rss/.data section.
7637
7638 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7639
7640         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7641
7642         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7643
7644         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7645
7646         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7647
7648         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7649         virtual call. Fixes #79010.
7650
7651         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7652         and use the result as the this argument in the real call.
7653
7654         * generics.2.cs: Add a new test for #79010.
7655         
7656 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7657
7658         * mini-x86.c: Fix a warning.
7659
7660         * aot-compiler.c: Add a bunch of statistics.
7661
7662         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7663
7664 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7665
7666         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7667
7668 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7669
7670         * 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>.
7671
7672 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7673
7674         * mini.c (mono_method_to_ir): Obtain the original method in the
7675         CIL stream and use this to perform validation.
7676
7677         Fixed: #78816
7678
7679 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7680
7681         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7682         (mono_arch_call_opcode): Ditto.
7683
7684         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7685         #78826.
7686
7687         * mini.c (mono_patch_info_dup_mp): New helper function.
7688         
7689         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7690         compilation. Fixes #78827.
7691
7692 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7693
7694         * declsec.c: Use original security informations for
7695           MONO_WRAPPER_MANAGED_TO_MANAGED.
7696
7697 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7698
7699         * mini.c: Allow Com Interop methods/classes and
7700         don't verify COM wrapper calls
7701         
7702
7703 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7704
7705         * inssel-long32.brg: Fix long->i4 checked conversion.
7706
7707         * exceptions.cs: Add a test for the above.
7708
7709 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7710
7711         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7712
7713         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7714         leaks.
7715
7716         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7717         #78775.
7718
7719 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7720
7721         * mini.c: Fix solaris/x86 exception handling.
7722
7723         * Makefile.am: Get rid of $(ICU_LIBS).
7724
7725 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7726
7727         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7728         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7729         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7730
7731         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7732
7733         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7734         this function causes a SIGSEGV.
7735
7736 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7737
7738         * mini.c: Remove unused solaris/x86 includes.
7739
7740 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7743
7744 2006-06-20  Jb Evain  <jbevain@gmail.com>
7745
7746         * cpu-g4.md: fix max length of start_handler instruction.
7747
7748 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7749         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7750
7751 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7752         * ssa.c: Fixed bug 78653 for SSA based deadce.
7753         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7754         MonoInst.flags, used in SSA based deadce.
7755         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7756         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7757
7758 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7759
7760         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7761         it can end up using non executable memory on ppc64 systems
7762         running ppc32 userspace (fix from Johannes Berg).
7763
7764 2006-06-14  Dick Porter  <dick@ximian.com>
7765
7766         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7767         4.1.1
7768
7769 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7770         * mini.c: Made so that inline is locally disabled if it would
7771         trigger a .cctor, because too many apps depend on this behavior
7772         (which seems to be also the one of the MS CLR).
7773
7774 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7775
7776         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7777         No idea why this worked before.
7778
7779         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7780         which branch to outer exception clauses since they could skip the
7781         inner finally clauses. Fixes #78633.
7782
7783         * exceptions.cs: Add a test for the above.
7784
7785         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7786         Fixes #78629.
7787
7788         * iltests.il: Add a test for the above.
7789
7790 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7791
7792         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7793         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7794
7795         * iltests.il: Add a test for the above.
7796
7797 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7798
7799         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7800         
7801         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7802         methods as instrinsics.
7803
7804 2006-06-09  Wade Berrier <wberrier@novell.com>
7805
7806         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7807         (simple-cee-ops.h ssapre-mini-ops.h)
7808
7809 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7810
7811         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7812         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7813         instruction).
7814         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7815         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7816
7817 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7818
7819         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7820
7821 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7822
7823         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7824         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7825         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7826         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7827         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7828         of opcodes, so that bug 78549 should not happen again.
7829         * ssapre.c: Updated to use the renamed files.
7830
7831 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7832
7833         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7834         in OP_ATOMIC_EXCHANGE_I4.
7835
7836 2006-06-07  Wade Berrier <wberrier@novell.com>
7837
7838         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7839         in mono_debugger_create_notification_function)
7840
7841 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7842
7843         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7844         
7845         * mini.c (type_from_stack_type): Disable some changes which do not
7846         seem to work.
7847
7848         * driver.c: Reenable opts.
7849
7850         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7851         of the evaluation stack.
7852         
7853         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7854         evaluation stack trace at entry to the bblock.
7855
7856         * mini.c (merge_stacks): New function to perform verification of stack merges.
7857         Turned off by default.
7858
7859         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7860         STACK_MP.
7861         
7862 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7863
7864         * local-propagation.c: Fixed bug 78549.
7865
7866 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7867
7868         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7869
7870 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7871
7872         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7873         tramp-arm.c, tramp-ia64.c
7874         (mono_debugger_create_notification_function): Update signature to
7875         new signature and use new protocol for creating the notification
7876         function.  
7877
7878         Should fix the build.
7879
7880 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7881
7882         * exceptions-ppc.c (mono_jit_walk_stack)
7883         (ves_icall_get_frame_info): Fix the build
7884
7885 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7886
7887         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7888
7889 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7890
7891         * il2tests.2.il: New file for generics CIL tests.  Add test for
7892         #78019.
7893         * Makefile.am: Update.
7894
7895         Fix #78019
7896         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7897         to nullable types.
7898
7899 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7900
7901         * aliasing.c: Fixed bug 78311.
7902
7903 2006-05-29  Martin Baulig  <martin@ximian.com>
7904
7905         * mini-exceptions.c (mono_find_jit_info): When computing the
7906         native offset, check whether we're actually inside the method's
7907         code; call mono_debug_print_stack_frame() to format the frame.
7908         (ves_icall_System_Exception_get_trace): Call
7909         mono_debug_print_stack_frame() to format the stack frame.
7910         (ves_icall_get_trace): Update to the new debugging API.
7911         (mono_jit_walk_stack_from_ctx): Likewise.
7912         (ves_icall_get_frame_info): Likewise.
7913
7914         * mini.c (get_method_from_ip): Use the new debugging API.
7915         (mono_print_method_from_ip): Likewise.
7916
7917         * exceptions-ppc.c
7918         (mono_jit_walk_stack): Use the new debugging API.
7919         (ves_icall_get_frame_info): Likewise.   
7920
7921 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7922
7923         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7924
7925 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7926
7927         * mini.c: Added "limitator" to inline for debugging.
7928
7929 2006-05-24  Martin Baulig  <martin@ximian.com>
7930
7931         * debug-debugger.c (mono_debugger_init): Create a private,
7932         malloc()-based code manager for the notification function and
7933         intentionally leak it on exit.  This fixes the crash-on-exit race
7934         condition.
7935
7936         * tramp-amd64.c
7937         (mono_debugger_create_notification_function): Added
7938         `MonoCodeManager *' argument.
7939
7940         * tramp-x86.c
7941         (mono_debugger_create_notification_function): Added
7942         `MonoCodeManager *' argument.
7943
7944 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7945
7946         * aliasing.c: Fixed 64 bit issue.
7947         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7948         default since all known bugs are fixed (one more time!).
7949
7950 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7951
7952         * mini.c: write barrier support.
7953
7954 2006-05-23  Martin Baulig  <martin@ximian.com>
7955
7956         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7957         check at the top of the file.
7958
7959 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7960
7961         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7962         reverting changes without reason and without changelog entries.
7963
7964 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7965
7966         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7967         to a few opcodes. Fixes #78439.
7968
7969         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7970         consistency with other archs.
7971
7972         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7973
7974 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7975
7976         * debug-debugger.c: fix the build.
7977
7978 2006-05-17  Martin Baulig  <martin@ximian.com>
7979
7980         * debug-debugger.c
7981         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7982         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7983         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7984         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7985
7986 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7987
7988         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7989
7990 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7991
7992         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7993         MONO_TYPE_GENERICINST.
7994         
7995         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7996         MONO_TYPE_GENERICINST.
7997
7998 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7999
8000         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8001         #78325.
8002
8003 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8004
8005         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8006         mempool.
8007         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8008
8009 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8010
8011         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8012         mono_trace_cleanup ().
8013
8014         * iltests.il: Fix problem with the newly added test.
8015
8016         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8017         due to register constraints, free up the previous hreg. Fixes #78314.
8018
8019         * iltests.il: Add new test for #78314.  
8020
8021         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8022         Interlocked.Add. Fixes #78312.
8023
8024         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8025         
8026 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8027
8028         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8029
8030 2006-05-05  Martin Baulig  <martin@ximian.com>
8031
8032         * debug-mini.c (mono_debug_open_block): New method.
8033
8034         * mini-amd64.c
8035         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8036         the beginning of each basic block.
8037
8038         * mini-x86.c
8039         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8040         the beginning of each basic block.
8041
8042 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8043
8044         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8045         default until I understand why they break the build on amd64.
8046
8047 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8048
8049         * mini.c (mini_cleanup): Call mono_cleanup ().
8050
8051         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8052         errors.
8053
8054 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8055
8056         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8057         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8058         default since all known bugs are fixed, and I cannot reproduce bug
8059         77944... I'm asking Matt Hargett to test again after this commit.
8060
8061 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8062
8063         * mini-codegen.c: Fixed typo that thrashed inline.
8064
8065 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8066
8067         * dominators.c (compute_dominators): Avoid using a worklist since
8068         it is not correct in some cases. Instead, iterate over all bblocks as
8069         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8070
8071 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8072
8073         * mini.c (mono_jit_compile_method_inner): Use
8074         mono_prepare_exception_from_error that resets the value
8075         internally.
8076
8077 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8078
8079         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8080         
8081 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8082
8083         * aliasing.c: Fixed bug 78210.
8084
8085 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8086
8087         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8088         default until all their problems (or the ones they trigger) are fixed.
8089
8090 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8091
8092         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8093         
8094         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8095         as loaded only after resolving patches since that could invoke the same method.
8096
8097         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8098
8099         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8100         functions.
8101
8102         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8103         AOT loader.
8104
8105         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8106         stack.
8107
8108         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8109         made from AOT code through the PLT table.
8110
8111         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8112         holding the plt offset when a call is made to the aot plt trampoline.
8113         
8114 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8115
8116         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8117         amd64 AOT support.
8118
8119         * Makefile.am (common_sources): Fix build breakage.
8120
8121         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8122         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8123         intra-assembly calls if possible.
8124         
8125         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8126
8127         * mini-trampolines.c: Handle PLT entries.
8128
8129         * mini.c: Avoid creating a GOT var for calls.
8130
8131         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8132         from mscorlib code.
8133
8134         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8135         from mscorlib code.
8136
8137         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8138         AOT code.       
8139
8140         * mini.h: Bump AOT file format version.
8141         
8142         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8143         covers more cases.
8144
8145 2006-04-25  Martin Baulig  <martin@ximian.com>
8146
8147         * driver.c: Disable copyprop, consprop and inline when running
8148         inside the debugger.
8149
8150 2006-04-25  Martin Baulig  <martin@ximian.com>
8151
8152         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8153         with `get_current_thread' and added `detach'.
8154         (MonoDebuggerMetadataInfo): Added `thread_size',
8155         `thread_tid_offset', `thread_stack_ptr_offset' and
8156         `thread_end_stack_offset'.
8157
8158 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8159
8160         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8161         aot-runtime.c.
8162
8163         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8164         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8165
8166         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8167
8168         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8169
8170         * aot.c: Add support for ADJUSTED_IID.  
8171
8172 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8173
8174         * aot.c (emit_method_order): Don't align method_order_end.
8175
8176         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8177         the interface ID changes.
8178
8179 2006-04-21  Dick Porter  <dick@ximian.com>
8180
8181         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8182         cleaning up a thread.  Fixes the new part of bug 77470.
8183
8184 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8185
8186         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8187         to managed wrapper.
8188                      
8189 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8190
8191         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8192         
8193         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8194         SIGSEGV. Fixes #78072.
8195
8196         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8197         unregister our SIGABRT handler.
8198
8199 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8200
8201         * mini.c: Disabled inline where it can alter the call stack in a
8202         way visible from managed code.
8203         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8204         default.
8205
8206 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8207
8208         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8209         on other platforms. Fixes #78089.
8210
8211 2006-04-13  Martin Baulig  <martin@ximian.com>
8212
8213         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8214         determine whether we're inside the debugger.
8215
8216         * debug-debugger.h
8217         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8218
8219 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8220
8221         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8222         handler clauses. Fixes #78024.
8223
8224         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8225         in the CALL_MEMBASE opcodes. Fixes #78088.
8226         (mono_arch_get_vcall_slot_addr): Ditto.
8227
8228 2006-04-10  Martin Baulig  <martin@ximian.com>
8229
8230         * debug-debugger.c: The thread handling code has now been moved
8231         into ../metadata/threads.c.
8232
8233 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8234
8235         * driver.c (mono_main): Fix --with-gc=none build.
8236
8237         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8238         (mono_spillvar_offset_float): Ditto.
8239         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8240         hreg, not when its !global, since on ia64, there is a third category: stacked
8241         registers.      
8242
8243 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8244
8245         * mini.c: set MonoInst->klass for load field address and a few other
8246         places.
8247
8248 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8249
8250         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8251
8252 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8253
8254         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8255         the branch opt changes.
8256
8257 2006-04-06  Dick Porter  <dick@ximian.com>
8258
8259         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8260         
8261         * wapihandles.c (mini_wapi_seminfo): 
8262         * driver.c (mono_main): Add semaphore info option
8263
8264 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8265
8266         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8267         branch optimization changes. Fixes #78009.
8268
8269 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8270
8271         * mini.c: ignore accessibility of methods in managed->native wrappers.
8272
8273 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8274
8275         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8276         
8277         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8278
8279 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8280
8281         * mini.c: Modify the branch optimizations to preserve the invariant that
8282         the entries inside the in_bb and out_bb arrays are unique.
8283         (mono_unlink_bblock): Avoid creation of new arrays.
8284
8285 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8286
8287         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8288         change (#77992).
8289
8290 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8291
8292         * mini.c (optimize_branches): Remove the "optimizations" in
8293         the cbranch1/cbranch2 -> branch cases which were causing several
8294         problems in the past. Fixes #77986.
8295
8296 2006-03-31  Chris Toshok  <toshok@ximian.com>
8297
8298         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8299         default optimizations :(
8300
8301 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8302
8303         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8304         branch.
8305
8306 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8307
8308         * local-propagation.c: Added comments to structs and removed
8309         "Mono" prefixes from local tree mover types.
8310
8311 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8312
8313         * Makefile.am (arch_sources): Define this for each architecture so 
8314         libmono_la_SOURCES is defined in one place.
8315
8316 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8317
8318         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8319         from handles/.
8320
8321 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8322
8323         * driver.c: print the GC name supplied by configure.
8324
8325 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8326
8327         * local-propagation.c: Added tree mover, and moved here all the
8328         local propagation code from mini.c
8329         * mini.c: Added support for treeprop, and moved all the local
8330         propagation code to local-propagation.c
8331         * mini.h: Added support for treeprop
8332         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8333         treeprop, inline and deadce by default
8334         * Makefile.am: Added local-propagation.c
8335
8336 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8337
8338         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8339
8340 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8341
8342         * debug-debugger.c: make it compile without the Boehm GC.
8343
8344 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8345
8346         * mini.c: fixed issue with mismatch when an icall is registered
8347         with multiple names but same address.
8348
8349 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8350
8351         * declsec.c, mini-exceptions.c: use write barrier to set reference
8352         fields of managed objects.
8353
8354 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8355
8356         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8357         (can_access_internals): Fix a warning.
8358
8359         * mini.c (print_method_from_ip): Rename this to 
8360         mono_print_method_from_ip so it gets exported.
8361
8362         * trace.c: Deal with strings inside StringBuilder's containing garbage
8363         and fix memory leaks. Fixes #77848.
8364
8365 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8366
8367         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8368         fixes #77787.
8369
8370 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8371         
8372         * mini-s390.c: Remove OP_X86_TEST_NULL.
8373
8374 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8375
8376         * mini.c: use the correct GetHashCode() for the moving collector.
8377
8378 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8379
8380         * liveness.c: Regalloc spill cost tuning.
8381
8382 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8383         
8384         * mini-s390x.h: Correct S390_LONG macro.
8385
8386         * mini-s390x.c: Cleanup unused code.
8387
8388 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8389
8390         * jit-icalls.h: New file.
8391
8392         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8393         icalls and include that instead of including jit-icalls.c.
8394
8395         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8396         OP_X86 opcodes.
8397
8398 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8399
8400         * mini.c: when checking for member accessibility, also check for
8401         friend assemblies and for explicit interface implementations.
8402
8403 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8404
8405         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8406
8407         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8408
8409         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8410         common cases are done first.    
8411
8412         * mini-ops.h: Only define platform specific opcodes on the given platform.
8413
8414         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8415         branch.
8416         
8417 2006-03-14  Martin Baulig  <martin@ximian.com>
8418
8419         Revert Paolo's change from r57348:
8420
8421         * mini.h: don't use gboolean for bitfields.
8422         * mini.c: verifier changes for fields and methods accessibility.
8423
8424 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8425
8426         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8427
8428         * mini-s390x.c: Fix conv_r_un.
8429
8430         * cpu-s390, cpu-s390x.md: Fix lengths.
8431
8432 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8433
8434         * mini.c: nested types have access to all the nesting
8435         levels, not just the enclosing types.
8436
8437 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8438
8439         * mini.c: added a few more verification checks.
8440
8441 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8442
8443         * liveness.c: Merge optimizations from the linear-il branch.
8444
8445 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8446
8447         * mini-ia64.c (emit_call): Add a comment.
8448
8449         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8450
8451         * tramp-ia64.c: Fix some warnings.
8452
8453 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8454
8455         * mini.h: don't use gboolean for bitfields.
8456         * mini.c: verifier changes for fields and methods accessibility.
8457
8458 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8459
8460         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8461         lazy icall wrapper changes.
8462
8463         * dominators.c: Replace all the dominator algorithms with faster
8464         ones from the linear-il branch.
8465
8466         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8467         the mempool.
8468
8469         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8470         common cases are done first.
8471
8472         * mini-amd64.c: Fix some warnings.
8473
8474         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8475         from the mempool.
8476
8477         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8478         added code.
8479
8480         * mini.h: Add a missing prototype.
8481
8482 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8483
8484         * mini.c: Compile icall wrappers lazily.
8485
8486         * mini-codegen.c: Use printf instead of g_print since its much faster.
8487
8488         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8489         function.
8490
8491         * mini.c (optimize_branches): Cache the negative result from 
8492         remove_block_if_useless ().
8493
8494         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8495         Also fix some bblock linking issues.
8496
8497         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8498         assembly files.
8499
8500         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8501
8502         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8503         accessed fields first, for better cache behavior.
8504         
8505 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8506
8507         * mini.c: speedup IList<T> array accesses.
8508
8509 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8510
8511         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8512         inline_costs counter. Fixes #77190.
8513
8514 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8515
8516         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8517         trace messages. Fixes #77706.
8518
8519 2006-03-04  Martin Baulig  <martin@ximian.com>
8520
8521         * tramp-amd64.c, tramp-x86.c
8522         (mono_debugger_create_notification_function): Use
8523         mono_global_codeman_reserve() to allocate a buffer at runtime and
8524         return it.
8525
8526         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8527
8528         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8529         notification function at runtime and then call `initialize' in the
8530         `MONO_DEBUGGER__debugger_info' vtable.
8531
8532 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8533
8534         * iltests.il: Fix a visibility problem.
8535
8536 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8537
8538         * driver.c, mini.c: add hooks for the counters API.
8539
8540 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8541
8542         * driver.c: show disabled options.
8543
8544 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8545
8546         * linear-scan.c: always use cost-driven selection.
8547
8548 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8549
8550         * jit-icalls.c (helper_compile_generic_method): Revert change from
8551         2006-02-24.
8552
8553 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8554
8555         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8556
8557 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8558
8559         * inssel.brg: style fixes, mostly to force the updated monoburg
8560         to run for people using svn.
8561
8562 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8563
8564         * mini.c: match monoburg changes.
8565
8566 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8567
8568         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8569         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8570         declaration in the header file.
8571
8572 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8573
8574         * helpers.c: reduce relocations and mem usage.
8575
8576 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8577
8578         * mini.h, mini-codegen.c: disable logging features if
8579         requested by configure.
8580
8581 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8582
8583         * mini.c: tiny verifier changes.
8584
8585 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8586
8587         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8588         cpu-pentium.md: stack alignment changes for osx/x86,
8589         partially from Geoff Norton <gnorton@customerdna.com>.
8590
8591 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8592
8593         * jit-icalls.c (helper_compile_generic_method): Update to changes
8594         in metadata/class.c.
8595
8596 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8597         
8598         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8599         
8600         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8601         interface calls with large offsets.
8602
8603 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8604
8605         * jit-icalls.c (helper_compile_generic_method): Document the
8606         special-case we depend on so that we can inflate the method twice
8607         with the same context with no bad side-effects.
8608
8609 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8610
8611         * mini-x86.c, mini-amd64.c: fix for case when xen support
8612         is disabled.
8613
8614 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8615
8616         * mini-x86.c, mini-amd64.c: generate code to access tls items
8617         in a faster way for Xen systems.
8618
8619 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8620
8621         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8622         updates and compilation fixes for the OSX/x86 port, mostly from
8623         Geoff Norton <gnorton@customerdna.com>.
8624
8625 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8626
8627         * inssel.brg: faster interface call implementation
8628         to sync with the interface_offsets MonoVTable changes.
8629
8630 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8631
8632         * mini.c: more verification checks.
8633
8634 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8635
8636         * mini.c: added a few more verification checks.
8637
8638 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8639
8640         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8641         facility on the processor and use it if available.
8642
8643 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8644
8645         * driver.c, aot.c, mini.c: throw exception if the IL code is
8646         invalid or unverifiable.
8647
8648 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8649
8650         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8651         m.StructField.
8652
8653 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8654
8655         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8656
8657 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8658
8659         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8660         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8661         handling of instantiated generic valuetypes.
8662
8663 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8664
8665         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8666         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8667         instead.
8668
8669         * generics.2.cs: Revert the nullable reftypes tests.
8670
8671 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8672
8673         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8674         using __builtin_frame_address (1) as it doesn't work in the presence
8675         of optimizations. Hopefully fixes #77273.
8676
8677         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8678         -> generics.cs change as it doesn't work with some automake versions.
8679
8680 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8681
8682         * mini.c: handle systems that sue a different way to
8683         retrieve the stack address of the current thread.
8684
8685 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8686
8687         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8688         it specially in the makefile.
8689
8690         * generics.2.cs: Add tests for nullable reference types.
8691
8692 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8693
8694         * mini.c: always handle the case when mono_jit_init()
8695         is called in a thread different from the main thread,
8696         confusing libgc (bug #77309).
8697
8698 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8699
8700         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8701
8702 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8703
8704         * mini.c: change optimize_branches () to use a single loop
8705         and introduce a new optimization to simplify some range checks.
8706
8707 2006-02-03  Martin Baulig  <martin@ximian.com>
8708
8709         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8710         and merged with debugger_thread_manager_add_thread().
8711         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8712         inform the debugger about the main thread.
8713
8714 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8715
8716         * basic.cs: Add test for div.un/rem.un constant folding.
8717
8718 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8719
8720         * cpu-s390x.md: correct int_xor_imm length
8721
8722 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8723
8724         * generics.2.cs: New test for #77442.
8725
8726         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8727         #77442.
8728
8729 2006-02-02  Martin Baulig  <martin@ximian.com>
8730
8731         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8732         <mono/metadata/mono-debug-debugger.h>   
8733
8734         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8735
8736 2006-02-02  Martin Baulig  <martin@ximian.com>
8737
8738         * debug-debugger.h: New header file for debug-debugger.c.
8739
8740         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8741         function is a separate thread anymore; add support for attaching.
8742
8743 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8744
8745         * tramp-x86.c: Fix a warning.
8746
8747 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8748
8749         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8750         on very large methods.
8751
8752         * aot.c (load_patch_info): Fix a warning.
8753
8754 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8755
8756         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8757         mini-ops.h: alu membase optimizations.
8758
8759 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8760
8761         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8762         to speedup StringBuilder.
8763
8764 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8765
8766         * dominators.c (mono_compute_natural_loops): Fix detection of
8767         loop body start blocks.
8768
8769         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8770
8771 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8772
8773         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8774         #75145.
8775
8776 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8777
8778         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8779
8780 2006-01-25  Martin Baulig  <martin@ximian.com>
8781
8782         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8783         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8784         started to cleanup this file a little bit.
8785
8786 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8787
8788         * mini.c: optimize a codepath frequently happening in generics code.
8789
8790 2006-01-23  Martin Baulig  <martin@ximian.com>
8791
8792         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8793
8794         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8795         functions directly.
8796
8797         * driver.c: debug-debugger.c is only available if
8798         `MONO_DEBUGGER_SUPPORTED' is defined.   
8799
8800 2006-01-23  Martin Baulig  <martin@ximian.com>
8801
8802         * debug-debugger.c: Only enable this on platforms where the Mono
8803         Debugger is working (x86 and x86_64).
8804
8805 2006-01-21  Martin Baulig  <martin@ximian.com>
8806
8807         The Mono Debugger is now using the normal `mono' instead of the
8808         `mono-debugger-mini-wrapper' when executing managed code.
8809
8810         * debug-debugger.c: New file; previously known as
8811         debugger/wrapper/wrapper.c.
8812
8813         * debug-mini.c (mono_init_debugger): Removed.
8814
8815         * driver.c (mono_main): Added new `--inside-mdb' command line
8816         argument which is used when running inside the debugger.
8817
8818 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8819
8820         * liveness.c (mono_analyze_liveness): Remove some unused data
8821         structures.
8822
8823 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8824
8825         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8826
8827 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8828
8829         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8830         depends on implementation details of monobitset.
8831
8832         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8833         Fixes #77271.
8834
8835 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8836
8837         * liveness.c: Update after monobitset changes.
8838
8839 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8840
8841         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8842
8843 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8844
8845         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8846
8847         * mini-s390x.c: Remove warning messages.
8848
8849 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8850
8851         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8852
8853 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8854
8855         * generics.2.cs: Add ldelem/stelem_any test.
8856
8857 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8858
8859         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8860
8861 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8862
8863         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8864         
8865 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8866
8867         * generics.2.cs: Reenable vtype tests.
8868
8869         * inssel-x86.brg: Remove an icorrect valuetype rule.
8870
8871 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8872
8873         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8874         initial support for OP_ABS.
8875
8876 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8877
8878         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8879
8880 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8881
8882         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8883         conversion and implement LADD/LSUB.
8884
8885         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8886         architectures.
8887
8888 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8889
8890         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8891
8892         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8893         architectures.
8894
8895 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8896
8897         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8898         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8899         (stack walk problem).
8900
8901 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8902
8903         * aot.c (mono_aot_load_method): Fix a warning.
8904
8905 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8906
8907         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8908
8909 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8910
8911         * iltests.il: Add test for #77148.
8912
8913         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8914         #77148.
8915
8916 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8917
8918         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8919
8920 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8921
8922         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8923         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8924
8925         * basic-long.cs: Add lconv-to-r4/r8 tests.
8926
8927 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8928
8929         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8930
8931         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8932         here as on other archs.
8933
8934 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8935
8936         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8937
8938 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8939
8940         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8941         
8942         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8943
8944         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8945         instrument_prolog; Add memory_barrier instruction.
8946
8947 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8948
8949         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8950
8951 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8952
8953         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8954
8955         * aliasing.c inssel.brg: Fix warnings.
8956
8957         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8958         could skip initialization of some parts of memory.
8959
8960         * mini.c mini-ia64.c: Fix warnings.
8961
8962         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8963
8964 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8965
8966         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8967         a crash seen on sparc.
8968
8969         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8970         
8971         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8972
8973 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8974
8975         * mini-ops.h: Add s390_backchain instruction
8976
8977         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8978
8979         * cpu-s390.md: Add s390_backchain instruction
8980
8981         * mini-s390.c: Significant ABI changes
8982
8983         * mini-s390.h: Cater for zero length structures
8984
8985 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8986
8987         * mini-s390.c: ABI fixes
8988
8989         * inssel-s390.brg: Remove debug statements
8990
8991         * cpu-s390.md: Fix length of ATOMIC_xx operations
8992
8993 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8994
8995         * basic-float.cs: Add float<->long conversion tests.
8996
8997 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8998
8999         * mini-s390.c: Fix LOCALLOC processing.
9000
9001         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9002
9003 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9004
9005         * iltests.il: Add tests for some opcodes not covered by the other
9006         tests.
9007
9008 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9009
9010         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9011         register loading for Tail processing; Correct trace output.
9012
9013         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9014
9015         * cpu-s390.md: Correct size of jmp instruction. 
9016
9017 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9018
9019         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9020
9021 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9022
9023         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9024           Bring s390 up to current level.
9025
9026 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9027
9028         * generics.2.cs: Disable the newly added tests as they do not work yet.
9029         
9030         * generics.2.cs: Add valuetype tests.
9031
9032 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9033
9034         * basic-long.cs: Add i4->u8 test.
9035
9036         * objects.cs: Add tests for JIT intrinsic.
9037
9038         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9039         optimizations lost by a mistake.
9040
9041 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9042
9043         * basic-long.cs: Remove a test moved to objects.cs.
9044
9045         * arrays.cs: Add more array tests.
9046
9047 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9048
9049         * arrays.cs: Add new tests for multi-dimensional arrays.
9050
9051 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9052
9053         * Makefile.am (test_sources2): Add generics.2.cs.
9054         (EXTRA_DIST): Add test_sources2.
9055
9056 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9057
9058         Support for boxing and unboxing nullable types as well as the
9059         isinst operation on nullables, per the CLI ammendment.
9060
9061         * inssel.brg (CEE_ISINST): Special case for nullable
9062
9063         * mini.c (handle_unbox_nullable): new method
9064         (handle_box): Special case for nullable types
9065         (mono_method_to_ir): Call handle_unbox_nullable in correct
9066         places.
9067
9068         * generics.2.cs: New test suite
9069
9070         * Makefile.am: Support for regression tests with generics.
9071
9072 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9073
9074         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9075         allocated to registers. Fixes #76800.
9076
9077 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9078
9079         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9080
9081 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9082
9083         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9084         of platforms.
9085
9086 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9087
9088         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9089         objects.cs.
9090
9091         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9092         
9093         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9094 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9095
9096         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9097         single precision before storing to a single precision location.
9098
9099 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9100
9101         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9102
9103 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9104
9105         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9106         correct files.
9107
9108         * basic.cs: Remove test_0_byte_compares test which was moved to
9109         objects.cs a long time ago.
9110
9111 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9112
9113         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9114
9115 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9116
9117         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9118         handlers are called.
9119
9120         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9121         throwing code.
9122
9123          * mini-ia64.c: Add support for the throw->branch exception 
9124         optimization.   
9125
9126         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9127
9128 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9129
9130         * mini.c: Enabled "fastpath" deadce :-)
9131         
9132 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9133
9134         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9135         alias analysis pass to support it.
9136         * mini.h: Likewise.
9137         * ssa.c: Likewise.
9138         * liveness.c: Likewise (liveness computation can use aliasing
9139         information to be more accurate).
9140         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9141         moreover made so that "--compile-all" uses the given optimization
9142         flags and not the default ones.
9143         * aliasing.c: Alias analysis (new file).
9144         * aliasing.h: Likewise.
9145         * Makefile.am: added "aliasing.c" and "aliasing.h".
9146         
9147 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9148
9149         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9150         OP_L opcodes.
9151
9152 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9153
9154         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9155         fp >= end_of_stack exit condition, as it is not needed, and it might
9156         become true for fp eliminated frames.
9157
9158 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9159
9160         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9161         coded offsets.
9162
9163 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9164
9165         * mini-arm.c: fixed alignment of doubles/longs to match
9166         the C ABI (bug #76635).
9167
9168 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9169
9170         * aot.c: fix compilation with --enable-minimal=aot.
9171
9172 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9173
9174         * mini-arm.c: fixed compatibility with the new
9175         floating point emulator package for compares.
9176
9177 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9178
9179         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9180
9181 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9182
9183         * mini-exceptions.c (print_stack_frame): Output to stderr.
9184         (mono_handle_native_sigsegv): Ditto.
9185
9186 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9187
9188         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9189         OP_LCONV_TO_OVF_I implementation.
9190
9191         * mini-amd64.c: Add support for the throw->branch exception 
9192         optimization.
9193
9194         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9195         when the catch clause catches a more general exception, i.e. Object.
9196
9197 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9198
9199         * cpu-ia64.md: Remove unused opcodes.
9200
9201         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9202         specific defines for architectures defining USE_SIGACTION.
9203
9204         * mini-ia64.c: Fix some warnings.
9205
9206         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9207         version seemed to skip a frame.
9208
9209 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9210
9211         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9212         only calls which are made to native code use this flag.
9213
9214 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9215
9216         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9217         varargs methods as well.
9218         
9219         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9220         which have save_lmf set. Reorganize methods prologs a bit.
9221
9222         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9223         debugger to the proper place.
9224
9225 2005-10-29  Martin Baulig  <martin@ximian.com>
9226
9227         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9228         when running inside the debugger until the debugger has support
9229         for it.
9230
9231 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini.h: Fix a warning.
9234
9235 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9236
9237         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9238         we expose publicly, this returns the string.
9239
9240 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9241
9242         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9243         with fp elimination.
9244
9245 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9246
9247         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9248         native stacktrace using the glibc 'backtrace' function if available.
9249
9250 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9251
9252         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9253
9254         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9255         handle SIGSEGVs received while in native code.
9256
9257         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9258         code, call mono_handle_native_sigsegv which will abort the runtime
9259         after printing some diagnostics, instead of converting it into a
9260         confusing NullReferenceException.
9261
9262 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9263
9264         * cpu-pentium.md: Remove unused opcodes.
9265
9266 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9267
9268         * mini-amd64.h (MonoLMF): Add rsp field.
9269
9270         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9271         the lmf too.
9272
9273 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9274
9275         * mini-codegen.c (get_register_spilling): Fix some warnings.
9276
9277 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9278
9279         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9280         elimination during exception handling. Enable fp elimination by
9281         default.
9282
9283         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9284         elimination.
9285
9286 2005-10-16  Martin Baulig  <martin@ximian.com>
9287
9288         * mini-exceptions.c
9289         (mono_debugger_run_finally): New public method for the debugger.
9290
9291 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9292
9293         * debug-mini.c (mono_debug_init_method): Fix warning.
9294
9295         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9296         the 'exname' parameter const to fix some warnings.
9297
9298 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9299
9300         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9301         introduced by the previous patch.
9302
9303 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9304
9305         * basic-float.cs: Add test for precision of float arithmetic.
9306
9307         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9308         when loading/storing single values from/to memory.
9309
9310         * mini.c (mono_jit_compile_method_with_opt): Create the function
9311         pointers in the correct domain.
9312
9313 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9314
9315         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9316         introduced by previous patch.
9317         
9318         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9319         when out_filter_idx is NULL.
9320
9321         * mini-exceptions.c: Don't run filter clauses twice during exception
9322         handling. Fixes #75755.
9323
9324 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9325
9326         * aot.c: Add support for ldflda wrappers.
9327
9328         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9329         #75902.
9330
9331 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9332
9333         * mini.c, mini.h: do not consider exception handlers blocks when
9334         setting up interface variables.
9335
9336 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9337
9338         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9339
9340 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9341
9342         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9343         causes a regression.
9344
9345         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9346
9347 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9348
9349         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9350         of the OP_P definitions.
9351
9352         * TODO: Add a proposal for dealing with the CEE/OP mess.
9353
9354         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9355         optimizations from the x86 port.
9356
9357         * cpu-amd64.md: Ditto.
9358
9359         * basic.cs basic-long.cs: Add tests.
9360
9361 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9362
9363         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9364         Patrik Torstensson's implementation of my exception-handling
9365         optimization idea, when the exception object is not used
9366         (bug #62150).
9367
9368 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9369
9370         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9371         of the mul_imm optimizations from the old jit.
9372
9373 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9374
9375         * mini.c, liveness.c: patch by Patrik Torstensson and
9376         Zoltan Varga to improve performance in methods with
9377         exception clauses.
9378
9379 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9380
9381         * driver.c: Remove 'Globalization' entry from --version.
9382
9383 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9384
9385         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9386         there is a profiler interested in JIT events.
9387
9388         * aot.c: Load profile files produced by the AOT profiling module, and
9389         reorder methods based on the profiling info. Add a 'method_order' table
9390         to the AOT file to make mono_aot_find_jit_info work with the reordered
9391         methods.
9392
9393         * mini.h: Bump AOT file version info.
9394
9395 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9396
9397         * mini-arm.h: work around what looks like a gcc bug when optimizations
9398         are enabled.
9399
9400 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9401
9402         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9403         conditionals.  Use ...
9404         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9405
9406 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9407
9408         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9409         to determine the amount of memory to copy when passing valuetypes.
9410
9411         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9412         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9413
9414 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9417         information about aot.
9418
9419 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9420
9421         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9422         macros. This will allow a deadlock debugger to easily be plugged
9423         in.
9424
9425 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9426
9427         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9428
9429 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9430
9431         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9432         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9433         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9434         ($(arch_built)) [CROSS_COMPILING]: Error out.
9435
9436 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9437
9438         * aot.c: Add support for the no_special_static flag for classes.
9439
9440 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9441
9442         * Reapply reverted patches.
9443
9444         * *: Revert r50174 as well.
9445
9446         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9447
9448 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9449
9450         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9451
9452 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9453
9454         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9455         part of the SIG_HANDLER_SIGNATURE.  
9456
9457 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9458
9459         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9460         statistics.
9461
9462         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9463         introduced by previous patch.
9464
9465 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9466
9467         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9468         saved registers too.
9469
9470         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9471         upon the information returned by get_call_info ().
9472         
9473         * mini-x86.c (add_float): Fix stack size calculation.
9474         (mono_arch_call_opcode): Rewrite this so it works based up the
9475         information returned by get_call_info ().
9476         (mono_arch_get_this_vret_args): Ditto.
9477
9478 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9479
9480         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9481         in cinfo to determine the registers which need to be used.
9482
9483 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9484
9485         * driver.c (mono_main): Add --server and --desktop flags. 
9486
9487 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9488
9489         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9490         registers as global registers.
9491
9492         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9493         longer needed with the new register allocator.
9494
9495         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9496
9497         * cpu-ia64.md: Remove unused opcodes.
9498         
9499         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9500         
9501 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9502
9503         * cpu-amd64.md: Remove unused opcodes.
9504
9505         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9506         needed with the new register allocator.
9507
9508         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9509         reg-reg moves.
9510
9511 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9512
9513         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9514
9515 2005-09-16  Martin Baulig  <martin@ximian.com>
9516
9517         * exceptions-amd64.c
9518         (throw_exception): Don't call mono_debugger_throw_exception() if
9519         we're a rethrow - see the FIXME in the code.
9520
9521 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9522
9523         * mini.c (mono_init_exceptions): This only works on some architectures.
9524         
9525 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9526
9527         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9528         on ia64.
9529
9530         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9531
9532         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9533         now in mini-exceptions.c.
9534
9535 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9536
9537         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9538         now in mini-exceptions.c.
9539
9540 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9541
9542         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9543         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9544
9545         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9546         code into mini-exceptions.c. Add some assertions to it.
9547
9548 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9549
9550         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9551         (<software@solmersa.com>). Fix as errors on windows.
9552
9553 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9554
9555         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9556         method info into the LMF.
9557
9558 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9559         
9560         * mini-ia64.c: Add proper unwind info for method epilogs.
9561
9562         * exceptions-ia64.c: Add some code to help debugging.
9563         
9564         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9565
9566         * mini-exceptions.c: Fix warning.
9567
9568 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9569
9570         * mini.c: Really fix build.
9571
9572         * mini-x86.c mini-amd64.c: Fix build.
9573
9574 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9575
9576         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9577
9578         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9579         some Interlocked methods as intrinsics.
9580
9581         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9582         for Thread methods as well.
9583
9584         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9585
9586         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9587
9588         * mini-ia64.c mini-x86.c mini-amd64.c 
9589         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9590         OP_MEMORY_BARRIER.
9591         
9592         * mini.c (mono_init_exceptions): Fix build breakage.
9593
9594 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9595
9596         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9597         of instructions. Use the new ia64_unw_op macros for emitting unwind
9598         info.
9599
9600         * mini.c (mono_init_exceptions): Initialize exception handling
9601         related trampolines at startup.
9602
9603 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9604
9605         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9606
9607 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9608
9609         * mini.c: Handle type loading errors gracefully during compilation and
9610         throw the appropriate exception.
9611
9612 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9613
9614         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9615         for the mono binary.
9616
9617 2005-09-09  Martin Baulig  <martin@ximian.com>
9618
9619         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9620         the release.
9621
9622 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9623
9624         * mini-arm.h: use emulation for conv.r.un for the release.
9625
9626 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9627
9628         * mini-arm.c, objects.cs: more fixes and tests for them.
9629
9630 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9631
9632         * mini-arm.c: align structures to at least 4 bytes to be able
9633         to keep our current optimized memcpy.
9634
9635 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9636
9637         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9638
9639 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9640
9641         * mini.c: ignore SIGPIPE.
9642
9643 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9644
9645         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9646
9647         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9648
9649 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9650
9651         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9652
9653 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9654
9655         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9656         exception handling support.
9657         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9658         patch by Brian Koropoff <briank@marakicorp.com>).
9659
9660 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9661
9662         * mini.c: revert another 'optimization' which breaks when
9663         items on the eval stack need to be saved at a basic block end
9664         (bug #75940).
9665
9666 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9667
9668         * jit-icalls.c: for arrays, ensure we always provide
9669         lower bounds.
9670
9671 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9672
9673         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9674         
9675         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9676
9677 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9678
9679         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9680         arguments in their original register.
9681
9682 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9683
9684         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9685         memset/memcpy.
9686
9687         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9688         when ssapre is enabled.
9689
9690         * inssel-long.brg: Fix bug in previous patch.
9691
9692         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9693         multiplication by a constant.
9694
9695 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9696
9697         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9698         icc.
9699
9700         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9701         saving registers.
9702
9703 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9704
9705         * inssel-arm.brg: apply changes tested by Brian Koropoff
9706         <briank@marakicorp.com>.
9707
9708 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9709
9710         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9711         
9712 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9713
9714         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9715         to the same register if dreg is just a base register.
9716         (print_ins): Improve printing of membase opcodes.
9717
9718         * inssel-x86.brg: Add optimized ldind(reg) rules.
9719
9720         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9721
9722 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9723
9724         * mini.c: when running under valgrind, set the stack bottom for
9725         the GC at the actual approximate stack for the app (fixes running
9726         mono with valgrind).
9727
9728 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9729
9730         * mini.c: do no break at the first valuetype to init found
9731         (fixes bug #75791).
9732
9733 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9734
9735         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9736
9737 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9738
9739         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9740
9741 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9742
9743         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9744
9745 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9746
9747         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9748
9749         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9750         code.
9751
9752         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9753         code.
9754
9755         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9756         methods.
9757
9758 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9759
9760         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9761
9762 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9763
9764         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9765         in the tail recursion optimization.
9766
9767         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9768         debug info into the assembly file.
9769
9770         * iltests.il: Add test for filter regions.
9771
9772         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9773         initial stack of filter regions. Fixes #75755.
9774
9775 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9776
9777         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9778         stack requirements.
9779
9780 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9781
9782         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9783         the check for an already compiled method on non-ia64 platforms.
9784         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9785         proper domain.
9786
9787         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9788
9789         * inssel-x86.brg: Add some optimized call rules.
9790
9791 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9792
9793         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9794         method here.
9795
9796         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9797         mono_arch_patch_delegate_trampoline.
9798
9799         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9800
9801         * mini-trampolines.c: Fix build.
9802
9803         * mini-amd64.h: Add delegate trampolines.
9804
9805         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9806
9807         * inssel-amd64.brg: Add optimized call rules.
9808         
9809         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9810
9811         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9812
9813 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9814
9815         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9816         change.
9817
9818         * mini-ia64.c: Remove LMF fixmes.
9819
9820         * mini-ia64.h: Remove most fields from LMF.
9821
9822         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9823
9824         * mini-trampolines.c: Add support for IA64 function descriptors.
9825
9826         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9827         for IA64 function descriptors.
9828
9829 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9830
9831         * tramp-arm.c: patch the vtable for virtual calls. Added
9832         support code to register/unregister the LMF.
9833         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9834         more LMF work.
9835
9836 2005-08-19  Dick Porter  <dick@ximian.com>
9837
9838         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9839         bit value if needed.
9840
9841 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * mini.c (mini_get_method): Move handling of wrapper data here.
9844
9845         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9846
9847         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9848         virtual.
9849
9850         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9851         bblock->code does not remain empty.
9852
9853 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9854
9855         * arrays.cs: Add regression test for #75832.
9856
9857         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9858         rules. Fixes #75832.
9859
9860         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9861         instruction scheduling.
9862
9863 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9864
9865         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9866
9867 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9868
9869         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9870
9871         * mini-codegen.c: Fix VC build.
9872
9873         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9874
9875 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9876
9877         * mini.h: fix signature for mono_register_opcode_emulation.
9878
9879 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9880
9881         * mini.c: Get rid of most of the helper_sig_... constants using
9882         mono_create_icall_signature ().
9883
9884 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9885
9886         * jit-icalls.c (helper_ldstr): New helper function.
9887
9888         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9889
9890         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9891         throw, load the string using a helper call instead of creating a string object.
9892
9893         * aot.c: Update after LDSTR changes.
9894
9895         * mini.h: Bump AOT file version.
9896         
9897         * aot.c: Save class size info into the AOT file. Print more statistics during
9898         compilation.
9899
9900         * mini.h: Bump AOT file version.
9901
9902         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9903         ordering of disasm cases. Fixes #74957.
9904
9905 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9906
9907         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9908         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9909         the generic code needed for the ARM port.
9910
9911 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9912
9913         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9914         inssel-arm.brg: more ARM features and fixes.
9915
9916 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9917
9918         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9919         ARM port work in progress.
9920
9921 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9922
9923         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9924
9925         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9926
9927         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9928
9929         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9930
9931         * *-ia64.*: Ongoing IA64 work.
9932         
9933         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9934
9935 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * TODO: Remove out-of-data todo stuff.
9938
9939         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9940         dead code.
9941
9942         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9943
9944         * mini.h: Bump corlib version.
9945
9946 2005-07-27  Martin Baulig  <martin@ximian.com>
9947
9948         * mini-codegen.c
9949         (create_copy_ins): Added `const unsigned char *ip' argument; set
9950         `copy->cil_code' from it.
9951
9952 2005-07-27  Martin Baulig  <martin@ximian.com>
9953
9954         * mini-exceptions.c (mono_handle_exception): Don't call
9955         mono_debugger_handle_exception() for filters.
9956
9957 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9958
9959         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9960         as well.
9961
9962 2005-07-26  Martin Baulig  <martin@ximian.com>
9963
9964         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9965
9966         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9967         helper_compile_generic_method() if the method is actually virtual
9968         and non-final.
9969
9970 2005-07-26  Martin Baulig  <martin@ximian.com>
9971
9972         * mini.c
9973         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9974         public; this is now accessed directly by the debugger.
9975         (mono_generic_trampoline_code): Removed.
9976
9977         * debug-mini.c
9978         (mono_debug_init_method): Also add interncalls and wrappers.
9979
9980 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9981
9982         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9983
9984 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9985
9986         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9987
9988 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9989
9990         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9991
9992 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9993
9994         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9995         getting TLS offsets on AMD64 too.
9996
9997 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9998
9999         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10000
10001 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10002
10003         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10004         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10005
10006 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10007
10008         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10009
10010         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10011         to mini.c.
10012
10013         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10014         mono_sparc_is_virtual_call ().
10015         
10016         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10017
10018         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10019         trampoline parameters.
10020
10021         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10022         
10023         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10024         to mono_arch_get_vcall_slot_addr.
10025
10026         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10027         trampoline code.
10028
10029         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10030
10031 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10032
10033         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10034
10035 2005-07-19  Martin Baulig  <martin@ximian.com>
10036
10037         * exceptions-amd64.c (throw_exception): Call
10038         mono_debugger_throw_exception() here like we're doing it on i386.
10039
10040 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10041
10042         * mini-ia64.c: Add optimized TLS access support.
10043
10044 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10045
10046         * mini-exceptions.c: Ongoing IA64 work.
10047
10048         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10049
10050         * mini.c: Use the default optimization set when embedding. Fixes
10051         #75194.
10052
10053 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10056         of trampolines to a separate file.
10057
10058         * mini-trampolines.c: New file.
10059
10060         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10061         separate file.
10062         
10063         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10064         amd64/ia64 code.
10065
10066         * mini-codegen.c: Fix cygwin build.
10067
10068 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10069
10070         * mini.c: Add some minor changes needed by the IA64 port.
10071
10072         * *-ia64.*: Ongoing IA64 work.
10073
10074 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10075
10076         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10077         trampolines into arch-independent and arch-dependent parts.
10078
10079         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10080
10081 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10082
10083         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10084
10085         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10086         the xp-regalloc-branch for amd64.
10087
10088         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10089         xp-regalloc-branch for x86.
10090
10091 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10094
10095 2005-07-06  Martin Baulig  <martin@ximian.com>
10096
10097         * mini.c
10098         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10099         (mono_jit_runtime_invoke): Likewise.
10100
10101 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10102
10103         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10104         on x86 too.
10105         
10106         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10107         without loading their metadata. Reorganize the file format so exception handling+
10108         debug info is kept separate from normal method info. Create MonoJitInfo 
10109         structures for methods lazily.
10110
10111         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10112         loading metadata.
10113         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10114
10115         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10116
10117         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10118         in AOT code.
10119
10120         * mini.h: Bump AOT file version.
10121
10122 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10123
10124         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10125
10126 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10127
10128         * Makefile.am (check-local): Call semdel-wrapper.
10129
10130 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10131
10132         * mini-x86.c: Revert the last change as it seems to break the build..
10133
10134 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10135
10136         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10137         
10138         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10139
10140 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10141
10142         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10143         outside of the macro, so strange stuff doesn't happen with gcc4
10144         (NEW_AOTCONST_TOKEN): Likewise.
10145
10146 2005-06-28  Martin Baulig  <martin@ximian.com>
10147
10148         * mini.c (mini_class_is_system_array): New static method; use this
10149         instead of `klass->parent == mono_defaults.array_class' everywhere
10150         since this also works for the new generic array class.
10151
10152 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10153
10154         * inssel.brg: Remove warnings.
10155
10156 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * mini-ia64.c: Ongoing IA64 work.
10159
10160         * basic-float.cs: Add float->i1 conversion test.
10161
10162         * iltests.il: Add conv.u4 test.
10163
10164 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10165
10166         * inssel-long.brg: Fix bug caused by last change.
10167
10168 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10169
10170         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10171         BSDs.  Allows the x86 JIT to work on OSX86
10172
10173 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10174
10175         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10176         u4->i8 conversion.
10177
10178         * mini-ia64.c: Ongoing IA64 work.
10179
10180 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10181
10182         * mini-ia64.c: Ongoing IA64 work.
10183
10184         * driver.c: Clean up jit_code_hash as well when using --regression.
10185
10186         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10187
10188         * basic-long.cs: Add tests for long->u4 conversion.
10189
10190 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10191
10192         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10193         that we do not depend on undefined C behavior: the order stuff
10194         gets evaluated within an expression. Fixes mono when compiled on
10195         GCC 4.
10196
10197 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10198
10199         * *-ia64.*: Ongoing IA64 work.
10200
10201         * aot.c: Lower memory usage while loading AOT methods.
10202
10203         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10204
10205         * mini.h: Bump AOT file format version.
10206
10207 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10208
10209         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10210
10211 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10212
10213         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10214         not on callee assembly). Fixed some comments.
10215
10216 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10217
10218         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10219         it gets proper disassembly.
10220         (emit_method_info): Remove some dead code.
10221
10222         * mini.c (mini_method_compile): Allways allocate the GOT var in
10223         mono_method_to_ir for emulating opcodes.
10224
10225 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10226
10227         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10228         before freeing the code memory. Fixes #74990.
10229
10230         * objects.cs: Add regression test for #74992.
10231
10232         * liveness.c: Extend live ranges of arguments to the beginning of the
10233         method. Fixes #74992.
10234
10235         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10236         so it points into the faulting instruction.
10237
10238 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10239
10240         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10241
10242         * *-ia64.*: Ongoing IA64 work.
10243
10244         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10245
10246 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10247
10248         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10249
10250         * *-ia64.*: Ongoing IA64 work.
10251
10252 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10253
10254         * basic-long.cs: Add tests for add/sub.ovf.
10255
10256         * basic.cs: Add tests for sub.ovf.
10257
10258         * *-ia64.*: Ongoing IA64 work.
10259
10260 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10261
10262         * *-ia64.*: Ongoing IA64 work.
10263
10264         * basic.cs: Add conv.ovf.i4.un test.
10265
10266 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10267
10268         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10269         
10270 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10271
10272         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10273
10274 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * *-ia64.*: Ongoing IA64 work.
10277
10278 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10279
10280         * trace.[ch]:
10281         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10282
10283 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10286
10287 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10288
10289         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10290
10291         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10292         of a call is callable by a near call.
10293
10294 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10295
10296         * mini-ia64.c: Ongoing IA64 work.
10297
10298 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10299
10300         * genmdesc.c: Make the generated array non-static.
10301
10302         * inssel-long.brg: Fix LSHR_IMM rule.
10303
10304         * *-ia64.*: Ongoing IA64 work.
10305
10306         * *-ia64.*: Ongoing IA64 work.
10307
10308 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10309
10310         * *-ia64.*: Ongoing IA64 work.
10311
10312         * *-ia64.*: Ongoing IA64 work.
10313         
10314         * mini-ia64.c: Ongoing IA64 work.
10315
10316         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10317
10318 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10321         
10322         * objects.cs basic-long.cs: Move some tests to objects.cs.
10323
10324 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10325
10326         * *-ia64.*: Ongoing IA64 work.
10327
10328         * iltests.il: Add a new test.
10329
10330         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10331         newobj. Fixes #75042.
10332
10333 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10334
10335         * *-ia64.*: Ongoing IA64 work.
10336         
10337         * *-ia64.*: Ongoing IA64 work.
10338         
10339         * *-ia64.*: Ongoing IA64 work.
10340
10341         * basic.cs objects.cs: Move tests accessing static variables as well.
10342
10343         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10344
10345 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10346
10347         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10348
10349         * driver.c: Always print failed tests.
10350
10351         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10352         frame pointer.
10353
10354         * *ia64*: Ongoing IA64 work.
10355
10356 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10357
10358         * basic.cs: Add tests for add.ovf. Fix warnings.
10359
10360 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10361
10362         * driver.c (mono_main): Avoid crash if no argument is passed to
10363         --break;  Do not use g_error, but f_printf.   And fix all other
10364         ocurrences of the same crash.
10365
10366 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10367
10368         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10369         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10370         Fixes #74742.
10371
10372 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10373
10374         * *-ia64.*: Add beginnings of IA64 backend.
10375
10376         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10377
10378 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10379
10380         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10381         Fixes #74925.
10382
10383         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10384
10385         * mini-amd64.c: Fix a warning.
10386
10387 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10388
10389         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10390         in float_neg. Fixes #74897.
10391
10392         * mini-amd64.c (emit_call): Fix another near call bug.
10393
10394 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10395
10396         * declsec.c: Keep the appdomain information in the structure. Added a 
10397         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10398         value gets overwritten).
10399         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10400         an MonoAppDomain member to MonoSecurityFrame.
10401         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10402         used in the stack walk. Now use a MonoArray which grow (double) when
10403         it gets full.
10404
10405 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10406
10407         * mini.c: Re-enabled runtime cleanup, since running threads should
10408         now properly stop when exiting.
10409
10410 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10411
10412         * mini-codegen.c: New file contaning the arch-independent local
10413         register allocator. Not used by any architectures yet.
10414
10415         * mini.h linear-scan.c: Merge some changes from the 
10416         mini-xp-local-regalloc branch.
10417
10418 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10419
10420         * mini-amd64.c (emit_call): Fix calls to native functions when the
10421         runtime is compiled as a shared library. Fixes #74756.
10422
10423         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10424         on a literal field. Fixes #74751.
10425
10426 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10427
10428         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10429
10430 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10431
10432         * objects.cs: Add missing null casting test.
10433
10434 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10435
10436         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10437         in wrapper methods. Also rename 'address' variable to 'offset'.
10438
10439 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10440
10441         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10442         warnings.
10443         
10444         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10445
10446         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10447         work on windows.
10448
10449 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10450
10451         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10452
10453 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10454
10455         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10456         just the last bytes.
10457
10458 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10459
10460         * aot.c (mono_compile_assembly): Fix warning.
10461
10462         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10463         by the _MSC_VER stuff.
10464
10465 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10466
10467         * inssel-long.brg: Fix #74588.
10468
10469         * cpu-amd64.md: Fix #74591.
10470
10471         * iltests.il: Add new regression tests.
10472
10473 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10474
10475         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10476         valuetype.
10477
10478 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10479
10480         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10481
10482         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10483         from Bill Middleton <flashdict@gmail.com>.
10484
10485 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10486
10487         * arrays.cs: Add new regression test. Fix warnings.
10488
10489 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10492         and leakage in CKFINITE.
10493
10494         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10495         this to a null op since it is called on amd64 too.
10496
10497         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10498
10499         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10500         body since this is not used on amd64.
10501         
10502         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10503
10504         * mini-amd64.c: Remove obsolete fixmes.
10505
10506         * mini.c (print_method_from_ip): Fix debugging support.
10507
10508 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10509
10510         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10511         so that expressions that don't give much gain are not reduced.
10512         * ssapre.h: Likewise.
10513
10514 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10515
10516         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10517
10518         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10519
10520         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10521
10522 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10523
10524         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10525
10526         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10527
10528 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10531         stack touching.
10532
10533         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10534
10535         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10536
10537         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10538
10539         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10540         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10541
10542         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10543
10544         * mini-x86.c: Fix up stack overflow handling.   
10545
10546         * exceptions.cs: Add new regression test.
10547
10548 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10549
10550         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10551         mono_jit_thread_attach.
10552
10553         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10554
10555 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10556
10557         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10558         avoid calling constructors using callvirt.
10559
10560         * inssel.brg: Fix #74073.
10561
10562 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10563
10564         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10565         compilation with non-GCC compilers.
10566         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10567         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10568
10569 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10570
10571         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10572         klass->interface_offsets (will likely fix bug#74073).
10573
10574 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10575
10576         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10577
10578 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10579
10580         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10581         to amd64_div_reg_size ().
10582         
10583         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10584
10585 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10586
10587         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10588
10589 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10590
10591         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10592
10593 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10594
10595         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10596         
10597         * mini.c (mono_precompile_assembly): Load and precompile referenced
10598         assemblies as well. Fixes #74015.
10599
10600 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10601
10602         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10603
10604 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10605
10606         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10607         a lot of checks and (anyway) permissions cannot work until corlib is 
10608         loaded.
10609
10610 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10611
10612         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10613
10614 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10615
10616         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10617         calls (fixes bug#72824).
10618
10619 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10620
10621         * mini.c: fix tail recursion elimination (see test in bug#73936).
10622
10623 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10624
10625         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10626         some fp functions in sse2 mode.
10627
10628 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10629
10630         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10631
10632 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * mini.h mini.c: Add mono_get_jit_tls_key ().
10635
10636         * mini-x86.c: Enable fast TLS support on windows.
10637
10638 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10639
10640         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10641         * mini.c: Check for p/invoke method when generating code. If a
10642         p/invoke method, or it's class, isn't decorated with [Suppress
10643         UnmanagedCodeSecurity] then generate code to call System.Security.
10644         UnmanagedDemand (only if the security manager is active).
10645
10646 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10647
10648         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10649         last change as it seems to cause strange crashes.
10650         
10651 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10652
10653         * *.c: handle unsafe function pointers where needed.
10654
10655 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10656
10657         * mini.c (mono_jit_free_method): Remove the fixme too.
10658
10659 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10660
10661         * mini.c: As discussed, make the code actually free the delegate
10662         thunk now, to enable the debugging of delegate problems, use
10663         MONO_DEBUG=1 when running Mono. 
10664
10665         This takes also care of parts of the leaks as seen by Joe.
10666
10667 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10668
10669         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10670         thread_tls_offset calculation.
10671
10672 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10673
10674         * declsec.c: Reworked linkdemand checks for icall. The previous code
10675         was using the declaration code (untrusted) and didn't work as expected
10676         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10677         specific case.
10678
10679 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * iltests.il: Add new localloc test.
10682
10683         * mini-amd64.c: Handle large stack allocations the same way as on
10684         windows if stack overflow handling is working.
10685         
10686         * mini-amd64.c: Allocate the signal stack using mmap.
10687
10688         * mini.c (sigsegv_signal_handler): Fix reading of context.
10689
10690         * mini-exceptions.c: Fix up stack overflow handling.
10691
10692         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10693
10694         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10695
10696         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10697
10698         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10699
10700         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10701         tramp_init functions as they are no longer needed.
10702
10703 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10704
10705         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10706         
10707         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10708
10709         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10710         
10711         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10712         support that now.
10713
10714         * mini-ops.h: Add OP_LMUL_IMM.
10715
10716         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10717         long mul/div opcodes as intrinsic.
10718
10719         * mini-amd64.c (emit_call): Handle the case when the callee might be
10720         an AOT method.
10721
10722 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10723
10724         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10725         extra safe.
10726         
10727         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10728
10729         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10730
10731 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10732
10733         * mini.c (mono_codegen): Don't leak here, to help people running
10734         monogrind.
10735
10736 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10737
10738         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10739         conversions in sse2 mode.
10740
10741         * basic-float.cs: Add regression test.
10742         
10743         * mini-amd64.c: Reenable sse2.
10744
10745 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10746
10747         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10748
10749 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10750
10751         * driver.c: Copyright text should include 2005.
10752         
10753 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10754
10755         * cpu-amd64.md (load_membase): Fix more max lengths.
10756
10757 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10758
10759         * cpu-amd64.md (load_membase): Fix max length.
10760
10761         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10762
10763         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10764
10765         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10766         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10767
10768         * basic-float.cs: Add rounding regression test.
10769
10770         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10771
10772 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10773
10774         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10775         structures in registers for pinvoke wrappers.
10776
10777 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10778
10779         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10780
10781 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10782
10783         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10784         wrapper to mono_jit_thread_attach.
10785
10786         * mini.c (mini_jit_thread_attach): New jit icall.
10787
10788         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10789         native->managed wrappers.
10790
10791         * exceptions.cs: Add new regression test.
10792
10793         * mini.c (optimize_branches): Check regions in the cbranch to throw
10794         block case as well. Fixes #73242.
10795
10796 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10797
10798         * mini.c: thread safety fixes.
10799
10800 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10803         patching stuff, since delegates use jump trampolines so there is
10804         no caller.
10805
10806         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10807         jump trampolines.
10808         
10809         * tramp-amd64.c: Fix build.
10810
10811         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10812         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10813
10814         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10815         Rename this to mono_arch....
10816         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10817
10818         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10819
10820         * mini-amd64.c (emit_call): If both the caller and the callee is
10821         guaranteed to have 32 bit addresses, emit a normal call.
10822
10823         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10824
10825         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10826         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10827         method_ptr inside delegates.
10828
10829 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10830
10831         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10832         invalidated. Fixes #73001.
10833
10834         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10835
10836         * mini-x86.c: Only use stdcall for pinvokes on windows.
10837
10838 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10839
10840         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10841         * mini-x86.c: remove unreliable __thread var offset detection,
10842         use the correct accessors and enable by default.
10843
10844 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10845
10846         * mini.c (mono_jit_free_method): Fix memory leak.
10847
10848 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10849
10850         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10851
10852 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10853
10854         * cpu-amd64.md: Fix lengths of atomic opcodes.
10855
10856 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10857
10858         * driver.c: try to not imply using ICU is any good.
10859
10860 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10861
10862         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10863         functions as inline ops.
10864
10865         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10866         some Interlocked functions as inline ops.
10867
10868         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10869
10870         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10871
10872         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10873
10874         * mini.c: Add support for OP_NOT_TAKEN.
10875
10876         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10877         structures in registers for pinvoke wrappers.
10878
10879         * mini-amd64.c: Fix warnings.
10880
10881 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10882
10883         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10884
10885         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10886
10887         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10888         address instead of loading the address from it.
10889
10890         * mini-x86.c: Add support for returning small structs in registers
10891         on Win32. Fixes part of #70864.
10892         
10893 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10894
10895         * trace.c (get_token): Improve error checking.
10896
10897 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10898
10899         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10900
10901 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10902  
10903         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10904         it can be reused for MonoClass.
10905         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10906         _LINKDEMAND.
10907
10908 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10909
10910         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10911         instead of a MonoReflectionMethod. The method information wasn't used
10912         when displaying SecurityException details (but will be now).
10913
10914 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10915
10916         * Makefile.am : windows build fix.
10917
10918 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10919
10920         * iltests.il: Add new regression test.
10921
10922         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10923         #72522.
10924
10925 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10926  
10927         * mini.c: Moved linkdemand check into helper function check_linkdemand
10928         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10929         LDFTN, LDVIRTFTN).
10930
10931 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10932
10933         * declsec.c: Added statistics counter for different kinds of 
10934         LinkDemands.
10935         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10936         (and commented) declaration.
10937         * mini.c: Added statistics counter for security Demand code 
10938         generation. Added display of security statistics.
10939
10940 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10941
10942         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10943         Fix compilation errors under gcc-2.95.
10944
10945 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10946
10947         * mini.c, driver.c: Use the new jit trampoline hashtable
10948
10949 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10950
10951         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10952
10953 2005-02-11  Martin Baulig  <martin@ximian.com>
10954
10955         * debug-mini.c (mono_debug_close_method): Free the line number array.
10956
10957 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10958
10959         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10960         icalls.
10961
10962         * mini.h: Bump AOT file format version. 
10963
10964 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10965
10966         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10967         APTC and P/Invoke.
10968         * declsec.h: Added macros to get/set lazyly initialized security 
10969         informations about assemblies. Added new enum for different type of
10970         possible LinkDemand violation. Added function to check LinkDemands.
10971         * mini.h: Added a field to MonoCompile to hold any security violation
10972         detected when JITting a method (so it can be thrown later).
10973         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10974         and CEE_CALLVIRT. Added code to throw exception at the end of
10975         mini_method_compile (note: the exception is unhandled right now).
10976
10977 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10978
10979         * mini.c, jit-icalls.c: use the managed implementation of
10980         memset for initobj and memset, to avoid managed <-> unmanaged
10981         transitions.
10982
10983 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10984
10985         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10986         optimization if it would need a GOT var.
10987
10988         * basic.cs: Add tests for constant propagation and switch statements.
10989
10990         * ssa.c: Fix out-of-range constant propagation and switch statements.
10991
10992 2005-02-09    <vargaz@freemail.hu>
10993
10994         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10995
10996 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10997
10998         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10999
11000 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11001
11002         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11003
11004 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11005
11006         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11007         arithmetic operations.
11008
11009 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11010
11011         * mini-ppc.c: add a workaround for broken user code that
11012         DllImports vararg functions with non-vararg signatures.
11013
11014 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11015
11016         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11017         meaningfull error message for assemblies written in Managed C++.
11018
11019         * tramp-amd64.c mini-amd64.h: Add support for 
11020         create_trampoline_from_token ().
11021
11022         * aot.c mini-x86.c abcremoval.c: Applied patch from
11023         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11024
11025 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11026
11027         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11028         which takes a MonoImage/token as parameter instead of a MonoMethod.
11029
11030         * aot.c: Use the new trampoline for initializing vtables.
11031
11032         * aot.c: Add support for ldfld/stfld_remote wrappers.
11033
11034         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11035         rules for compare <MEM>, IMM.
11036
11037         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11038
11039         * aot.c: Handle inherited finalizers correctly.
11040
11041 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11042
11043         * inssel.brg (stmt): Add a missing _setup_... ().
11044
11045         * aot.c: Save some parts of the class state to the AOT file and use it
11046         to recompute that state when a class is initialized.
11047
11048         * mini.c: Install AOT hooks into the runtime.
11049
11050         * mini.h: Bump AOT file format version.
11051         
11052         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11053         Fixes #72148.
11054
11055         * iltests.il: Add new test.
11056
11057 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11058
11059         * mini.c: fix typo.
11060
11061 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11062
11063         * mini.c: setup the statistical profiler in the thread attach
11064         callback to cope with the new single thread code.
11065
11066 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11067
11068         * mini-ppc.c: ensure we have enough room for the profiler
11069         calls (fixed bug#72084).
11070
11071 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11072
11073         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11074         it.
11075
11076 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11077
11078         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11079
11080 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11081
11082         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11083         to succesfully execute parrotbench).
11084         * ssapre.h: Likewise.
11085
11086 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11087
11088         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11089         variable for stores to method arguments (fixes a SSAPRE issue).
11090
11091 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11092
11093         * mini.c: handle value types in dup, fixes gen-112.cs.
11094
11095 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11096
11097         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11098         sequence for calls in dynamic methods to avoid thunks.
11099
11100 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11101
11102         * mini.c: correctly remove dynamic methods from the hashtable.
11103
11104 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11105
11106         * driver.c: Disabled SSAPRE until fix the bug that appears
11107         in IronPython's parrotbench.
11108
11109 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11110
11111         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11112
11113         * mini.c (mono_method_to_ir): Revert the previous change.
11114         
11115         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11116         when AOT compiling.
11117
11118         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11119         mono_jit_info_table_find () etc. when running under valgrind.
11120
11121         * inssel.brg: Fix warnings.
11122
11123         * mini-exceptions.c: Fix warnings.
11124
11125 2005-01-31  Martin Baulig  <martin@ximian.com>
11126
11127         * driver.c (compile_all_methods_thread_main): Don't try to compile
11128         generic methods or anything which has type parameters.
11129
11130 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11131
11132         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11133
11134         * TestDriver.cs: Add --verbose flags.
11135
11136         * graph.c ssa.c: Fix 64 bit warnings.
11137         
11138         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11139         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11140         Fix 64 bit warnings.
11141
11142         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11143         variable not spotted by gcc.
11144         
11145         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11146         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11147         X86_COMPARE_MEMBASE opcodes.
11148
11149         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11150
11151 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11152
11153         * *: MonoMethod->signature might be NULL now. You *MUST* use
11154         mono_method_signature.
11155
11156 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11157
11158         * driver.c (compile_all_methods_thread_main): Compile the methods
11159         without invoking cctors.
11160
11161 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11162
11163         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11164         * basic-calls.cs: test for the above.
11165
11166 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11167
11168         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11169         MonoJitInfo changes.
11170
11171 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11172
11173         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11174         eagerly if it contains dynamic methods.
11175         
11176         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11177
11178         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11179         trace, it is now computed by an icall from trace_ips.
11180         
11181         * mini-exceptions.c: Fix a warning.
11182
11183 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11184
11185         * mini-exceptions.c: don't bother getting stack trace info if
11186         it's not going to be used.
11187
11188 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11189
11190         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11191         ssapre-mini-ops.h.
11192
11193 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11194
11195         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11196
11197         * aot.c: Avoid calling mono_method_get_header () if not needed.
11198
11199         * mini.h: Bump AOT file format version.
11200         
11201         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11202
11203         * mini.c (mono_print_tree): Print more info for calls.
11204
11205 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11206
11207         * declsec.h: Remove warning by adding missing include for marshal.h
11208
11209 2005-01-26  Martin Baulig  <martin@ximian.com>
11210
11211         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11212         `ip' twice.
11213
11214 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11215
11216         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11217         flags.
11218
11219         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11220
11221         * aot.c (mono_compile_assembly): Fix a warning.
11222
11223 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11224
11225         * declsec.c: Look for security attributes on the original MonoMethod 
11226         (and not the wrapped one). This fix permissions on icalls.
11227
11228 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11229
11230         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11231
11232         * mini.c (mono_allocate_stack_slots): Add a fixme.
11233
11234         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11235
11236 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11237
11238         * inssel.brg: optimize casts of sealed types (more
11239         optimizations waiting for fixes in remoting).
11240
11241 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11242
11243         * inssel.brg (stmt): Add another dummy rule.
11244
11245         * driver.c: Fix warnings.
11246
11247         * driver.c (mono_main): If running under valgrind, instruct glib to use
11248         the system allocation functions so valgrind can track the memory
11249         allocated by the g_... functions.
11250
11251         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11252
11253         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11254
11255         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11256
11257         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11258         variables in try regions.
11259
11260         * mini.c (mini_method_compile): Don't disable optimizations on large
11261         methods when AOT compiling.
11262
11263         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11264         allocate stack slots. Not yet used.
11265
11266 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11267
11268         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11269
11270 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11271
11272         * mini-ppc.c: make the branch info relative as the code
11273         buffer can be reallocated.
11274
11275 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11276
11277         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11278         * driver.c: Removed the AOT/security restriction. Now initialize the
11279         security manager (in metadata) if --security is used.
11280         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11281         rather than the pointer to declarative security, when AOT is used.
11282
11283 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11284
11285         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11286         basic blocks, reduced intrinsic exception throwing code size.
11287
11288 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11289
11290         * driver.c (mini_usage): Reorder the usage screen.
11291
11292 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11293
11294         * mini.c (mono_resolve_patch_target): Fix warning.
11295
11296 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11297
11298         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11299         previous patch.
11300
11301         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11302
11303         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11304         breaks the amd64 build.
11305
11306         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11307         register allocation. Fixes #71454.
11308
11309         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11310
11311         * arrays.cs: Add new regression test.   
11312
11313 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11314
11315         * ssapre.c: Turned usage of snprintf to GString.
11316         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11317         (I left it on by mistake in my previous commit).
11318
11319 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11320
11321         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11322         on cond branch optimization (fixes bug# 71515).
11323
11324 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11325
11326         * abcremoval.c: Fixed bug 71062.
11327         * abcremoval.h: Likewise.
11328
11329 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11330
11331         * mini.c: Added a new functionality to optimize_branches, the removal
11332         of useless basic blocks, and fixed some problem in the removal of
11333         critical edges; some utility functions added for both purposes.
11334         * ssapre.c: Added complex expression support, and fixed bug 70637.
11335         * ssapre.h: Likewise.
11336         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11337         enabled in SSAPRE.
11338         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11339         * driver.c: Re-enabled SSAPRE.
11340
11341 2005-01-19  Martin Baulig  <martin@ximian.com>
11342
11343         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11344         the result of mono_get_method_constrained().
11345
11346 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11347
11348         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11349         manager.
11350
11351 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11352
11353         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11354         be detected.  Fixes #59296.
11355
11356 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11357
11358         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11359         which can happen. Fixes #71361.
11360
11361 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11362
11363         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11364         manager.
11365
11366 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11367
11368         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11369         appdomain-unload.exe to fail.
11370         
11371         * mini.c: Fix some memory leaks.
11372
11373 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11374
11375         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11376         Fixed bug and sped up some codepaths.
11377
11378 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11379
11380         * mini.c: Fix some memory leaks.
11381
11382         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11383         conversion.
11384
11385         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11386
11387         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11388         #71320.
11389
11390         * iltests.il: Add regression test for #71320.
11391
11392 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11393
11394         * mini.c (mono_codegen): Fix installation of profiler hooks.
11395
11396         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11397
11398 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11399
11400         * mini.h, mini.c, cfold.c: optimize access to enum
11401         readonly fields, too. Eval conditional branches if possible
11402         to perform unreachable code removal in more cases.
11403
11404 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11405
11406         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11407
11408         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11409         code manager.
11410
11411         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11412         WinXP DEP. Fixes #71244.
11413
11414 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11415
11416         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11417
11418 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11419
11420         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11421
11422 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11425         changes.
11426
11427         * mini.h: Bump AOT version.
11428
11429         * mini.h (MonoCompile): Change exvar to a hash table.
11430
11431         * mini.c: Allocate a separate exvar for each handler block.
11432
11433         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11434
11435         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11436         ex var with the pending exception and only throw if the two are equal.
11437         Fixes #68552.
11438         
11439         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11440
11441         * mini-x86.c: Fix warnings.
11442
11443         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11444         used by all the ports now.
11445
11446         * aot.c: Add write-symbols and save-temps options.
11447
11448 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11449
11450         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11451
11452 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11453
11454         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11455         operations.
11456
11457         * tramp-s390.c: Check vtable slot belongs to the domain.
11458
11459         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11460         as per other platforms.
11461
11462         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11463
11464 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11465
11466         * driver.c: we don't run the Main() code in a subthread anymore.
11467
11468 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11469
11470         * mini.c: added experimental rtc support in the statistical
11471         profiler: if the user has the permission, more accurate statistics
11472         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11473         The MONO_RTC value must be restricted to what the linux rtc allows:
11474         power of two from 64 to 8192 Hz.
11475
11476 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11477
11478         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11479
11480 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11481
11482         * mini-ppc.c: better icache flush for smp.
11483
11484 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11487
11488         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11489         amd64 port, not yet used.
11490
11491 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11494         a struct type.
11495
11496 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11497
11498         * driver.c: Added --security option to activate the security manager.
11499         Right now this will allow code generation for declarative demands and
11500         is disabled when AOT is specified.
11501         * mini.c: Add code generation for declarative security demands.
11502         * mini.h: Add mono_use_security_manager as an extern gboolean.
11503
11504 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11505
11506         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11507         emitting more dense assembly code.
11508
11509         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11510         exception throwing stuff.
11511
11512 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11513
11514         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11515         dead code.
11516
11517         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11518         left in by mistake.
11519
11520         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11521         fixed.
11522
11523         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11524
11525         * tramp-*.c: Only patch vtable slots if the object is in the current
11526         domain. Fixes appdomain-unload.exe.
11527
11528         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11529         
11530         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11531         x86 branch.
11532
11533 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11534
11535         * mini.c (reverse_branch_op): New helper function.
11536
11537         * mini.c (optimize_branches): Run the new optimization only on 
11538         platforms which support it. Also reverse all kinds of branches.
11539
11540         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11541
11542         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11543         a throw statement.
11544
11545         * mini.c (optimize_branches): Reverse not-equals branches if the false
11546         bblock is a throw. This happens a lot of time with argument checking in
11547         corlib.
11548
11549         * mini.c (mono_codegen): Add support for placing basic blocks after
11550         the function epilogue.
11551
11552         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11553         function epilogue.
11554         
11555 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11556
11557         * mini.c (setup_stat_profiler): Only set this up if the platform
11558         supports ITIMER_PROF.
11559
11560 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11561
11562         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11563         previous patch.
11564
11565         * inssel.brg: Fix a warning.
11566
11567 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11568
11569         * mini.c: added support for statistical profiler 
11570         (run with: --profile=default:stat).
11571
11572 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11575
11576         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11577
11578         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11579         related to global registers from the amd64 port.
11580
11581 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11582
11583         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11584
11585         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11586         with global registers.
11587         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11588
11589         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11590
11591 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11592
11593         * debug-mini.c (encode_value): Fix off-by-one.
11594
11595         * aot.c (encode_value): Likewise.
11596
11597         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11598
11599 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11600
11601         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11602         AOT.
11603
11604         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11605         
11606         * aot.c (emit_method_info): Increase size of temp buffer.
11607
11608         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11609         the AOT case.
11610
11611 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11612
11613         * aot.c (emit_method_info): Fix build.
11614         
11615         * aot.c: Further rework of the AOT file format to reduce the size of
11616         the method info data.
11617
11618         * mini.h: Bump AOT file format version.
11619
11620 2004-12-27  Martin Baulig  <martin@ximian.com>
11621
11622         * mini.c (mini_get_method): New static method; call
11623         mono_get_method_full() and mono_get_inflated_method().
11624         (mono_method_to_ir): Use mini_get_method() instead of
11625         mono_get_method_full(). 
11626
11627 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11628
11629         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11630
11631 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11632
11633         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11634
11635         * inssel-amd64.brg: Add some optimization rules.
11636
11637 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11638
11639         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11640         standard not GC'd stuff is fine.
11641
11642 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11643
11644         * aot.c: Rework the AOT file format to get rid of most of the global
11645         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11646
11647         * mini.h: Bump AOT file format version.
11648         
11649 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * mini.h: Bump AOT file format version.
11652
11653         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11654         address is inside a GOT.
11655
11656         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11657
11658         * cpu-pentium.md: Increase the maximum size of some instructions which
11659         might involve a got access.
11660         
11661         * mini.c (get_method_from_ip): Another debug helper function.
11662
11663         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11664         when got var accesses are created during the decompose phase.
11665
11666         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11667
11668         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11669         argument mini_compile_method and to MonoCompile, and use this to
11670         determine whenever a given method is compiled for AOT. This allows the
11671         other methods compiled during AOT compilation to be free of AOT stuff,
11672         so the backends does not need to add special support for them by
11673         creating a fake GOT etc.
11674
11675         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11676         longer needed.
11677
11678 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11679
11680         * mini.c (mono_method_to_ir): It turns out that some of the
11681         x-appdomain wrappers are lax with types, so just ignore this for
11682         all wrappers.
11683
11684         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11685         at the vtable->klass. If it is non-shared code we can just use the
11686         vtable.
11687
11688 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11689
11690         * mini-ppc.c: access MonoDomain from tls, too.
11691
11692 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11693
11694         * declsec.c: Removed unused variable (and related warning ;-)
11695
11696 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11697
11698         * iltests.il: New test for LDELEMA on an array of ref types.
11699
11700         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11701         all ldelema's on reftypes.
11702         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11703         it was the wrong place to put it.
11704
11705         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11706         register to pop to make this cleaner, at the request of Paolo.
11707
11708 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11709
11710         * mini-ops.h (OP_GETHASHCODE): New op.
11711
11712         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11713
11714         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11715         operation.
11716
11717         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11718         by 25%.
11719         
11720         * mini-x86.c (mono_arch_output_basic_block): Rather than
11721
11722         add ebp, 4
11723
11724         Emit
11725
11726         pop edx
11727
11728         The first is 3 bytes while the second is 1. This saves 36 kb on
11729         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11730         see a small boost because of icache locality.
11731
11732         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11733
11734 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11735
11736         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11737         started code sharing with the generic code.
11738
11739 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11740
11741         * mini-ppc.c, cpu-g4.md: added code for direct access to
11742         tls data slots.
11743
11744 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11745
11746         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11747          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11748         to OP_TLS_GET.
11749
11750 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11751
11752         * declsec.c|h: Added functions to cache the declarative stack modifiers
11753         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11754         structure.
11755         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11756         created. Register internal calls for System.Security.SecurityFrame::
11757         _GetSecurityFrame and _GetSecurityStack.
11758         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11759         the definitions for the new stack walk/callback mechanism.
11760         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11761         first security frame for LinkDemands and InheritanceDemands) and
11762         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11763         from lupus.
11764         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11765         walk initialization (lupus).
11766
11767 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11768
11769         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11770         idiom.
11771         (handle_loaded_temps): Do not create a temporary variable for
11772         things that we know are temps. They will never be modified.
11773         (mono_spill_call): Set MONO_INST_IS_TEMP
11774         (mono_emulate_opcode): ditto
11775         (emit_tree): ditto
11776         (mono_method_to_ir.CEE_DUP): ditto
11777
11778 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11779
11780         * mini.c (type_to_eval_stack_type): Make this handle the void type
11781         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11782         (emit_tree): use ip_in_bb to special case some common idioms
11783         Update all callers to pass in the IP.
11784         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11785
11786         This gives us a nice 2% speedup in mcs bootstrap.
11787
11788         * mini-x86.c (peephole_pass): Peephole pass to make
11789         mov  [foo], eax
11790         push [foo]
11791
11792         into
11793
11794         mov [foo], eax
11795         push eax
11796
11797         * mini.c (ip_in_bb): new method.
11798         (mono_method_to_ir): use this method rather than doing the hash
11799         lookup ourselves.
11800
11801         * linear-scan.c (mono_linear_scan): When expiring actives, you
11802         don't need to keep around variables that expire on this
11803         instruction. This makes it so that:
11804              a = b + 1
11805         will turn into:
11806              store (ebx add (ebx, 1))
11807         which will become
11808              add ebx, 1
11809
11810 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11811
11812         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11813         combination to avoid doing two copies. Fix up problems with previous
11814         patch.
11815
11816         * mini.c: Fix 64 bit warnings.
11817
11818         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11819
11820 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11821
11822         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11823         changes from the x86 code.
11824
11825         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11826
11827 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11828
11829         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11830         throwing code to reduce its size, unify the AOT and non-aot code and 
11831         get rid of relocations in the AOT case.
11832
11833         * mini-x86.h mini.c exceptions-x86.c 
11834         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11835         raise corlib exceptions which doesn't require relocations in the 
11836         caller.
11837
11838         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11839
11840 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11841
11842         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11843         needed.
11844
11845         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11846         in the AOT case.
11847
11848 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11849
11850         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11851         with add function when used from Inc/dec atomic 
11852         functions. Re-enabled optimization on x86.
11853         * mini-ops.h: renamed atomic_add functions to
11854         allow _add to match the Interlocked::Add and
11855         _add_next to match Interlocked::Inc/Dec.
11856
11857 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11858
11859         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11860         linking of BBs to the end BB, and enabled SSAPRE also with
11861         consprop and copyprop (which was prevented by that bug).
11862
11863 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11864
11865         * mini-x86.c: disabling the Interlocked optimizing code. 
11866
11867 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11868
11869         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11870         file version check.
11871         
11872 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11873
11874         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11875         interlocked optimization due lack of support on x86, rewrote 
11876         exchange to take into account that base may be in eax.
11877         
11878         xsp works again; activated Interlocked optimizing code.
11879         
11880 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11881
11882         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11883
11884 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * mini-ops.h: Add new opcodes.
11887
11888         * mini.h: Add new patch types. Add got_var to MonoCompile.
11889
11890         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11891         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11892         make it work with all kinds of patchable code.
11893
11894         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11895         address of the GOT, and referencing entries in the GOT.
11896
11897         * mini.c: Add code to load the GOT address if needed by an opcode.
11898
11899         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11900         independent AOT code on the x86 using an elf-style Global Offset Table.
11901
11902 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11903
11904         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11905
11906 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11907
11908         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11909         when running xsp.
11910
11911 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11912
11913         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11914         of Interlocked:Increment/Decrement/Add as inline ops.
11915         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11916
11917 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11918
11919         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11920         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11921
11922 2004-12-12  Duncan Mak  <duncan@ximian.com>
11923
11924         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11925         again. `patch_info->table_size' is no longer valid after Zoltan's
11926         commit #37636.
11927
11928 2004-12-12  Martin Baulig  <martin@ximian.com>
11929
11930         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11931         if we are the "real" method, ie. not an inlined method inside it.
11932
11933 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11934
11935         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11936         before we look in the special fields table. This fixes
11937         ../tests/thread-static-init.cs.
11938
11939 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11940
11941         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11942         for Array get_Rank and get_Length. Fixes bug #70465.
11943
11944 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11945
11946         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11947         separate structure to reduce the size of MonoJumpInfo.
11948
11949 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11950
11951         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11952
11953 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11954
11955         * mini.c (mini_get_inst_for_method): Changed to allow ports
11956         to return a MonoInst instead of opcode 
11957         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11958         
11959         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11960         Allow ports to return a created MonoInst instead of op-code, will enable
11961         new optimizations.
11962         (renamed mini_get_opcode_for_method to better reflected the functionality)
11963
11964 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11965
11966         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11967
11968 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11969
11970         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11971         Fixes #69985.
11972
11973 2004-12-08  Martin Baulig  <martin@ximian.com>
11974
11975         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11976         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11977
11978 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11979
11980         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11981         correctly.
11982
11983         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11984         arithmetic.
11985
11986 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11987
11988         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11989
11990 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11991
11992         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11993         bug introduced by the previous patch.
11994
11995 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11996
11997         * mini-ppc.c, objectc.cs: handle large structs passed by value
11998         (fixes bug #69972).
11999
12000 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12001
12002         * mini-ppc.c: OP_ARGLIST implementation from
12003         Geoff Norton  <gnorton@customerdna.com>.
12004
12005 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12006
12007         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12008         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12009
12010 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12011
12012         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12013
12014 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12015
12016         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12017         support.
12018
12019 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12020
12021         * mini-sparc.c: Zero out localled-ed memory.
12022
12023         * iltests.il: Add tests for zeroing out localloc-ed memory.
12024
12025 2004-12-04  Martin Baulig  <martin@ximian.com>
12026
12027         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12028         mono_method_get_signature_full().       
12029
12030 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12031
12032         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12033         and some utility functions (always for SSAPRE), integrated SSAPRE.
12034         * mini.h: Likewise.
12035         * driver.c: Added ssapre option.
12036         * ssa.c: Small fix on OP_ARG handling.
12037         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12038         * Makefile.am: Likewise.
12039
12040 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12041
12042         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12043         now in the xp code.
12044
12045         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12046         icall.
12047
12048 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12049
12050         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12051         
12052         * cpu-s390.md : Increase instruction length of oparglist.
12053
12054         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12055
12056 2004-11-30  Martin Baulig  <martin@ximian.com>
12057
12058         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12059         virtual generic methods.  We call a special helper_compile_generic_method()
12060         icall to retrieve the method from the vtable, inflate and compile
12061         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12062
12063         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12064
12065 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12066
12067         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12068
12069 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12070
12071         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12072         Fixes #69929.
12073
12074 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12075
12076         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12077         platforms with PIC aot.
12078
12079 2004-11-28  Martin Baulig  <martin@ximian.com>
12080
12081         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12082         Fixes gen-112.cs.
12083
12084 2004-11-28  Martin Baulig  <martin@ximian.com>
12085
12086         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12087         the result of mono_type_get_underlying_type() to check whether
12088         we're byref.
12089
12090 2004-11-26  Martin Baulig  <martin@ximian.com>
12091
12092         * mini.c
12093         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12094         in the g_assert().
12095
12096 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12097
12098         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12099         the same way as the other arguments so they won't get clobbered.
12100
12101         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12102         calls through R11 since it is clobbered by the trampoline code.
12103
12104 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12105
12106         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12107         pick up in-tree mscorlib.dll.
12108
12109 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12110
12111         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12112
12113         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12114         runtime data/code are now stored in a table similar to the GOT in ELF. 
12115         This allows the code itself to be position independent.
12116
12117         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12118         loading changes.
12119
12120         * aot.c: Attach ELF type (object/function) directives to all global
12121         symbols.
12122
12123         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12124
12125         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12126
12127         * mini-amd64.h: Turn on PIC AOT code.
12128
12129         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12130         returning the offset within an OP_AOTCONST instruction where the GOT
12131         offset needs to be added.
12132
12133         * mini.h: Bump AOT file format version.
12134
12135 2004-11-25  Martin Baulig  <martin@ximian.com>
12136
12137         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12138         uninflated generic methods.
12139
12140 2004-11-25  Martin Baulig  <martin@ximian.com>
12141
12142         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12143
12144 2004-11-24  Martin Baulig  <martin@ximian.com>
12145
12146         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12147         original klass (this only applies for generic instances).
12148
12149 2004-11-24  Martin Baulig  <martin@ximian.com>
12150
12151         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12152         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12153         that array).
12154
12155 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12156
12157         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12158         localloc. Fixes #69678.
12159
12160         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12161         
12162 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12163
12164         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12165         used SSE registers on pinvoke calls. Fixes #69774.
12166
12167 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12168
12169         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12170         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12171
12172 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12173
12174         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12175         Refer directly to the mcs/ tree.
12176
12177 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12178
12179         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12180         Check if a trampoline for a synchronized method is required. 
12181
12182 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12183
12184         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12185         with localloc if needed. Throe arithmetric exception in
12186         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12187         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12188
12189 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12190
12191         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12192         types before switching on type.  Fixes #69622.
12193
12194 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12195
12196         * Makefile.am (check-local): New.  Integrate into 'make check'.
12197         (MCS,RUNTIME): Define using in-tree mono and mcs.
12198         (ILASM): New.
12199         (%.exe): Use $(ILASM).
12200
12201 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12202
12203         * mini-ppc.c: adjust initial prolog size (bug #69691).
12204
12205 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12206
12207         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12208         #69664.
12209
12210 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12211
12212         * Makefile.am (clean-local): Rename from 'clean'.
12213
12214 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12215
12216         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12217         to mono_arch_is_int_overflow. 
12218         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12219         SIGFPE events.
12220
12221 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12222
12223         * declsec.c|h: New files to support declarative security attributes.
12224         Added function to check if a method has (applicable) security.
12225         * mini.c|h: Add check for declarative security attributes in
12226         mono_method_check_inlining.
12227         * Makefile.am: Added declsec.c and declsec.h to the build.
12228
12229 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12230
12231         * mini.c, mini.h: update to keep dynamic code info per-domain.
12232
12233 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12234
12235         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12236         (mini_init): Get rid of it from here too.
12237
12238 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12239
12240         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12241         implemented OP_RETHROW (patch by Geoff Norton
12242         <gnorton@customerdna.com>).
12243
12244 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12245
12246         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12247         between appdomains.  Fixes appdomain-unload on PPC.
12248
12249 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12250
12251         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12252         mini-exceptions.c: handle the new wrapper types.
12253         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12254         token value as a MonoClass* when compiling a wrapper.
12255         mono_jit_create_remoting_trampoline now takes an additional
12256         MonoRemotingTarget parameter.
12257         
12258 2004-11-10  Martin Baulig  <martin@localhost>
12259
12260         * mini.c (mono_method_to_ir): Use `generic_container->context'
12261         rather than creating a new one.
12262
12263 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12264
12265         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12266
12267         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12268
12269 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12270
12271         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12272         the experimental aot cache stuff.
12273
12274 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12275
12276         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12277         mini-exceptions.c: update to exception clause structure changes.
12278
12279 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12280
12281         * exceptions-x86.c (throw_exception): Fix warnings.
12282
12283         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12284         for OP_RETHROW.
12285
12286 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12287
12288         * exceptions-sparc.c (get_throw_exception): Really fix this.
12289
12290 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12291
12292         * tramp-*.c: we no longer support icalls without wrappers, so
12293         a bit of code can be removed here
12294
12295 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12296
12297         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12298         patch.
12299
12300         * cpu-sparc.md: Add op_rethrow.
12301
12302         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12303
12304         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12305
12306         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12307         * mini-ops.h: Add OP_RETHROW.
12308
12309         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12310
12311         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12312
12313 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12314         
12315         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12316         Makes the output much easier to read
12317
12318 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12319
12320         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12321         prevents another huge leak when compiling with ssa. Secondly, the
12322         performance of doing this rather than freeing the lists is much
12323         better. GList does a lock every time you allocate a list link,
12324         so that it can use a memory pool. So, it is better to just use
12325         a memory pool of our own.
12326         
12327         * ssa.c, linear-scan.c: replace g_list_remove_link with
12328         g_list_delete.  The remove one does not free the GList, so we were
12329         leaking memory. On -O=all --compile-all with corlib, this cut down
12330         3 MB of allocations.
12331
12332 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12333
12334         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12335
12336         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12337
12338         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12339         into a new function mono_create_jit_trampoline ().
12340
12341 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12342
12343         * trace.c (get_spec): Allow tracing of classes without a namespace.
12344
12345 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12346
12347         * mini.c: Fix pointer overwrite in mini_method_compile.
12348
12349 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12350
12351         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12352         The darwin ABI needs some special handling for 1 and 2 byte structs
12353         Lets use lbz/lhz instead of lwz everywhere.
12354         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12355         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12356         Use stb/sth for the former, and put the latter always on stack instead of in
12357         argument registers.
12358
12359 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12360
12361         * trace.c (is_filenamechar): Add '_'.
12362
12363 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12364
12365         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12366
12367         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12368
12369 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12370
12371         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12372         depends on libmonogc. Fixes #68805.
12373
12374 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12375
12376         * mini.c (mono_jit_free_method): Provide extra information for
12377         this error.  Currently this leaks, but will be turned into a
12378         developer option in the future.
12379
12380 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12383
12384 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12387         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12388         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12389
12390 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12391
12392         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12393         trampolines for AOT code.
12394
12395 2004-10-22    <vargaz@freemail.hu>
12396
12397         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12398         constructed types. Fixes #68136.
12399
12400 2004-10-21  Martin Baulig  <martin@ximian.com>
12401
12402         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12403         if it returns true, unwind the stack to the call instruction.
12404
12405 2004-10-21    <vargaz@freemail.hu>
12406
12407         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12408
12409         * mini.h: Bump AOT version number.
12410
12411         * objects.cs: Add another test for unbox trampolines.
12412
12413         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12414         valuetype methods.
12415
12416 2004-10-20    <vargaz@freemail.hu>
12417
12418         * driver.c: Add SHARED to the set of optimizations tested.
12419
12420         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12421
12422         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12423         used by CEE_NEWARR.
12424
12425         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12426
12427 2004-10-20  Martin Baulig  <martin@ximian.com>
12428
12429         * mini-exceptions.c (mono_handle_exception): Call
12430         mono_debugger_handle_exception() to tell the debugger about
12431         catch/finally clauses.
12432
12433 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12434
12435         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12436
12437         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12438         #68447.
12439
12440 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12441
12442         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12443         methods as their native size, fixed bug #57543, #57545.
12444         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12445         This saves a temporary register and mullw call down into 1 (minor perf
12446         increase for cases like sum = sum * 5;  This use to translate into:
12447             li r11,5
12448             mullw r28,r28,r11
12449         It now translates to
12450             mulli r28,r28,5
12451
12452 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12455         #68388.
12456
12457 2004-10-11  Martin Baulig  <martin@ximian.com>
12458
12459         * mini.c (mono_method_to_ir): If we're a generic method, get the
12460         MonoGenericContainer from our MonoMethodNormal and create a
12461         MonoGenericContext from it.
12462
12463 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12464
12465         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12466
12467         * basic-long.cs: Add test for checked i8->i2 cast.
12468
12469 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12470
12471         * inssel-ppc.brg: added a couple of speedup rules.
12472
12473 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12474
12475         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12476         to speed up rebuilds.
12477
12478 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12479
12480         * mini-s390.c: Minor fix to OP_OR_IMM.
12481
12482 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12483
12484         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12485         better. Fixes appdomain-unload.exe on sparc.
12486
12487 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12488
12489         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12490         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12491         see bug 67324.
12492
12493 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12494
12495         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12496
12497 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12498
12499         * mini.c: Always generate a field read/write wrapper for members
12500         of the class MarshalByRefObject since the actual instance could
12501         be a CBO.
12502
12503 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12504
12505         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12506
12507 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12508
12509         * driver.c mini.h trace.c: Move the setting of the main assembly into
12510         a separate function called mono_trace_set_assembly () and call it after
12511         actually loading the main assembly. Fixes #66872.
12512
12513 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12514
12515         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12516         using the code manager.
12517
12518 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12519
12520         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12521
12522 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12523
12524         * cpu-amd64.md: Fix bug in previous patch.
12525         
12526         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12527         #66650.
12528
12529 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12530
12531         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12532         mini-exceptions.c: updates for changed stack walk interface.
12533
12534 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12535
12536         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12537
12538 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12539
12540         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12541
12542 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12543
12544         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12545         since assemblies can't be unloaded.
12546         
12547 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * cpu-amd64.md: Fix more instruction lengths.
12550
12551         * cpu-amd64.md: Fix lengths of some instructions.
12552
12553 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12554
12555         * inssel.brg: Make the array ldelema check aot friendly.
12556
12557 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12558
12559         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12560
12561         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12562
12563 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12564
12565         * mini-x86.c: Fix build.
12566
12567         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12568         mono_type_get_underlying_type () helper function to simplify code.
12569         
12570 2004-09-09  Martin Baulig  <martin@ximian.com>
12571
12572         * mini-amd64.c: Don't access `type->data.klass' directly, call
12573         mono_class_from_mono_type() instead since the type may be a
12574         generic instance.
12575
12576 2004-09-09  Martin Baulig  <martin@ximian.com>
12577
12578         * mini-amd64.c (get_call_info): Fix support for generic instances.
12579         (add_valuetype): Use mono_class_from_mono_type() to get the class
12580         since we can be a generic instance.
12581
12582 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12583
12584         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12585
12586 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12587
12588         * liveness.c: reset spill costs on each scan: bug 62107
12589
12590 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12591
12592         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12593         unnecessary line that doesn't compile
12594
12595 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12596
12597         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12598         trampolines, make them call an error function so people can fix their
12599         code.
12600
12601 2004-09-06  Martin Baulig  <martin@ximian.com>
12602
12603         * mini.c (mono_method_to_ir): When initializing locals, handle a
12604         generic instances like a valuetype if it's a valuetype and like a
12605         class if it's a class.
12606
12607 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12608
12609         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12610         stack. Fixes #64674.
12611
12612         * exceptions.cs: Add test for unwinding of call arguments.
12613
12614 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12615
12616         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12617         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12618         set the carry/borrow flag). The sparc and s390 implementations
12619         can now use optimized versions (and simplify the code). ppc bugfixes.
12620
12621 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12622
12623         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12624
12625 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12626
12627         * inssel-amd64.brg: Remove leftover 32 bit rule.
12628
12629         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12630
12631 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12634         mono_arch_find_jit_info functions into a new function. Fix a memory
12635         leak.
12636
12637         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12638         refactored code.
12639         
12640 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12641
12642         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12643         as well.
12644         
12645         * exceptions.cs: Add array size tests.
12646
12647         * mini.c: Allocate a separate icall wrapper for each arity of 
12648         mono_array_new_va. Fixes #59509.
12649
12650         * exceptions.cs: Add testcase for 64578.
12651
12652         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12653
12654         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12655         
12656 2004-09-02  Martin Baulig  <martin@ximian.com>
12657
12658         * mini.c (mono_method_to_ir): When initializing the locals, call
12659         handle_initobj() on the generic instance itself, not its
12660         underlying type.
12661
12662 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12665         MonoJitInfo for dynamic methods.
12666
12667         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12668
12669         * mini.c: Add support for freeing JIT data for dynamic methods.
12670         
12671 2004-09-01  Martin Baulig  <martin@ximian.com>
12672
12673         * mini-x86.c (is_regsize_var): Added support for generic
12674         instances.
12675         (mono_arch_emit_prolog): Make this compile again, use
12676         `x86_push_imm_template (code)'.
12677
12678 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12679
12680         * mini-x86.c: make all push_imm instructions that get
12681         patched always emit the long form
12682
12683 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12684
12685         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12686         in a per-domain hash.
12687
12688         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12689         types.
12690
12691 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12692
12693         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12694         work.
12695         
12696         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12697         work.
12698
12699         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12700         Beginnings of SSE2 support.
12701
12702         * exceptions.cs: Add more tests for checked int<->uint casts.
12703
12704 2004-08-28  Martin Baulig  <martin@ximian.com>
12705
12706         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12707         generic instances.
12708
12709         * mini.c
12710         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12711         Handle generic instances recursively.
12712
12713 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12714
12715         * iltests.il: test for conv.u8 on a constant
12716
12717 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12718
12719         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12720         LCONV_x4 (shrun_32 (membase)).
12721
12722 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12723
12724         * inssel-x86.brg: c&p rules for push/setret of long
12725
12726 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12727
12728         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12729         compare (regvar, base)
12730
12731         * inssel-x86.brg: more burg love
12732
12733         * inssel.brg: more cleanup
12734
12735         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12736
12737 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12738
12739         * basic-long.cs, basic-calls.cs: new tests for optimization.
12740
12741 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12742
12743         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12744         patch.
12745
12746 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12747
12748         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12749         
12750 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12751
12752         * inssel.brg (mini_emit_memcpy): use 
12753         NO_UNALIGNED_ACCESS to disable memcpy optimization
12754
12755 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * mini-amd64.c: Handle generic types in various places.
12758
12759         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12760
12761 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12762
12763         * mini.c (handle_box): Fix warning.
12764
12765         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12766
12767         * mini-amd64.h: Enable the emit_state optimization.
12768
12769         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12770
12771         * mini-amd64.c: Add some new 64 bit peephole opts.
12772
12773         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12774
12775         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12776
12777         * mini-amd64.c: Register allocator fixes.
12778
12779         * mini.c: Add an optimization to emit_state to avoid allocation of new
12780         registers on some platforms.
12781
12782 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12785
12786         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12787         allocation. Fixes #63085.
12788
12789         * basic-long.cs: Add new regression test.
12790
12791         * mini-amd64.c: Register allocator improvements.
12792
12793 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * mini-amd64.c (read_tls_offset_from_method): Add another code
12796         sequence.
12797
12798         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12799         instruction sequence for nullifying class init trampolines.
12800
12801         * objects.cs: Add new regalloc test.
12802
12803         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12804
12805 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12806
12807         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12808         
12809         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12810         arguments.
12811
12812         * driver.c: Fix profiling after TLS changes.
12813         
12814         * driver.c (mono_main): Set mono_stats.enabled if needed.
12815
12816         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12817         CEE_BOX.
12818
12819 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12820
12821         * mini-x86.c: use a 1 op rather than a 2 op tls access
12822         instruction -> faster.
12823
12824 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12825
12826         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12827         x86 backend.
12828
12829 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12830
12831         * exceptions-sparc.c (throw_exception): fix typo
12832
12833 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12834
12835         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12836         set tree->dreg correctly with tls. Allow any
12837         register to be used.
12838
12839         * mini-x86.c (read_tls_offset_from_method): add new code
12840         generation pattern seen with GCC.
12841
12842
12843 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12844
12845         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12846         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12847         exceptions-sparc.c: fix some performance issues in exception
12848         handling and setting of the stack trace for exceptions that were
12849         already thrown.
12850
12851 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12852
12853         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12854         x86 backend.
12855         
12856         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12857         registers.
12858
12859 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12860
12861         This patch inlines tls access, when possible.
12862         
12863         * mini.h: new arch functions for TLS intrinsics.
12864         All platforms updated with a stub.
12865
12866         * mini.c: use the new intrinsics
12867
12868         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12869         arch specific intrinsic for tls variables
12870
12871 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12872
12873         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12874         under windows.
12875
12876 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12877
12878         * mini.c: thread local allocation
12879
12880 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12883
12884         * Makefile.am: Link against the static version of libmonogc.
12885         
12886         * Makefile.am: Link the static versions of the convenience libraries
12887         into the mono executable.
12888
12889         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12890
12891 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12892
12893         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12894         on integer overflow.
12895
12896         * mini-amd64.c: Reorganize function call code.
12897
12898         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12899
12900 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12901
12902         * inssel-x86.brg: use xor eax,eax.
12903         
12904         * basic.cs: new tests
12905
12906 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12907
12908         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12909         in exception throwing code.
12910         
12911 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12912
12913         * inssel-x86.brg: use xor esi,esi.
12914
12915 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12916
12917         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12918         can trace methods compiled during mini_init () too.
12919
12920         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12921         CEE_CONV_U4.
12922
12923 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12924
12925         * Makefile.am: static link on x86 (r=zoltan)
12926
12927 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12928
12929         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12930         code since it causes some programs to fail.
12931
12932 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12933
12934         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12935
12936 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12937
12938         * mini.c: ovfops_op_map - add STACK_OBJ case for
12939         CONV_I 
12940         * basic.cs: add test_0_pin_string as test
12941         case for above.
12942
12943 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12944
12945         * Makefile.am: build C# if srcdir != builddir
12946
12947 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12948
12949         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12950         fall-through blocks.
12951
12952 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12953
12954         * driver.c: enable loop by default again and include abcrem in -O=all.
12955
12956 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12957
12958         * iltests.il: Add some localloc tests.
12959
12960         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12961
12962         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12963         Fixes #62574.
12964
12965         * inssel-amd64.brg: Add some optimizations.
12966
12967         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12968         for gcc-3.4.
12969
12970         * Makefile.am: Statically link mono against libmono on AMD64.
12971         
12972         * mini-amd64.c inssel-amd64.brg: Optimizations.
12973
12974 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12975
12976         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12977
12978         * tramp-amd64.c: Patch calling code in trampolines.
12979
12980 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12981
12982         * mini-amd64.c: pinvoke struct passing fixes.
12983
12984 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12985
12986         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12987         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12988
12989 2004-08-05  Duncan Mak  <duncan@ximian.com>
12990
12991         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12992         CEE_LDELEM_ANY.
12993
12994 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12995
12996         * mini-amd64.c (emit_move_return_value): Move return value for normal
12997         calls too.
12998
12999 2004-08-05  Martin Baulig  <martin@ximian.com>
13000
13001         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13002         `type->type'; just modify `type' itself when dealing with enums
13003         and generic instances.
13004         (check_call_signature): Make `simple_type' a `MonoType *'.
13005
13006 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13007
13008         * mini.c: Use OP_PADD to add offsets to addresses.
13009
13010         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13011
13012 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13013
13014         * mini-sparc.c (mono_arch_emit_epilog): fix check
13015         for folding last op into restore instruction
13016
13017 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13018
13019         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13020         helper methods using the code manager.
13021         
13022         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13023
13024         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13025
13026 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13027         
13028         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13029           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13030
13031         * mini-s390.c: fix tail processing
13032
13033 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13034
13035         * mini-ppc.c: mul.ovf.un exception name fix.
13036
13037 2004-08-03  Martin Baulig  <martin@ximian.com>
13038
13039         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13040         instances; before jumping to `handle_enum', also modify `ptype'.
13041
13042 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13043
13044         * cpu-sparc.md: fcall maximal length too small.
13045
13046 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13047
13048         * mini-amd64.c mini.h: Add initial support for passing/returning 
13049         structures to/from pinvoked methods.
13050
13051 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13052
13053         * mini-ppc.c: reg allocator fix.
13054
13055 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13056
13057         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13058
13059         * inssel.brg: Optimize memset on 64 bit machines.
13060
13061         * mini-amd64.c: Fix some vararg cases.
13062
13063 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13064
13065         * mini-s390.c: Corrected macro in emit_float_to_int
13066
13067         * s390-abi.cs: Tests to exercise the s390 ABI
13068
13069 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13072         caller saved regs.
13073
13074         * basic.cs: Add a test for add.ovf.un.
13075
13076 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13077
13078         * mini-sparc.c: add case for OP_IDIV_UN
13079
13080 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13081
13082         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13083         
13084         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13085
13086 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13087
13088         * basic.cs: regression tests.
13089
13090         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13091         regressions.
13092
13093 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13094
13095         * basic.cs: Add a new test.
13096
13097         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13098         and AOT. Various fixes and optimizations.
13099
13100         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13101
13102 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13103
13104         * mini-ppc.c: make sure temp regs are not used for global reg
13105         allocation.
13106
13107 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13108
13109         * cpu-sparc.md: conv_i8 fix for 64bits
13110
13111         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13112
13113 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13114         
13115         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13116         add opcode for cmp BYTE PTR [eax], imm.
13117
13118         * inssel.brg: Make memcpy and memset takes bases.
13119
13120 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13121
13122         * *-amd64.*: More AMD64 work.
13123         
13124 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13125
13126         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13127         add a compare-not-equal opcode.
13128         
13129 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13130
13131         * mini.c: Use mono_init_from_assembly instead of mono_init.
13132         
13133 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13134
13135         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13136
13137         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13138
13139         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13140
13141         * inssel.brg: 64 bit fixes.
13142
13143         * mini.h (MonoCallInst): Add some AMD64 specific data.
13144
13145         * mini.h: Add some OP_P opcodes.
13146
13147 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13148
13149         * basic.cs: tests for 61797 and 61740
13150
13151 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13152
13153         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13154         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13155
13156 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13159
13160         * *-amd64*.*: Ongoing AMD64 work.
13161
13162 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13163
13164         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13165
13166         * *-amd64*: Ongoing AMD64 work.
13167
13168         * mini-arch.h: Add AMD64 support.
13169
13170         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13171
13172         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13173
13174         * mini-ops.h: Add new opcodes.
13175
13176         * Makefile.am: Add AMD64 support.
13177
13178         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13179         rules into the inssel-long*.brg files.
13180
13181         * *-amd64.*: Add beginnings of AMD64 backend.
13182
13183 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13184
13185         * mini.c (print_dfn): commenting out the code that prints
13186         the cil. With -O=deadce, this makes -v -v crash.
13187         
13188         * cpu-pentium.md: make checkthis have a length of 2
13189
13190 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13191
13192         * mini-sparc.h: fix implementations of __builtin
13193         functions for Sun compiler for V9.
13194
13195 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13196
13197         * mini.c: use the new stelem.ref wrapper
13198         * exceptions.cs, arrays.cs: new stelem.ref tests
13199
13200 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13201
13202         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13203         new XSP should work with these changes).
13204
13205 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13206         
13207         * inssel-{long32,x86,}.brg: trivial optimizations.
13208         
13209 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13210
13211         * mini.c: load value when emitting box operation in
13212         constrained calls.
13213
13214 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13215
13216         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13217         is one byte shorter than cmp DWORD PTR [eax], 0.
13218
13219 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13220
13221         * inssel-ppc.brg: arguments on the stack are always
13222         relative to the stack pointer (spotted by Neale Ferguson).
13223
13224 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13225
13226         * exceptions-x86.c: delay appending the method name to the trace until
13227         after mono_jit_info_table_find is called, as this gets the real
13228         MonoMethod.
13229
13230 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13231
13232         * aot.c: register roots
13233
13234 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13235
13236         * aot.c : I could just use PLATFORM_WIN32 flag.
13237
13238 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13239
13240         * aot.c : Reverting the previous fix. This time it broke linux build.
13241
13242 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13243
13244         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13245
13246 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13247
13248         * mini.c (handle_stack_args): Remove some more debugging code.
13249         
13250         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13251
13252         * driver.c mini.h aot.c: Allow additional options to be specified with
13253         --aot and pass them to mono_compile_assembly.
13254
13255         * aot.c: Add experimental code to AOT compile all loaded assemblies
13256         on demand and save the code into a cache in the filesystem.
13257
13258         * aot.c: Add support for more wrapper methods.
13259         
13260         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13261         58863.
13262
13263         * cpu-*.md: Remove removed opcodes.
13264
13265         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13266         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13267         related icalls to marshal.c.
13268
13269 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13270
13271         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13272
13273         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13274
13275         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13276
13277 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13278         * liveness.c: If liveness is recomputated we need to reset the information
13279         for each variable. This way, if the liveness range has been narrowed
13280         by optimizations that happened after the last computation, we can return
13281         a smaller range.
13282         
13283         For example, if you have
13284         
13285         {
13286                 int i = 0;
13287                 
13288                 // Tons of code that does not affect i
13289                 
13290                 i = foo ();
13291                 ...
13292         }
13293         
13294         i = 0 is dead code and will be removed by SSA. However, when
13295         linear scan gets to the code, i will still appear to be live
13296         throughout the entire block. This prevents good register allocation.
13297
13298 2004-07-06  Martin Baulig  <martin@ximian.com>
13299
13300         * debug-mini.c (mono_debug_init_method): Allow
13301         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13302         (mono_debug_add_icall_wrapper): New method.
13303
13304         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13305
13306 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13307
13308         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13309         optimization.
13310
13311 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13312
13313         * aot.c (mono_aot_load_method): Fix loading of debug info.
13314
13315 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13316
13317         * aot.c: Add logging support.
13318
13319 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13320
13321         * mini.h: Add prototype for mono_print_method_from_ip.
13322
13323         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13324
13325         * inssel.brg: 64 bit fixes.
13326
13327         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13328         inssel-long32.brg.
13329
13330         * Makefile.am: Add SPARC64 support.
13331
13332 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13333
13334         * aot.c: Fix alignment problems on 32 bit platforms.
13335
13336 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13337
13338         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13339         SPARC64.
13340
13341         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13342         problems.
13343
13344         * mini.h: Bump AOT file version. Some 64 bit fixes.
13345
13346 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * inssel-sparc.brg: Add new rule to avoid register moves.
13349
13350         * inssel.brg: Add ldind_to_load_membase helper function.
13351
13352 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13353
13354         * mini.c: OffsetToStringData intrinsic.
13355         
13356 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13357
13358         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13359
13360         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13361         regression tests.
13362
13363         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13364 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13365
13366         * mini.c: reinstated mono_compile_get_interface_var()
13367         on x86, too, since the change breaks the Gtk# build there as well.
13368
13369 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13370
13371         * driver.c: remove loop from the default optimizations: it seems to
13372         interact badly with some of the other options (see bug #60613).
13373
13374 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13375
13376         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13377         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13378
13379 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13380
13381         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13382         vararg-using methods.
13383
13384 2004-06-21  Martin Baulig  <martin@ximian.com>
13385
13386         * mini/mini-exceptions.c
13387         (mono_handle_exception): Added `gpointer original_ip' argument.
13388         After calling mono_unhandled_exception(), call
13389         mono_debugger_unhandled_exception() and if that returns true,
13390         restore the context and return.
13391
13392 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13393
13394         * mini-ppc.c: prefer the use of relative branches so
13395         they won't need to be patched in aot code (patch from Patrick Beard).
13396
13397 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13398
13399         * aot.c: patch from Patrick Beard to make the output assembly
13400         more correct for the MacOSX assembler. Small tweak to
13401         generate sane images on Linux/PPC, too.
13402
13403 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13404
13405         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13406         case until bug #59509 is fixed (shows up in #60332).
13407
13408 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13409
13410         * mini.c: make sure the needed wrappers are compiled, too, with
13411         precomp.
13412
13413 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13414
13415         * driver.c: remove NPTL reference in --version output.
13416
13417 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13418
13419         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13420         generate valid assembly for the Mach-O assembler.
13421
13422 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13423
13424         * driver.c: don't include abcrem in the all optimization specifier
13425         since it slows down jit compilation too much for now.
13426
13427 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13428
13429         * mini.c: use BIGMUL only if both operands have the same signage.
13430         * iltests.il: Test for bug 60056. (errors related to signage in
13431         BIGMUL).
13432
13433         r=lupus.
13434
13435 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13436
13437         * mini.c, aot.c: memory leak fixes.
13438
13439 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13440
13441         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13442
13443 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13444
13445         * Makefile.am: remove the -static hack completely, it links in
13446         statically glib as well.
13447
13448 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13449
13450         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13451         * exceptions.cs: make it compile with new mcs/csc.
13452
13453 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13454         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13455         and added relevant test case.
13456
13457 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13458
13459         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13460         regressions in gtk-sharp.
13461
13462 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13463
13464         * exceptions.cs: New regression tests.
13465
13466         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13467
13468 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13469
13470         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13471
13472 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13473
13474         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13475
13476         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13477
13478 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13479
13480         * mini.c (mono_jit_runtime_invoke): Init class in this
13481         method instead of trusting mono_jit_compile_method to
13482         do the work (because wrappers can be in object class)
13483
13484 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13485
13486         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13487
13488         * basic-long.cs: New regression test.
13489
13490 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13491
13492         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13493         and div/rem checks.
13494
13495 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13496
13497         * Makefile.am: fix miguel's change to build mono statically against
13498         libmono (track build dependencies).
13499
13500 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13501
13502         * cfold.c: Some glib versions do not have G_MININT32.
13503
13504 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13505
13506         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13507         with precision of tan, atan, sin and cos, and implemented related
13508         regressions tests (fixes bug 54467, but one new problem appeared and
13509         is not fixed yet).
13510
13511 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13512
13513         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13514
13515         * exceptions.cs: Add test for constant folding && division by zero.
13516
13517         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13518         since driver.c is in libmono too, so the optimization was useless.
13519
13520         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13521         variable to driver.c so the compiler can emit more efficient code to
13522         access them.
13523
13524 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13525
13526         * Makefile.am: don't distribute generated inssel.[ch] files.
13527
13528 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13531         into the default appdomain. Fixes #58707.
13532
13533         * jit-icalls.c: Remove the broken approximation for truncl, doing
13534         no conversion is better.
13535
13536         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13537         Fixes #58863.
13538
13539 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13540
13541         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13542         of the mcrxr instruction which is not available on some processors
13543         even if it's documented to be. Implement add and sub overflow correctly
13544         (still not complete for long unsigned). Speed up icalls a bit.
13545
13546 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13547
13548         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13549         we run .cctor in the current domain instead of target_domain.
13550         
13551         Fixes bug #58558, .cctor not being called in -O=shared.
13552
13553 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13554
13555         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13556
13557 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13558
13559         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13560         which can be done with an imm8, do it that way.
13561         (mono_arch_output_basic_block): ditto for a jmp
13562         (mono_arch_emit_prolog): Computate maximum offset of a label.
13563
13564 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13565
13566         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13567         now tries to allocate prefered physical reg's for virtual
13568         regs. This reduces the number of emited spills/loads with
13569         20-30% on our core assemblies.
13570
13571 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13572
13573         * jit-icalls.c: truncl() is not needed and trunc() is
13574         the correct thing to do anyway (bug #58287).
13575
13576 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13577
13578         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13579         if available.
13580
13581 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13582
13583         * driver.c: enable loop optimizations by default.
13584
13585 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13586
13587         * mini-x86.c: fix calc of max loop size when aligning loops start.
13588
13589 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13590
13591         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13592         the stack.
13593
13594 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13595
13596         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13597         should set carry.
13598
13599         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13600
13601         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13602         
13603         * mini.c (inline_method): Allways inline some wrappers even if the cost
13604         is too large. Fixes #58785.
13605
13606         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13607         
13608 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13611         (crichton@gimp.org). Beginning of support for sparc/linux.
13612
13613         * mini-sparc.c: Optimize retrieval of LMF address.
13614
13615 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13616
13617         * exceptions-ppc.c:  handle alloca in methods with clauses.
13618
13619 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13620
13621         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13622
13623 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13624
13625         * mini.c: Delegate most of the abort signal work to 
13626           mono_thread_request_interruption, which also handles Stop and Suspend
13627           states.
13628
13629 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13630
13631         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13632         supports the save/restore lmf opcodes.
13633
13634 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13635
13636         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13637         by gcc-3.4 as well.
13638
13639         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13640
13641 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13642
13643         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13644         methods which contain array accesses.
13645
13646         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13647         boundaries. Fixes #58537.
13648
13649         * iltests.il: Add regression test for #58537.
13650
13651 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13652
13653         * mini-x86.c (mono_arch_local_regalloc): Last part of
13654         fix for bug #58633 (releasing register to early).
13655
13656 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13657
13658         * basic-long.cs: Add new regression test.
13659
13660 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13661
13662         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13663         register too early on the chain.
13664
13665 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13666
13667         * mini.c (create_helper_signature): Use a helper function to reduce
13668         the code which needs to be written. Also set the calling convention of
13669         icalls on windows. Fixes #57840.
13670
13671 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13672
13673         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13674         exceptions-ppc.c: added helper function to get the instruction address
13675         from a signal handler context.
13676
13677 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13678
13679         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13680         from gonzalo.
13681
13682 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13683
13684         * helpers.c: Add new env variable to pass args to objdump.
13685         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13686
13687 2004-05-17  Radek Doulik  <rodo@ximian.com>
13688
13689         * Makefile.am (common_sources): added abcremoval.h so it get
13690         disted and daily mono packages on go-mono.com will build again
13691
13692 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13693
13694         * abcremoval.c: Fixed coding style, added copyright header.
13695
13696         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13697
13698         * mini.h: Added prototype for abc removal main function.
13699
13700         * build_relations_propagation_table.pl: Added copyright header.
13701
13702 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13703
13704         * basic-long.cs: reg test for complex ceq_long bug.
13705
13706 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13707
13708         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13709         reg in long and clob case (bug #58343). Fixed/added comments.
13710
13711 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13712
13713         * mini.c (mono_jit_runtime_invoke): Follow new convention
13714         of calling the invoke method with an function pointer.
13715
13716 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13717
13718         * ChangeLog: Fix author of memory leak patch.
13719
13720 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13721
13722         * Makefile.am: fix make dist as well...
13723
13724
13725 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13726
13727         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13728         on archs where pointers are 4 bytes long.
13729
13730         * Makefile.am: Added abcremoval.c source file.
13731
13732         * abcremoval.c: Added abcremoval.c.
13733
13734         * abcremoval.h: Added abcremoval.h.
13735
13736         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13737
13738         * inssel.brg: Enabled bounds check removal.
13739
13740         * mini.c: Added support for abcrem optimization.
13741
13742         * mini.h: Added abcrem optimization label.
13743
13744         * driver.c: Added support for abcrem optimization.
13745
13746         * propagated_relations_table.def: Added propagated_relations_table.def.
13747
13748 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13749
13750         * mini.c, cfold.c: fix style.
13751
13752 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13753
13754         * mini.c: handle issue with the low-level implementation of
13755         some long opcodes (bug #54209).
13756
13757 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13758
13759         * basic.cs: test for my new cmov stuff.
13760
13761 2004-05-13      Patrik Torstensson
13762
13763         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13764         opt and added peephole documentation.
13765
13766 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13767
13768         * tramp-ppc.c: rewrote the generic trampoline code.
13769
13770 2004-05-11      Patrik Torstensson
13771
13772         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13773
13774 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13775
13776         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13777
13778         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13779         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13780
13781         * mini.c: Add new icalls for AsAny marshalling.
13782
13783 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13784
13785         * tramp-ppc.c, mini-ppc.c: more cleanups.
13786
13787 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13788
13789         * mini.c: no warnings.
13790
13791 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13792
13793         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13794
13795 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13796
13797         * mini.c: In the thread abort signal handler, if the thread is in the
13798         process of being stoped, don't throw the Abort exception, just stop the
13799         thread.
13800
13801 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13802
13803         * tramp-ppc.c: removed old code.
13804
13805 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13806
13807         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13808         do some simple speed optimizations on ppc.
13809
13810 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13811
13812         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13813         and large offsets in load/store.
13814
13815 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13816
13817         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13818         it causes regressions.
13819
13820 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13821
13822         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13823         support.
13824
13825 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13826
13827         * jit-icalls.c: remove warnings.
13828         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13829         speedups for unsafe code.
13830
13831 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13832
13833         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13834
13835 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13836
13837         * basic-calls.cs: Add new regression test.
13838
13839         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13840         more portable.
13841
13842         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13843
13844         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13845         is no longer used.
13846
13847 2004-05-06      Patrik Torstensson
13848
13849         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13850         long reg allocation in any reg (not only eax:edx) and implemented 
13851         long shl/shr ops in asm instead of helpers.
13852
13853 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13854
13855         * mini-sparc.h: Fix warnings.
13856
13857         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13858         stack.
13859
13860         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13861         separate statement for clarity.
13862
13863         * mini-sparc.c: Update status.
13864
13865 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13866
13867         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13868         here.
13869
13870 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13871
13872         * inssel-ppc.brg: another small pre-release workaround:
13873         we don't do overflow detection for long_sub_un.
13874
13875 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13876
13877         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13878         (also works around a weird ppc bug: 57957).
13879
13880 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13881
13882         * tramp-ppc.c: trampoline fixes.
13883
13884 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13885
13886         * mini-ppc.c: fixed typos.
13887
13888 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13889
13890         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13891         at the top of the stack. Fixed typos. Use a frame registers
13892         for all the methods with exception clauses.
13893
13894 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13895
13896         * exceptions-ppc.c: restore fp registers.
13897
13898 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13899
13900         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13901         order from the stack top (moved the stack room to save the
13902         return value for trace after the param area). Fixed corruption
13903         in restoring registers on unwind.
13904
13905 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13906
13907         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13908
13909 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13910
13911         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13912         and prolog/epilog for methods that use it. Allow
13913         enough param area room for varargs methods. Fix miguel's
13914         breakage in exception handling.
13915
13916 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13917
13918         * Makefile.am: run genmdesc only on current arch.
13919
13920 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13921
13922         * exceptions-x86.c:
13923         * mini-x86.h: fix the build on windows.
13924
13925 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13926
13927         * 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.
13928
13929         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13930
13931         * mini-exceptions.c: New file.
13932         
13933         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13934         Move some parts of the x86 exception handling code to an 
13935         arch-independent file so it can be shared with other ports.
13936
13937 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13938
13939         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13940
13941 2004-04-26  David Waite  <mass@akuma.org>
13942
13943         * driver.c: remove comma from end of enumeration declaration
13944
13945 2004-04-26  Jackson Harper  <jackson@ximian.com>
13946
13947         * driver.c: parse config file before loading first assembly. This
13948         allows the user gac to be enabled/disabled. 
13949         
13950 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13951
13952         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13953         simpler mechanism: we do not care what is encoded initially
13954         (branch absolute or relative), we care about the code and its
13955         target.  I kept the old code for reference for now.
13956
13957         The new code tries first to determine if the jump is anywhere in
13958         the -/+32 absolute meg range, if it succeeds, it encodes using the
13959         absolute branch;  If not, it tried to find something in the
13960         relative range, if not, it uses the handle_thunk code. 
13961
13962 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13963
13964         * exceptions-ppc.c: use the correct ip register on macosx.
13965
13966 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13967
13968         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13969
13970 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13971
13972         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13973         Raise exception on integer divide by zero by hand since the hw
13974         doesn't support it. Handle NaNs in FP compares.
13975
13976 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13977
13978         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13979         code reducing duplication between the platforms and enabled
13980         signal exception handling (on linux for now).
13981
13982 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13983
13984         * exceptions-ppc.c: more macosx support.
13985
13986 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13987
13988         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13989
13990 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13991
13992         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13993
13994 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13995
13996         * iltests.il: more tests.
13997
13998 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13999
14000         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14001         vars as well.
14002
14003 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14004
14005         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14006
14007 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14008
14009         * liveness.c: Mark variables as volatile in all basic blocks reachable
14010         from exception clauses.
14011
14012 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14013
14014         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14015         inlining.
14016
14017 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14018
14019         * iltests.il, basic.cs: more tests for regalloc.
14020
14021 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14022
14023         * iltests.il: Some tests for register allocation modifications
14024         I have locally.
14025
14026 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14027
14028         * exceptions.cs: Add regression test for bug #56782.
14029
14030         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14031         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14032         the beauty of fixing the same thing in 5 different files...
14033
14034 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14035
14036         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14037         methods.
14038
14039 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14040
14041         * mini.c: Add support for STRWLPARRAY marshalling convention.
14042
14043 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14044
14045         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14046         to init the context to setup the regs pointer).
14047
14048 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14049
14050         * exceptions-ppc.c: more exceptions work.
14051
14052 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14053
14054         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14055         not allowed.
14056
14057 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14058
14059         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14060         can use the memory directly.
14061
14062         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14063
14064         add x86_add_membase, x86_sub_membase, x86_mul_membase
14065
14066 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14067
14068         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14069         GENERAL_REGS they were also hardcoded for all PPC ports.
14070
14071         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14072
14073         Remove hard-coded limit for floating point registers, use
14074         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14075
14076         Notice that in MacOS X calling conventions you can fit a lot more
14077         floating point values in registers, so I should update the PInvoke
14078         test to excercise the passing of floating point values on the
14079         stack (currently broken).
14080         
14081 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14082
14083         * tramp-ppc.c (create_trampoline_code): Added
14084         JUMP_TRAMPOLINE_SIZE. 
14085         (ppc_magic_trampoline): Follow the pattern from
14086         x86_magic_trampoline: if code is set to zero, return. 
14087         (create_trampoline_code): Always pass MonoMethod to the jump
14088         trampoline, before it was passing a null.
14089         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14090         share the code with mono_arch_create_jit_trampoline. 
14091
14092         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14093         implemented.
14094         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14095         implemented.  
14096
14097         * cpu-g4.md: Added length for jmp instruction, the worst case
14098         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14099         for save_lmf).
14100
14101 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14102
14103         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14104
14105 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14106
14107         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14108         before each IL instruction.
14109
14110         * mini.c (CEE_BOX): Fix warnings.
14111
14112 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14113
14114         * mini.c: removed a few unused vars and extra whitespace.
14115
14116 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14117
14118         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14119         checks.
14120         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14121         index.
14122         (OP_GETCHR): use the above
14123         (CEE_LDELEMA): use the above.
14124
14125         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14126         version of the generic impl.
14127         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14128         (CEE_LDELEMA): use the above.
14129
14130 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14131
14132         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14133         Fixes #56317.
14134
14135         * iltests.il: Added new regression test for #56317.
14136
14137 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14138
14139         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14140         under NetBSD. Fixes #56450.
14141
14142         * liveness.c (update_gen_kill_set): Fix previous patch.
14143
14144 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14145
14146         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14147
14148 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14149
14150         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14151         ldsfld and ldsflda.
14152
14153         * inssel-sparc.brg: Add more optimizations.
14154
14155         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14156
14157 2004-04-01  Martin Baulig  <martin@ximian.com>
14158
14159         * mini.c (handle_box): New static function; moved the
14160         implementation of CEE_BOX here.
14161         (mono_method_to_ir): Added `constrained_call' variable.
14162         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14163         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14164         mono_method_get_constrained() to get the method.
14165
14166 2004-04-01  Martin Baulig  <martin@ximian.com>
14167
14168         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14169         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14170         (mono_method_to_ir): We don't need these macros anymore since
14171         mono_class_get_full() already takes care of it. 
14172
14173 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14174
14175         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14176         use @function (as doesn't accept #function here) and check the return
14177         value of system and stop if fails.
14178
14179 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14180
14181         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14182
14183 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14184
14185         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14186
14187         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14188
14189         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14190         #56223.
14191
14192         * basic-long.cs: Add test for negation of Int64.MinValue.
14193
14194 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14195
14196         * mini-sparc.c: Update status.
14197
14198         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14199
14200         * exceptions-sparc.c: Fix return value in filters.
14201
14202         * inssel-sparc.brg: Fix register allocation in some rules.
14203
14204 2004-03-28  Martin Baulig  <martin@ximian.com>
14205
14206         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14207         if neccessary.  
14208
14209 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14210
14211         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14212         
14213         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14214         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14215         remove unused conv_u4 opcode.
14216
14217         * mini-x86.c: Remove valgrind workaround since it slows down things
14218         even when mono is not run under valgrind.
14219
14220 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * mini-sparc.c: Update status.
14223
14224         * inssel-sparc.brg: Add some optimizations.
14225
14226         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14227         future delay slot filling. Add support for varargs, tail calls and JMP.
14228
14229         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14230         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14231
14232         * inssel.brg: Fix register allocation in OP_ARGLIST.
14233
14234         * inssel.brg: Fix warnings.
14235
14236 2004-03-25  Martin Baulig  <martin@ximian.com>
14237
14238         * mini.c (inflate_generic_field): Removed.
14239         (mini_get_method): Removed, use mono_get_method_full(),
14240         (mini_get_class): Removed, use mono_class_get_full().
14241         (mono_method_to_ir): Pass our generic context to
14242         mono_field_from_token().        
14243
14244 2004-03-25  Martin Baulig  <martin@ximian.com>
14245
14246         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14247         of a `MonoMethod *'.
14248         (mini_get_method): Take a `MonoGenericContext *' instead
14249         of a `MonoMethod *'.
14250         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14251         a new local variable called `generic_context' which holds the
14252         current `MonoGenericContext *'; use it to lookup things.
14253
14254 2004-03-24  Martin Baulig  <martin@ximian.com>
14255
14256         * mini.c (mini_get_class): New static method; if we're inside a
14257         generic instance, inflate the class if neccessary.
14258         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14259
14260 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14261
14262         * iltests.il: New regression test for #55976.
14263
14264         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14265         #55976.
14266
14267 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14268
14269         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14270         output.
14271
14272 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14273
14274         * liveness.c: Consider SSA stores as well as loads when making vars
14275         volatile.
14276
14277         * exceptions.cs: New regression tests for register allocation.
14278         
14279 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14280
14281         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14282         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14283           domain lock only to protect puntual access to data structures.
14284           Added access lock for sighash, jit_icall_hash_name, 
14285           jit_icall_hash_addr and domain->code_mp.
14286
14287 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14288
14289         * driver.c: Print SIGSEGV handling method.
14290
14291         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14292
14293         * mini.c (setup_jit_tls_data): Handle case when this is called
14294         multiple times for a thread.
14295
14296         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14297         is different from fbxx_un. Fixes #54303. Also use constants instead of
14298         magic numbers in a lot of places.
14299
14300 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14301
14302         * exceptions.cs: Fix cctor test when --regression is used.
14303
14304 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14305
14306         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14307         for Linux/ppc.
14308
14309 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14310
14311         * inssel-ppc.brg: fixed register assignments for some rules.
14312
14313 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14314
14315         * exceptions.cs: Add test for exceptions in static constructors.
14316
14317         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14318         static constructors outside the domain lock. Fixes #55720.
14319
14320 2004-03-17  Martin Baulig  <martin@ximian.com>
14321
14322         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14323         (inflate_generic_field): Take the `MonoMethod *' instead of the
14324         `MonoClass *' and added support for generic method.
14325         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14326         have a `field->parent->gen_params', only inflate the field if it's
14327         an open constructed type.
14328
14329 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14332         exception object instead of the preconstructed ones.
14333
14334 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14335
14336         * mini.c: reverted changed to sigsegv_signal_handler commited
14337         accidentally in the previous patch.
14338
14339 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14340
14341         * mini.c:
14342         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14343         running --aot with an old assembly.
14344
14345 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14346
14347         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14348         point values.
14349
14350         * mini-sparc.c: Add support for v9 branches with prediction.
14351
14352 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14353
14354         * mini.c (mini_init): #warning is GNUC only
14355
14356         * mini-sparc.h: implement __builtin_frame_address
14357         and __builtin_return_address for Sun C compiler
14358
14359 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14360
14361         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14362
14363 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14364
14365         * basic-calls.cs: Add test for unaligned byref long argument passing.
14366
14367         * mini-ops.h: Add sparcv9 compare and branch instructions.
14368
14369         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14370         v9 instructions if we have a v9 cpu.
14371
14372         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14373         registers for global allocation.
14374
14375         * exceptions-sparc.c: Fixes.
14376         
14377 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14378
14379         * liveness.c (mono_analyze_liveness): Optimized version.
14380
14381         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14382
14383         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14384         sparc work.
14385
14386         * basic-float.cs basic-calls.cs: New regression tests.
14387
14388 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14389
14390         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14391         sigaltstack implementation.
14392
14393         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14394         
14395         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14396         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14397
14398 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14399
14400         * mini.c: Fix warnings.
14401         
14402         * mini.c (mono_resolve_patch_target): New function which contains the
14403         arch independent part of the patching process.
14404
14405         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14406         patching code to a separate function.
14407
14408 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14409
14410         * mini.c (add_signal_handler): ifdef out on Windows
14411
14412 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14413
14414         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14415         cpu-sparc.md: Add exception handling support + other fixes.
14416
14417         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14418         typed GC detection in --version.
14419
14420         * basic.cs exceptions.cs: New regression tests.
14421
14422         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14423         the arch specific code can store data during a compilation.
14424
14425         * mini-ops.h: Add OP_SETFRET.
14426
14427         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14428         function, register a separate icall for each arity, so the icalls can
14429         get a wrapper.
14430         
14431         * mini.c (mono_print_tree): Print negative offsets in a more readable
14432         form.
14433         
14434         * mini.c: Make signal handling work on sparc.
14435         
14436         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14437
14438         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14439
14440         * jit-icalls.c: Emulate truncl by aintl on solaris.
14441
14442         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14443
14444 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14445
14446         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14447
14448 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14449
14450         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14451         a MarshalByRef type, inline a method that performs the check, taking into
14452         account that the object can be a proxy. Also implemented tow new opcodes:
14453         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14454         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14455         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14456
14457 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14458
14459         * mini-ppc.c: if a relative branch displacement is too big
14460         but it points to and area reachable with an absolute branch, 
14461         avoid the thunks.
14462
14463 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14464
14465         * mini.c: optimize small copies in cpblk.
14466
14467 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * basic-calls.cs basic-float.cs: New regression tests.
14470
14471         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14472         negative offsets from %fp. Implement localloc. Fix local register 
14473         allocation. Fix the case when the this argument needs to be saved to
14474         the stack. Implement some missing opcodes.
14475
14476 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14477
14478         * mini.c (mini_method_compile): Reenable global regalloc in methods
14479         with exception handlers.
14480
14481         * linear-scan.c (mono_varlist_sort): Fix warning.
14482
14483         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14484
14485         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14486         regalloc costs.
14487
14488         * liveness.c: Make all variables uses in exception clauses volatile, to
14489         prevent them from being allocated to registers. Fixes #42136.
14490
14491 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14492
14493         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14494         causes regressions.
14495
14496         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14497         argument to mono_arch_regalloc_cost.
14498
14499         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14500         precisely.
14501
14502 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14503
14504         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14505         Make the cost of allocating a variable to a register arch dependent.
14506
14507         * basic-calls.cs: Fix compilation of tests.
14508         
14509         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14510         helper function to cut back on the number of #ifdefs needed.
14511
14512         * mini-ppc.c: Fix compilation.
14513
14514         * basic-calls.cs: New regression tests.
14515
14516         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14517
14518         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14519         of l0 since that is callee saved.
14520
14521         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14522         to virtual calls.
14523
14524         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14525         of delay instruction.
14526
14527         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14528
14529         * mini.h (MonoCallInst): Add 'virtual' flag.
14530
14531         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14532
14533 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14534
14535         * *.cs: New regression tests.
14536
14537         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14538         work.
14539
14540         * mini.c (mono_runtime_install_handlers): Fix build.
14541
14542         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14543         'signal_stack_size' members.
14544
14545         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14546         alternate signal stack.
14547
14548         * exceptions-x86.c: Add stack overflow handling.
14549
14550         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14551         functions to arch independent code.
14552
14553         * mini.c (mono_print_tree): Print more detailed info for load_membase
14554         opcodes.
14555         
14556 2004-02-23  Martin Baulig  <martin@ximian.com>
14557
14558         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14559
14560 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14561
14562         * mini-x86.c: fixed reg allocation for div/rem.
14563
14564 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14565
14566         * driver.c (mono_main): Report some configuratio options on --version.
14567
14568 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14569
14570         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14571         low in the address space. Correctly flush memory in thunks where we
14572         output native code.
14573
14574 2004-02-20  Martin Baulig  <martin@ximian.com>
14575
14576         * mini.c (mini_get_method): New static method; inflate all generic
14577         methods and methods in open generic instances.
14578         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14579         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14580
14581 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14582
14583         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14584
14585         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14586
14587 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14588
14589         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14590
14591         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14592         it compile using Sun's compiler.
14593
14594 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14595
14596         * 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.
14597
14598         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14599
14600 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14601
14602         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14603         code.
14604         * mini-ppc.c: handle calls outside of the allowed range with thunks
14605         allocated using the code manager.
14606         * tramp-ppc.c: use the code manager to hold generated native code.
14607         Fixed the magic trampoline to just patch vtable entries.
14608
14609 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14610
14611         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14612         independent file.
14613
14614 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14615
14616         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14617         PPC.
14618
14619         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14620         if we have a working __thread implementation.
14621
14622         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14623         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14624
14625 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14626
14627         * mini-x86.c: Fix compilation under gcc 2.
14628         
14629 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14630
14631         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14632         contains a call to the wrapped function.
14633
14634         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14635         OP_<CALL>_IMM opcodes, and use them under X86.
14636         
14637         * mini.c (mono_jit_find_compiled_method): Fix warning.
14638
14639         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14640
14641         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14642
14643         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14644         functionality to mini.c.
14645
14646         * mini.c (mono_create_jump_trampoline): New function to create a jump
14647         trampoline. Return a compiled method instead of a trampoline if it
14648         exists. Add a cache for jump trampolines.
14649
14650         * mini.c (mono_jit_find_compiled_method): New function to return a
14651         compiled method if it exists.
14652
14653         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14654         mono_arch_create_jit_trampoline.
14655
14656         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14657         a jump trampoline. Fixes #52092.
14658         
14659 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14660
14661         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14662         which is not up-to-date. Add check_corlib_version () instead.
14663
14664         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14665         have to call it.
14666         
14667         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14668         since newer valgrind versions do not need it.
14669
14670         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14671         compile a method with a given set of optimizations.
14672
14673         * mini.c: Compile icall wrappers on-demand instead of at startup.
14674
14675         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14676         wrapper for an icall.
14677
14678 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14679
14680         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14681         #54063.
14682
14683         * iltests.il: Add test for non-empty stack before switch instruction.
14684
14685 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14686
14687         * mini.c: Add support for new stringbuilder marshalling conventions.
14688
14689         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14690
14691 2004-02-01  Martin Baulig  <martin@ximian.com>
14692
14693         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14694         in `ginst->mtype_argv'.
14695
14696 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14697
14698         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14699         facilitate grepping.
14700
14701 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14702
14703         * mini.c: fixed buglet in initobj generic implementation for references.
14704
14705 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14706
14707         * Makefile.am: make the version script conditional.
14708         * jit-icalls.c: handle missing truncl().
14709
14710 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14711
14712         * exceptions.cs: Add more tests for double->int conversion.
14713
14714         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14715         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14716
14717 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14718
14719         * driver.c: make --verbose --version emit an error
14720         if the loaded corlib doesn't match the runtime version.
14721
14722 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14723
14724         * mini-ppc.h: export ppc_patch().
14725         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14726         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14727         on par or better than on MacOSX.
14728
14729 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14730
14731         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14732         mono_lookup_pinvoke_call.
14733
14734         * mini-x86.c: Under windows, the default pinvoke calling convention is
14735         stdcall. Fixes #52834.
14736
14737         * mini.c (optimize_branches): Add an upper bound to the number of
14738         iterations to prevent infinite loops on strange loops. Fixes #53003.
14739
14740 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14741
14742         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14743         and ISINST. Fixes #52093.
14744
14745         * objects.cs (test_0_vector_array_cast): New tests.
14746         
14747 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14748
14749         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14750         checking in Array.Set ().
14751
14752         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14753         #52590.
14754
14755         * object.cs (test_0_multi_array_cast): New regression test.
14756
14757 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14758
14759         * exceptions-ppc.c: fix build on Linux/PPC.
14760
14761 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14762
14763         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14764         running under valgrind.
14765         (x86_magic_trampoline): Fix build bustage.
14766
14767         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14768         negative values as well. This is needed for the encoding of the line number
14769         info, since sometimes the line numbers are not in increasing order.
14770
14771 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14772
14773         * cpu-pentium.md (localloc): Increase the size of the localloc 
14774         instruction since it is a loop under Win32.
14775
14776         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14777         allocation.
14778
14779 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14780
14781         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14782         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14783         Max Horn (max@quendi.de). Fix file names in comments.
14784
14785 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14786
14787         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14788         avoid stack overflow.
14789         (replace_usage): Avoid uninitialized variable warnings.
14790
14791         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14792         and taking the address of valuetype variables.
14793
14794 2004-01-03  Patrik Torstensson
14795
14796         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14797         for other purposes than FP later on.
14798
14799 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14800
14801         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14802         of tail calls.
14803
14804 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14805
14806         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14807
14808 2003-12-30  Patrik Torstensson <p@rxc.se>
14809
14810         * mini-x86.h: Decreased number of availiable fp regs.
14811         Solves corner cases with FP spilling.
14812
14813 2003-12-23  Patrik Torstensson <p@rxc.se>
14814
14815         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14816         for floating point stack tracking / spilling on x86. 
14817         Fixes bug #49012.
14818         
14819         * basic-float.cs: added float mul overflow test.
14820
14821 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14822
14823         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14824
14825 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14826
14827         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14828         supports for cond branches that overflow the immediate
14829         overflow offset. mcs can compile simple programs.
14830
14831 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14832
14833         * exceptions-ppc.c: exception handling support wip:
14834         finally handlers get run on exception.
14835
14836 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14837
14838         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14839         profiling.
14840
14841 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14842
14843         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14844         initial support for stack walking and unwinding.
14845
14846 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14847
14848         * driver.c (mono_main): Make corlib-out-of-sync message more 
14849         descriptive. Also remove verify_corlib call.
14850
14851 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14852
14853         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14854         not overlap with other call's arguments, too.
14855
14856 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14857
14858         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14859         move to arch-specific code the choice of arch-specific
14860         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14861         * mini.c: ensure emulation calls will not interleave
14862         with other calls.
14863
14864 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14865
14866         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14867         the magic trampoline stack frame is dropped before executing
14868         the new method.
14869
14870 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14871
14872         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14873         and integer to fp conversions. Added support for overflowing
14874         arguments on the stack. Reserve a couple more registers as temps.
14875         Added support for aot compilation (as output still needs to be
14876         tweaked, though).
14877
14878 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14879
14880         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14881         Don't overwrite return register in some corner cases.
14882
14883 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14884
14885         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14886         static constructors when AOT compiling.
14887
14888         * driver.c (mono_main): Call mono_check_corlib_version.
14889
14890 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14891
14892         * cpu-g4.md, basic.cs: fixed div target register.
14893
14894 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14895
14896         * mini-ppc.c, basic.cs: shl_imm fix with test.
14897
14898 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14899
14900         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14901         structures by value. Misc fixes.
14902         * objects.cs: more tests.
14903
14904 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14905
14906         * mini-ppc.c: lconv.ovf.i implemented.
14907
14908 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14909
14910         * mini.c:
14911         (mini_init): don't error out if someone already called g_thread_init.
14912
14913 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14914
14915         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14916         to be any type per the spec. Fix abnormal memory usage when
14917         the same object is repeatedly thrown.
14918
14919 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14920
14921         * mini.c: check for overruns in IL code.
14922
14923 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14924
14925         * TODO: Add/remove some todo entries.
14926
14927 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14928
14929         * driver.c (mono_main): Call mono_verify_corlib.
14930
14931 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14932
14933         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14934         This has been moved to mini.c
14935         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14936         type being casted is marshalbyref it could be a proxy, so instead of
14937         emitting the type check code, emit a call to a runtime method that will
14938         perform the check by calling CanCastTo if needed.
14939
14940 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14941
14942         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14943         methods with large stack frames under Win32.
14944
14945 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * Makefile.am: Distribute regression tests.
14948
14949         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14950         at the end instead of inserting each variable into the sorted list.
14951
14952         * linear-scan.c (mono_varlist_sort): New helper function.
14953         
14954 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14955
14956         * mini.c: ensure arguments and locals are within bounds.
14957
14958 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14959
14960         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14961         related fixes.
14962
14963 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14964
14965         * mini.c (mono_cprop_copy_values): Fix crash.
14966
14967         * aot.c: Set verbosity back to 0.
14968         
14969 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14970
14971         * regalloc.c: complete memory leak fix by Laurent Morichetti
14972         (l_m@pacbell.net).
14973
14974 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14975
14976         * driver.c (main_thread_handler): Revert the previous patch.
14977
14978         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14979         under valgrind.
14980
14981         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14982         memory from the memory pool.
14983
14984         * driver.c (main_thread_handler): Turn on all optimizations when
14985         --aot is used.
14986
14987         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14988         an array for better performance.
14989
14990         * regalloc.c (mono_regstate_assign): Fix memory leak.
14991
14992         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14993         serialize the debug info.
14994
14995         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14996         debug info from the serialized representation.
14997
14998         * aot.c: Save debug info into the generated file and load it when 
14999         loading a method.
15000
15001         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15002
15003 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15004
15005         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15006         More FP-related fixes.
15007
15008 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15009
15010         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15011         and register allocation buglet. Hello world now runs.
15012
15013 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15014
15015         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15016         * tramp-ppc.c: fixed class init trampoline.
15017         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15018
15019 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15020
15021         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15022         mini.c: more ppc changes/fixes.
15023
15024 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15025
15026         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15027         Also optimize the case when the arguments are the same in the caller 
15028         and in the callee.
15029
15030         * iltests.il: Add tests for tail calls with valuetype arguments.
15031
15032 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15033
15034         * mini-ppc.c: fixes for struct return type.
15035
15036 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15037
15038         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15039         mono_spillvar_offset() to arch-specific code.
15040
15041 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15042
15043         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15044
15045 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15046
15047         * exceptions-x86.c: Fix stack space leaks.
15048         
15049         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15050         registers from the lmf if the method has save_lmf set.
15051
15052 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15053
15054         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15055         of icall wrappers into InvokeInDomain, since these are now per-domain.
15056
15057 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15058
15059         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15060         make some opcode emulation and intrinsic ops enabled/disabled 
15061         according to the architecture. More fixes.
15062
15063 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15064
15065         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15066
15067 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15068
15069         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15070         arch-specific handling for 'this' and struct return type to
15071         arch-specific code.
15072
15073 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15074
15075         * aot.c: prevent divide by zero error when reporting (it happened with
15076         Accessibility.dll).
15077
15078 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15079
15080         * mini.h (inst_switch): Remove unused macro.
15081
15082 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15083
15084         * aot.c:
15085         (load_aot_module): free 'info->methods' and 'info' properly. No more
15086         "free(): invalid pointer blah" messages when you have an old aot
15087         compiled assembly.
15088
15089 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15090
15091         * jit-icalls.c, mini.c: Added support for context static fields.
15092
15093 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15094
15095         * mini.c (mono_method_blittable): Methods which set LastError are not 
15096         blittable either. Fixes #51108.
15097         
15098 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15099
15100         * mini.c: flush icache.
15101         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15102
15103 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15104
15105         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15106
15107 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15108
15109         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15110         safe on IA32.
15111
15112         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15113         vararg calls.
15114
15115         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15116
15117 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15118
15119         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15120         instruction when the result is discarded.
15121
15122         * iltests.il (test_0_div_regalloc): New regression test.
15123
15124         * arrays.cs: Fix compilation error.
15125
15126 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15127
15128         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15129         float rules to inssel-x86.brg: sane architectures with FP registers
15130         don't need to implement these rules.
15131
15132 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15133
15134         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15135
15136 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15137
15138         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15139         implementation of 32 bit systems.
15140
15141 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15142
15143         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15144         (Jeroen Zwartepoorte).
15145
15146 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15147
15148         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15149         the caller and the callee matches.
15150         
15151         * mini.c (mono_method_to_ir): Add comment.
15152
15153         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15154         signbit is missing on some platforms.
15155
15156 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15157
15158         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15159
15160         * mini.c (setup_jit_tls_data): Call the new function.
15161         
15162         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15163
15164         * mini-x86.c: Add experimental support for fast access to the lmf
15165         structure under NPTL/Linux 2.6.x.
15166
15167 2003-11-06  Martin Baulig  <martin@ximian.com>
15168
15169         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15170         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15171         the debugger.
15172
15173 2003-11-02  Martin Baulig  <martin@ximian.com>
15174
15175         * mini.c (inflate_generic_field): New static method.
15176         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15177         generic instance and the field is declared in a generic type, call
15178         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15179
15180 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15181
15182         * mini.h mini.c (mono_method_same_domain): New function to return
15183         whenever the caller and the callee are in the same domain.
15184
15185         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15186
15187 2003-10-30  Martin Baulig  <martin@ximian.com>
15188
15189         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15190         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15191         method parameters.
15192         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15193         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15194
15195 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15196
15197         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15198         propagation.
15199
15200         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15201         object here, so it is in the correct appdomain etc.
15202
15203 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15204
15205         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15206         already done.
15207         (mono_method_to_ir): Avoid freeing the type created returned from
15208         mono_type_create_from_typespec, since it is put into an internal cache
15209         by the function. Fixes pointer.exe.
15210
15211         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15212         trampolines for icalls and pinvokes as well. Fixes #33569.
15213
15214 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15215
15216         * mini.c: Update after appdomain changes.
15217
15218         * mini.c (mono_jit_compile_method_inner): Allways compile native
15219         method wrappers in the root domain, since there can only be one
15220         instance of them, whose address is stored in method->info.
15221
15222 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15223
15224         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15225         environment variable. Instead detect automatically whenever running
15226         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15227         valgrind.h.
15228
15229 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15230
15231         * trace.c, trace.h: New files that implement the new trace option
15232         parsing. 
15233
15234         * driver.c: Document new --trace options.
15235
15236         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15237         mini-x86.c: Apply:
15238
15239         -       if (mono_jit_trace_calls)
15240         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15241
15242         * mini.h: prototypes.
15243         
15244 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15245
15246         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15247
15248         * mini.c inssel.brg: Implement typedefbyref opcodes.
15249
15250         * mini.c (mono_jit_compile_method): Remove unused local variable.
15251
15252         * mini.c (mono_jit_compile_method_inner): Ditto.
15253         
15254 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15255
15256         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15257         
15258         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15259
15260 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15261
15262         * mini.c (mono_no_aot): Remove unused global variable.
15263
15264         * mini.c: Thread safety fixes.
15265
15266 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15267
15268         * mini.c (mono_create_class_init_trampoline): Add a lock around
15269         class_init_hash_addr.
15270
15271         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15272         #30073.
15273
15274         * mini.c: Decompose the NEWARR instruction before decomposing its
15275         arguments. Fixes #30073.
15276
15277 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15278
15279         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15280         convention.
15281
15282 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15283
15284         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15285
15286         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15287
15288         * driver.c: Add support for compiling icall wrappers to --compile.
15289
15290 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15291
15292         * inssel.brg: The empty value in class->interface_offsets is -1, not
15293         0. Fixes #49287.
15294
15295 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15296
15297         * objects.cs: New test for 'is' operator on an array of interfaces.
15298
15299 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15300
15301         * tramp-ppc.c: update trampoline code to support jumps
15302         and class initialization.
15303
15304 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15305
15306         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15307
15308         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15309
15310         * inssel.brg (OP_UNBOX): Remove unused rule.
15311
15312         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15313         region instead of one for each method. Fixes #47813.
15314
15315 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15316
15317         * exceptions.cs (test_0_nested_finally): New regression test for
15318         nested exception handlers.
15319
15320         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15321
15322         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15323
15324         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15325         inlining.
15326
15327         * mini.c (mono_method_check_inlining): Make the inlining limit 
15328         configurable by an environment variable.
15329         
15330         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15331
15332         * mini.h: Bump AOT file version.
15333
15334         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15335         token, store the image along with the token, since the token might not 
15336         refer to the same image as the method containing the relocation, 
15337         because of inlining.
15338
15339 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15340
15341         * mini.c (mono_precompile_assemblies): New function to compile
15342         all methods in all loaded assemblies.
15343
15344         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15345
15346         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15347         iassign and fassign to int*, since they can contain large negative
15348         values if the register is spilled. Also added some comments. Fixes
15349         #45817.
15350
15351         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15352         under Win32. Fixes #42964.
15353
15354 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15355
15356         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15357
15358         * aot.c: Added support for AOT compiling methods which contain calls
15359         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15360         handled.
15361         
15362         * driver.c (compile_all_methods): Run the compilation in a thread
15363         managed by mono. Fixes #44023.
15364
15365         * mini.c (mono_codegen): Print full method name in verbose output.
15366
15367         * mini-x86.c (mono_arch_patch_code): Fix warning.
15368         
15369         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15370         jumps, since the method we are jumping to might be domain-specific.
15371
15372         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15373
15374 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15375
15376         * inssel.brg: string chars are unsigned.
15377
15378 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15379
15380         * TODO: New todo item.
15381
15382         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15383         which calls mono_runtime_class_init and patches the call site to
15384         avoid further calls.
15385         (mono_arch_create_class_init_trampoline): New arch specific function 
15386         to create a class init trampoline.
15387         (create_trampoline_code): Generalized so it can create
15388         class init trampolines as well.
15389
15390         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15391         (mono_create_class_init_trampoline): New function to create and cache
15392         class init trampolines.
15393         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15394         vtable given the address of a class init trampoline. Used by the
15395         patching process.
15396         (mono_codegen): Generate a call to a trampoline instead of
15397         mono_runtime_class_init in LDSFLD[A].
15398         (mono_codegen): Add relocations for the new trampoline.
15399         
15400         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15401         MONO_PATCH_INFO_CLASS_INIT.
15402
15403         * mini.h: Bump AOT version number.
15404
15405         * aot.c: Create a copy of the loaded code instead of using the original
15406         so methods which call each other will be close in memory, improving
15407         cache behaviour.
15408         
15409         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15410         patch since it breaks the regression tests.
15411         
15412         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15413         for the register saving instruction sequence since the 
15414         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15415
15416 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15417
15418         * TODO: Fix todo item && remove another.
15419
15420 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15421
15422         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15423         previous checkin.
15424
15425         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15426         function of the module.
15427
15428         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15429         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15430         --no-aot command line option.
15431
15432 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15433
15434         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15435         by Bernie Solomon (bernard@ugsolutions.com).
15436
15437         * inssel.brg: Refactor the interface offset table related code into
15438         its separate functions and add support for the AOT case.
15439
15440 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15441
15442         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15443         
15444         * aot.c: Added mono_aot_verbose variable and made all debugging
15445         output depend on the value of this variable.
15446
15447         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15448         method_label and info_label.
15449
15450         * mini.h mini-x86.c aot.c: Added a new relocation type 
15451         MONO_PATCH_INFO_IID for klass->interface_id.
15452
15453         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15454         the MonoJitInfo structure.
15455
15456         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15457         a non-root appdomain in shared mode.
15458
15459 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15460
15461         * aot.c: make aot loader less verbose. Remove free of unused variable.
15462
15463 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15464
15465         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15466
15467         * .cvsignore: Added *.dll.
15468
15469         * mini.c (mono_print_tree_nl): New function callable while debugging.
15470
15471         * mini.c (mono_print_code): Export this.
15472
15473         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15474         patched code.
15475
15476 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15477
15478         * mini.h (MonoCompile): Added 'jit_info' field.
15479
15480         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15481         the cfg structure, since it is needed by the AOT compiler.
15482
15483         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15484
15485         * aot.c: A major rewrite. Changes include:
15486         - save exception tables for methods which have them.
15487         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15488         to g_module_symbol.
15489         - reworked the file format so it is now much smaller and needs
15490         fewer relocation entries.
15491         
15492 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15493
15494         * aot.c (load_aot_module): Fix build bustage on platforms without
15495         Boehm GC.
15496
15497 2003-09-04  Martin Baulig  <martin@ximian.com>
15498
15499         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15500
15501 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15502
15503         * TODO: Some new optimization ideas.
15504
15505         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15506
15507         * aot.c: Save the optimization flags used to compile the code into
15508         the AOT module.
15509
15510         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15511         support emitting domain specific code.
15512         
15513         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15514         no longer domain neutral. It can be made domain neutral by compiling 
15515         with --optimize=shared.
15516
15517         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15518         between appdomains.
15519
15520         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15521         loading of AOT code.
15522
15523         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15524         
15525         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15526         if there is no domain neutrality information.
15527
15528 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15529
15530         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15531         format version into the generated library.
15532
15533         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15534         callee method into the caller since one of them could be shared.
15535
15536         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15537         system exceptions from AOT code now works.
15538
15539         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15540         method if it is domain neutral and the callee is not.
15541
15542         * graph.c (cfg_emit_one_loop_level): Fix warning.
15543
15544 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15545
15546         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15547         last checkin.
15548
15549 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15550
15551         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15552         is needed  by code which is executed before mono_runtime_init ().
15553         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15554         
15555         * mini.c (mono_thread_abort): Fix warning.
15556         (mono_jit_compile_method): Call static constructor in the AOT case too.
15557
15558         * aot.c (mono_compile_assembly): Fix warning.
15559
15560 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15561
15562         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15563
15564 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15565
15566         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15567
15568         * cpu-pentium.md: Fix the length of call opcodes so they include the
15569         ESP restoring instruction. Fixes #47968.
15570
15571 2003-08-28  Martin Baulig  <martin@ximian.com>
15572
15573         * mini-x86.c (mono_arch_call_opcode): Added support for
15574         MONO_TYPE_GENERICINST.
15575
15576         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15577
15578 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15579
15580         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15581         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15582
15583         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15584         metadata_section.
15585
15586 2003-08-26  Martin Baulig  <martin@ximian.com>
15587
15588         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15589         when reporting an error, set this to the actual error location.
15590         (mono_method_to_ir): Report the correct error location if
15591         get_basic_blocks() returned an error.
15592
15593 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15594
15595         * mini.c (mono_type_blittable): OBJECT is not blittable.
15596         (mono_method_blittable): Methods which have marshalling descriptors
15597         are not blittable either. Fixes #47842.
15598
15599 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15600
15601         * driver.c mini.c: Use an environment variable instead of a global 
15602         variable. Also fix the build.
15603
15604         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15605         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15606         reporting this. 
15607
15608         * driver.c mini.c: Added --with-valgrind option to turn off some
15609         code which prevents mono from running under valgrind.
15610
15611         * mini.c (mono_emit_call_args): Fixed warning.
15612
15613         * mini.c (mono_emulate_opcode): Fixed warning.
15614
15615 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15616
15617         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15618         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15619         regalloc.c, regalloc.h: specify available registers in arch-specific
15620         code and support floats in the regallocator (patch by Laurent Morichetti 
15621         <l_m@pacbell.net>)
15622
15623 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15624
15625         * mini.c: mono_thread_current() can be called only after
15626         mono_runtime_init(): rearrange code to not call it early on.
15627
15628 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15629
15630         * mini.c: allocate jump tables in the code mempools.
15631
15632 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15633
15634         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15635         freed.
15636
15637 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15638
15639         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15640         12 to 16.  This fixes bug #47453.
15641
15642
15643 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15644
15645         * mini-ppc.c: fixed indexed load and unsigned compares.
15646
15647 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15648
15649         * mini.c: reenabled installation of handler for
15650           thread abort signal.
15651
15652 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15653
15654         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15655         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15656         until it's fixed and actually useful.
15657
15658 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15659
15660         * inssel-long32.brg: couple more opcodes implemented.
15661
15662 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15663         
15664         * mini-sparc.c: Even more opcodes implemeted.
15665
15666 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15667
15668         * mini-sparc.c: More opcodes implemented.
15669
15670 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15671
15672         * mini-sparc.c: More opcodes implemented.
15673
15674 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15675
15676         * inssel-sparc.brg: Add some needed rules.  Direct
15677         copy from PPC.
15678         * Makefile.am: Use inssel-sparc.brg
15679         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15680         an assert happy for now.
15681
15682 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15683
15684         * mini-sparc.c: Fixed compile errors.
15685         * exceptions-sparc.c: Same.  We now produce a mono binary 
15686         on sparc-linux.  Yea.
15687
15688 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15689
15690         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15691         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15692         They compile, but do not work.
15693
15694 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15695
15696         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15697         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15698         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15699         (ct@gentoo.org).
15700
15701 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15702
15703         * mini.c: more opcodes implemented and better support for generics.
15704
15705 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15706
15707         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15708         * mini.c, mini.h: first cut at generics support: some new instructions 
15709         added and changed the behaviour of some of the existing ones.
15710
15711 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15712
15713         * mini.c: Removed definition of metadata_shared mutex here.
15714
15715 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15716
15717         * mini-x86.c: make vararg calls work for instance methods.
15718
15719 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15720
15721         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15722         returns the arguments in a separte list, now.
15723
15724 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15725
15726         * aot.c, mini.c: updates for array type representation changes.
15727
15728 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15729
15730         * mini.c: register function to perform jit shutdown.
15731
15732 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15733
15734         * mini.c: use a faster allocator if possible.
15735
15736 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15737
15738         * aot.c: some cleanups and portability changes.
15739
15740 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15741
15742         * mini.c: use faster allocation for CEE_BOX if possible.
15743
15744 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15745
15746         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15747         Moved inlined mempcy code to its own function so that is can be
15748         reused. Added an inline memset function as well (optimized initobj).
15749         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15750
15751 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15752
15753         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15754
15755 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15756
15757         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15758         arch code can setup the cpu for CLR execution, if needed.
15759         We use it on x86 to set the precision of FP operations.
15760
15761 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15762
15763         * mini.c: disable some optimizations if we can guess they'll cost too
15764         much for a given method.
15765
15766 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15767
15768         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15769         
15770 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15771         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15772         info collection support.
15773
15774 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15775
15776         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15777         is now implemented in the profiling API. Get rid of a couple of
15778         unnecessary global variables.
15779
15780 2003-06-15  Nick Drochak <ndrochak@gol.com>
15781
15782         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15783         * cpu-g4.md: add op_bigmul and op_bigmul_un
15784         * cpu_pentium.md: add op_bigmul_un
15785         * inssel-long32.brg: add rule for unsigned bigmul
15786         * mini-ops.h: define OP_BIGMUL_UN
15787         * mini-x86.c: THE BUG: handle (un)signed properly
15788         * mini.c: choose unsigned opcode if needed.
15789         This set of patches fixes bug #44291
15790
15791 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15792
15793         * mini.c (optimize_branches): improved to handle all kinds of
15794         conditional branches.
15795
15796 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15797
15798         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15799         don't raise exceptions.
15800
15801 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15802
15803         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15804         to arch-specific files.
15805
15806 2003-06-09  Martin Baulig  <martin@ximian.com>
15807
15808         * Makefile.am (libs): Added $(LIBGC_LIBS).
15809
15810 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15811
15812         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15813         and OP_ATAN (fixes bug#44293).
15814
15815 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15816
15817         * Makefile.am, mini-x86.c: rename cpu description array to
15818         pentium_desc, since some compilers define the 'pentium' preprocessor
15819         symbol.
15820
15821 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15822
15823         * mini.c (mini_select_instructions): add explicit branch if the
15824         following block is not the false target of a conditional branch -
15825         we need this with any optimization that reorder or remove bblocks
15826
15827         * mini.c (optimize_branches): bug fixes
15828
15829 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15830
15831         * mini.c (mono_method_to_ir): inline static readonly fields
15832
15833         * ssa.c (fold_tree): start cfold support for long (very simple
15834         cases only)
15835
15836         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15837
15838 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15839
15840         * inssel.brg: fixed memcpy (bug #44219).
15841
15842 2003-06-05  Dick Porter  <dick@ximian.com>
15843
15844         * driver.c: Set the glib log levels to not abort if g_message
15845         recurses.
15846
15847         g_set_prgname() has to happen before mini_init() so that the
15848         process handle gets the info.
15849         
15850 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15851
15852         * driver.c: add intrins to the default optimizations to get wider
15853         exposure.
15854
15855 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15856
15857         * mini.h: some large basic blocks will overflow a 16-bit
15858         integers for symbolic registers.
15859
15860 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15861
15862         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15863         (mono_arch_output_basic_block): fix bug 43499 
15864
15865 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15866
15867         * mini.c: kill duplicated definition of mono_debug_format.
15868
15869 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15870
15871         * mini-x86.c, arrays.cs: fixed register allocation bug.
15872
15873 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15874
15875         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15876
15877         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15878
15879 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15880
15881         * mini.c:
15882         (print_method_from_ip): also print source location information if
15883         available.
15884
15885 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15886
15887         * mini.c (mono_find_block_region): bug fix in region code
15888         (mini_method_compile): enable removing unreachable code again, but
15889         only in methods without exception clauses.
15890
15891 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15892
15893         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15894         Implemented arglist opcode and handling of TypedReference type.
15895         Fixed x86 call convention when a structure is returned.
15896         Minimal support for calling static vararg methods.
15897
15898 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15899
15900         * mini.c (mini_method_compile):  always remove unreachable code,
15901         because the code in them may be inconsistent  (access to dead
15902         variables for example).
15903
15904 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15905
15906         * driver.c, debug-mini.c: warning fixes.
15907
15908 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15909
15910         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15911
15912 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15913
15914         * mini.c: thread-static fields are registered in mono_class_vtable(),
15915         so ensure the function is called before checking for them.
15916
15917 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15918
15919         * mini.c (optimize_branches): fix for bug 43586
15920
15921         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15922         overflow (fixes Bug #43639)
15923
15924 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15925
15926         * mini.c, objects.cs: allow the use of stobj for primitive types.
15927
15928 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15929
15930         * mini.c: be less strict about argument checking until we support
15931         running the verifier.
15932
15933 2003-05-27  Nick Drochak <ndrochak@gol.com>
15934
15935         * basic-long.cs: tests for (ulong)int * (ulong)int also
15936         * mini.c: use the same trick for (ulong)int * (ulong)int
15937
15938 2003-05-27  Nick Drochak <ndrochak@gol.com>
15939
15940         * basic-long.cs: add regression test for (long)int * (long)int
15941         * cpu-pentium.md: add op_bigmul specification
15942         * inssel-long32.brg: add OP_BIGMUL rule
15943         * mini-ops.h: add OP_BIGMUL
15944         * mini-x86.c: register allocator: handle case where src1 needs to be
15945         in EAX.
15946         * mini.c: substitute special BIGMUL opcode in the tree for 
15947         (long)int * (long)int
15948
15949 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15950
15951         * jit-icalls.c: call the type ctor on field access if needed.
15952
15953 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15954
15955         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15956         to a method (including results of ldelema, bug#43207).
15957
15958 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15959
15960         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15961         colors to show exception handler blocks.
15962
15963         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15964         (fix for pinvoke7.cs).
15965
15966 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15967
15968         * mini.h, mini.c: ensure correct initialization order for types that
15969         require it. Prepare for lazy compilation of jit icall wrappers.
15970         Provide a name for opcode emulation to reduce unneeded mallocing.
15971
15972 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15973
15974         * mini-x86.c: better register restoring code and profiling
15975         support for tail calls.
15976
15977 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15978
15979         * mini.h, driver.c: prepare for leaf methods optimization.
15980
15981 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15982
15983         * mini.c: get targets of branches before converting a method.
15984
15985 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15986
15987         * mini.c (optimize_branches): added some experimental code (disbaled) 
15988
15989 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15990
15991         * mini.c (optimize_branches): fix branch to branch optimization 
15992
15993         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15994
15995         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15996
15997         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15998
15999         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16000         if needed.
16001
16002 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16003
16004         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16005         enable use of interface variables again.
16006
16007         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16008         I1 to registers because there is no simply way to sign extend 8bit
16009         quantities in caller saved registers on x86.
16010
16011         * inssel-float.brg: set costs of some rules to 2 so
16012         that monobure always select the arch. specific ones if supplied,
16013         regardless of the order we pass the files to monoburg.
16014
16015 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16016
16017         * mini.c, mini-x86.c: since the magic trampoline for jumps
16018         can't patch the code directly, we do it as soon as the
16019         method gets compiled.
16020
16021 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16022
16023         * mini-x86.c, mini.h: introduce a new patching method
16024         to support CEE_JMP and tail calls.
16025         * mini.c: obey tail.call. Don't precompile methods target
16026         of CEE_JMP.
16027         * tramp-x86.c: new trampoline code to handle methods
16028         reached through a jump.
16029
16030 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16031
16032         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16033         bit values to registers
16034
16035 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16036
16037         * mini.c (mono_compile_get_interface_var): share interface
16038         variables if possible.
16039
16040 2003-05-16  Martin Baulig  <martin@ximian.com>
16041
16042         * debug-mini.c (mono_init_debugger): New function to initialize
16043         the debugger.  This is not in the debugger since it needs to
16044         access some of mini's internals.
16045
16046 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16047
16048         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16049
16050 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16051
16052         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16053         for value type handling.
16054
16055 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16056
16057         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16058         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16059
16060 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16061
16062         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16063           the constructor through a proxy.
16064
16065 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16066
16067         * jit-icalls.c, inssel.brg: fixes to array element address
16068         calculations.
16069
16070 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16071
16072         * mini-x86.c (is_regsize_var): allocate pointer to registers
16073
16074 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16075
16076         * driver.c: fixed typo, added intrins to the set of optimizations
16077         tested with regressions.
16078
16079 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16080
16081         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16082         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16083         test case.
16084
16085 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16086
16087         * inssel.brg: remove some common pop instructions without side effects
16088
16089 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16090
16091         * inssel-x86.brg: fixed thinko in int to double conversions.
16092
16093 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16094
16095         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16096
16097 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16098
16099         * inssel-long32.brg: two more missing instructions.
16100
16101 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16102
16103         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16104         if not already set.
16105
16106 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16107
16108         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16109         correctly.
16110
16111         * basic-float.cs: Added tests for negative zero.
16112
16113 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16114
16115         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16116         a couple of missing operations for long casts, with test cases.
16117
16118 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16119
16120         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16121
16122 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16123
16124         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16125         code size estimation.
16126
16127 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16128
16129         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16130         abstract methods (fix bug 42542)
16131
16132         * aot.c: add ability to handle array types
16133         
16134 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16135
16136         * mini.c: Call the _specific versions of the object allocation
16137         functions if possible.
16138
16139 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16140
16141         * driver.c: call setlocale ().
16142
16143 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16144
16145         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16146         windows build.
16147
16148 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16149
16150         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16151
16152         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16153         wrappers (fix bug 42122)
16154
16155 2003-05-04  Martin Baulig  <martin@ximian.com>
16156
16157         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16158
16159         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16160         s/mini_set_defaults/mono_set_defaults/g.
16161
16162 2003-05-04  Martin Baulig  <martin@ximian.com>
16163
16164         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16165
16166 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16167
16168         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16169         (reported by Don Roberts).
16170
16171 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16172
16173         * mini.c: temporarily work around two bugs for this release.
16174
16175 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16176
16177         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16178         that contains -export-dynamic and it makes using the ld script
16179         useless.
16180         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16181
16182 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16183
16184         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16185         specific cpu.
16186
16187 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16188
16189         * mini.c: make sure leave calls all the needed finally blocks,
16190         even when the target jumps out of multiple exception clauses.
16191
16192 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16193
16194         * ldscript, Makefile.am: add linker script to reduce the number of
16195         exported symbols (should also fix the issues with libwine defining
16196         some of the same symbols in io-layer).
16197
16198 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16199
16200         * driver.c (mini_main): Avoid assertion when no file name is given on 
16201         the command line.
16202
16203 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16204
16205         * driver.c: added --version/-V command line option.
16206         Added the inline optimization in the regression tests.
16207
16208 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16209
16210         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16211         to the type in the method signature (fixes bug#42134).
16212
16213 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16214
16215         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16216
16217 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16218
16219         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16220
16221 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16222
16223         * driver.c: fixed bug #42100.
16224
16225 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16226
16227         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16228
16229 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16230
16231         * mini.c: moved most of the code required to do inlining to its own
16232         function so it can be reused. Inline also ctors if appropriate.
16233
16234 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16235
16236         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16237         the runtime can call mono API functions.
16238
16239 2003-04-27  Martin Baulig  <martin@ximian.com>
16240
16241         * debug-mini.c (mono_debug_init_method): Added
16242         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16243         send a notification to the debugger.
16244
16245         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16246         running in the Mono Debugger, just pass the breakpoint number to
16247         mono_debug_init_method().
16248
16249         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16250
16251 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16252
16253         * mini.c: allow some more unsafe compares.
16254
16255 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16256
16257         * mini-x86.c, Makefile.am: make distcheck works (partially from
16258         a patch by Richard Lee <r.h.lee@attbi.com>).
16259         * regset.c, regset.h: removed, they are unused.
16260
16261 2003-04-25  Dick Porter  <dick@ximian.com>
16262
16263         * driver.c: Usage reports the name as 'mono' not 'mini'
16264         * exceptions-x86.c: Build and run on freebsd
16265
16266 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16267
16268         * Makefile.am: install the program with the 'mono' name and
16269         the library as libmono instead of mini and libmini.
16270
16271 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16272
16273         * driver.c: provide the APIs for the embedding interface of the old jit.
16274
16275 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16276
16277         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16278
16279 2003-04-23  Martin Baulig  <martin@ximian.com>
16280
16281         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16282
16283         * driver.c: Added `--debug' command line argument to enable
16284         debugging support.
16285
16286 2003-04-23  Martin Baulig  <martin@ximian.com>
16287
16288         * debug.[ch]: Removed.  The code is now in
16289         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16290
16291         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16292         last six months.
16293
16294 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16295
16296         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16297
16298 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16299
16300         * mini.c:
16301         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16302         mono_domain_finalize.
16303         (mini_method_compile): use mono_method_profile* if the the option is
16304         enabled.
16305
16306 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16307
16308         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16309         methods with their wrapper.
16310
16311         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16312         methods with their wrapper.
16313
16314         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16315         their wrapper.
16316
16317         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16318         wrapper.
16319
16320         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16321         methods.
16322
16323 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16324
16325         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16326
16327 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16328
16329         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16330         of the mempool. This is slightly faster and uses less memory
16331
16332 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16333
16334         * mini.c: avoid O(n) allocation for variables.
16335
16336 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16337
16338         * mini.c: handle items on the stack after inlining methods.
16339
16340 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16341
16342         * mini.c: make the method->opcode optimization dependent
16343         on MONO_OPT_INSTRINS and do it lazily.
16344
16345 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16346
16347         * driver.c: print overall results at the end of regression run.
16348
16349 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16350
16351         * inssel.brg: don't overwrite symbolic registers.
16352
16353 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16354
16355         * inssel-x86.brg: fix conversion from long to float.
16356
16357 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16358
16359         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16360
16361 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16362
16363         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16364
16365         * driver.c: Added --print-vtable option as in the old JIT.
16366
16367 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16368
16369         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16370
16371 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16372
16373         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16374
16375 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16376
16377         * mini.c regalloc.c regalloc.h: Fix memory leak.
16378
16379 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16380
16381         * aot.c (mono_aot_get_method): register all used strings
16382
16383 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16384
16385         * mini.c: always intern strings references with ldstr at compile time.
16386
16387 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16388
16389         * Makefile.am: add BUILT_SOURCES.
16390
16391 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16392
16393         * driver.c: give a better error message when the assembly to execute
16394         doesn't have an entry point.
16395
16396 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16397
16398         * Makefile.am: added hack for automake
16399
16400         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16401         correct sematics.
16402
16403         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16404
16405 22003-04-07  Martin Baulig  <martin@ximian.com>
16406
16407         * Makefile.am: Added Makefile.am.
16408
16409         * debugger-main.c: Removed, this is now in the debugger where it
16410         belongs.
16411
16412         * mini.pc.in: Call this package `mini' for the moment.
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426