2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * mini-ops.h: Add dup low and dup high ops.
4         
5         * cpu-x86.md: Same.
6
7         * mini-x86.c (mono_arch_output_basic_block): Same.
8
9         * simd-intrinsics.c (vector4f_intrinsics): Same.
10
11 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
12
13         * basic-simd.cs: Tests for recently added functionality.
14
15 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
16
17         * mini-ops.h: Add remaining sse1 fp ops.
18         
19         * cpu-x86.md: Add remaining sse1 fp ops.
20
21         * mini-x86.c (mono_arch_output_basic_block): Same.
22
23         * mini.h: Add enum for simd FP compare conditions.
24
25         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
26
27         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
28         so the backed can generate the appropriate op.
29
30 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
31         This patch squeese one more byte from the SimdIntrinsc struct.
32
33         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
34         a a shift amount intead of simply or'ing it.
35
36         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
37
38         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
39         byte so we can have an aditional flags field without increasing struct size.
40
41         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
42         against the simd_supported_versions bitmask.
43
44         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
45
46 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
47
48         * mini.c: remove rawbuffer code (the only use here is unsafe because
49         it takes locks during signal handling and the kernel now provides much
50         better info in proc/pid/smaps these days).
51
52 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
53
54         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
55         OP_X86_PUSH_OBJ. Fixes #434620.
56
57         * objects.cs: Add a test.
58         
59 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
60
61         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
62         that the packuswb/packusdw don't work with unsigned numbers for what
63         would be negative numbers in signed format.
64
65         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
66         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
67
68         * mini-ops.h: Add doubleword forms of many ops and packing ones.
69
70         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
71
72         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
73
74         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
75
76         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
77         add more ops.
78
79         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
80         version as the enum in mini.h.
81
82         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
83         for sse3 ops, check the simd_version field if present. This way the code
84         works with all versions of sse.
85
86 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
87
88         * simd-intrinsics.c: Fixed intrinsic name typo.
89
90         * mini.h: Added missing simd exported function.
91
92         * basic-simd.cs: Added tests for Vector4ui.
93         Fixed broken test for Vector16b.
94
95 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
96
97         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
98         the max length to 64.
99
100 2008-10-10  Mark Probst  <mark.probst@gmail.com>
101
102         * method-to-ir.c: Only do the fast virtual generic method call for
103         non-wrapper methods.
104
105         * mini.h, mini-trampolines.c: The new generic virtual remoting
106         trampoline handles virtual method calls via the vtable (as done by
107         the fast virtual generic method calls) to remoting proxies.
108
109         * mini.c (mono_jit_create_remoting_trampoline): For generic
110         methods reate a generic virtual remoting trampoline.
111
112         * mini-amd64.h: Enable fast virtual generic method calls again.
113
114 2008-10-10  Mark Probst  <mark.probst@gmail.com>
115
116         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
117         restore registers when doing tail calls.
118
119 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
120
121         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
122         Vector4ui.
123
124 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
125
126         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
127
128 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
129
130         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
131
132 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
133
134         * basic-simd.cs: Retrofit for API changes.
135
136 2008-10-10  Mark Probst  <mark.probst@gmail.com>
137
138         * mini-ppc.c: Handle integer stack arguments for tail calls.
139
140 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
141
142         * optflags-def.h: Removed sse3 optimization.
143
144         * driver.c: Same.
145
146         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
147         sse3.
148
149         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
150
151         * mini.h: Added enumeration with simd versions.
152
153         * simd-intrinsics.c (emit_intrinsics): Use the new static var
154         for detecting SSE3.
155
156         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
157
158         * mini.c (mini_init): Call mono_simd_intrinsics_init.
159
160 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
161
162         * basic-simd.cs: Added tests for Vector8u and Vector16u.
163
164         * basic-simd.cs: Fixed test naming.
165
166 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
167
168         * mini-ops.h: Added ops for packed and saturated math, shifts
169         and packing/unpacking.
170
171         * cpu-x86.md: Added descriptors for the above ops.
172
173         * mini-x86.c: Added code to emmit the above ops.
174
175         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
176
177 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
178
179         * aot-compiler.c (compile_method): Enable AOT for generic code.
180
181         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
182
183 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
184
185         * mini.c: add a workaround for a common screwup that ends up blamed
186         to mono (other processes blocking signal delivery).
187
188 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
189
190         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
191         in the LDFLD/STFLD opcodes. Fixes #432673.
192
193         * iltests.il.in: Add a new test.
194
195 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
196
197         * mini-arm.c: attach the thread in unmanaged->managed transitions
198         using delegates (bug #433148).
199
200 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
201
202        * basic-simd.cs: Use new ShuffleSel constants.
203
204 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
205
206         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
207
208         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
209         only disable simd intrinsics if no sse2 is detected.
210
211         * optflags-def.h: Added sse3.
212
213         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
214         is disabled.
215
216 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
217
218         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
219         when adding delegate-invoke wrappers.
220
221 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
222
223         * Makefile.am: Reenable the simd tests.
224
225 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
226
227         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
228           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
229           other vreg is allocated to that hreg.
230
231         Contributed under MIT/X11 license.
232
233 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
234
235         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
236         yet checked in.
237
238 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
239
240         * basic-simd.cs: New test suite for SIMD intrinsics.
241
242         * Makefile.am: Added new tests.
243
244 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
245
246         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
247
248         * mini-ops.h: Same.
249
250         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
251
252         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
253         using SSE2 aware opcodes.
254
255         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
256         is enabled, this code path is only reachable if conversion ops are emmited after
257         mono_method_to_ir.
258
259         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
260
261         This optimization saves 6 bytes per conversion against the old version.
262
263 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
264
265         * aot-compiler.c (compile_method): Don't skip methods referencing 
266         generic methods without a corresponding entry in token_info_hash, since
267         encode_method_ref () can handle all generic methods now.
268
269         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
270         generic context is set.
271         
272         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
273         generic sharing of LDTOKEN.
274
275 2008-10-06  Mark Probst  <mark.probst@gmail.com>
276
277         * mini-amd64.h: Temporarily disabled fast virtual generic method
278         calls because it breaks the System.Runtime.Remoting tests.
279
280 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
281
282         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
283
284         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
285         so inlining actually works.
286         (check_inline_caller_method_name_limit): Ditto.
287
288 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
289
290         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
291         64 bit safety (from Olaf Hering and Andreas Färber).
292
293 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
294         
295         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
296         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
297         unused virtual call support code.
298
299         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
300         
301         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
302         which can't use aot trampolines.
303         (decode_patch): Don't create aot trampolines for methods which can't use
304         them.
305
306         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
307         use aot trampolines.
308
309         * mini.h: Bump AOT image format version.
310         
311 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
312
313         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
314         to save_token_info () since cmethod is inflated for constrained calls.
315
316         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
317
318 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
319
320         * Makefile.am: Add build rules for ppc64.
321         This avoids the build failing at pedump with unresolved symbols
322         due to lack of arch_sources. Instead it will now fail earlier
323         due to lack of cpu-ppc64.md.
324
325         Contributed under MIT/X11 license.
326
327 2008-10-04  Mark Probst  <mark.probst@gmail.com>
328
329         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
330         tail calls.
331
332         * iltests.il.in: Add test case for tail call with many arguments.
333
334 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
335
336         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
337         to the fast virtual generic method code until the aot case is fixed.
338
339 2008-10-03  Mark Probst  <mark.probst@gmail.com>
340
341         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
342
343 2008-10-03  Mark Probst  <mark.probst@gmail.com>
344
345         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
346         thunks.
347
348 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
349         
350         * simd-intrinsics.c: Forgot to add this one.
351
352         * mini-codegen.c: Fix macro in case SIMD is not supported.
353
354 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
355         
356         This patch land initial JIT support for simd intrinsics.
357
358         * mini-x86.h: Added new define to make --enable_minimal work on x86.
359
360         * Makefile.am: Added simd-intrinsics.c
361
362         * simd-intrinsics.c: New file with simd instrinsic related
363         code.
364
365         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
366
367         * cpu-x86.md: Add simd related instructions.
368
369         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
370
371         * driver.c: Added two new --regression variants.
372
373         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
374
375         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
376
377         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
378         extract some complicated logic to helper functions.
379
380         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
381
382         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
383
384         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
385         the specialized simplification pass.
386
387         * method-to-ir.c (mono_spill_global_vars): Use new macro.
388
389         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
390
391         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
392         table.
393
394         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
395         if MONO_ARCH_NEED_SIMD_BANK is defined.
396
397         * mini-ops.h: Added the new simd ops.
398
399         * mini-x86.c: Added mono_arch_xregname.
400
401         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
402
403         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
404
405         * mini-x86.h: Define simd related MONO_ARCH macros.
406
407         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
408
409         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
410
411         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
412         MONO_CLASS_IS_SIMD to deal with simd related IR.
413
414         * mini.h (MonoInst): Added spill_var to the backend union.
415
416         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
417
418         * mini.h: Added forward declarations of the new simd fuctions.
419
420         * optflags-def.h: Added new optimization names SIMD.
421
422         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
423
424         * regalloc.h: Added support for working with 3 register banks.
425
426         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
427
428         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
429
430 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
431
432         * mini-exceptions.c: remove 64 bit related ifdef clutter.
433
434 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
435
436         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
437         instead of one on 64 bit systems.
438
439         * method-to-ir.c: Remove unused includes.
440
441 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
442
443         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
444         cfg->used_int_regs, since the two are different on arm.
445
446 2008-10-02  Mark Probst  <mark.probst@gmail.com>
447
448         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
449         mono_method_get_vtable_index() to get the vtable index.
450
451 2008-10-02  Mark Probst  <mark.probst@gmail.com>
452
453         * method-to-ir.c (mono_method_to_ir2): Don't create native
454         wrappers for array methods, because they're never called (and if
455         they were called they wouldn't work).
456
457 2008-10-02  Mark Probst  <mark.probst@gmail.com>
458
459         * method-to-ir.c (mono_method_to_ir2): Array methods are
460         special-cased and must not be invoked indirectly via the (M)RGCTX
461         when generic sharing is turned on.  Fixes #431413.
462
463 2008-10-01  Mark Probst  <mark.probst@gmail.com>
464
465         * method-to-ir.c: When generic sharing is active, call
466         non-interface virtual generic methods via the standard trampoline.
467
468         * mini-trampolines.c: Handle virtual generic shared methods.
469
470         * mini.h, mini-x86.c, mini-x86.h: New argument for
471         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
472         method thunks and which is the trampoline to call if the lookup
473         fails.  Enable the virtual generic method thunk for x86.
474
475         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
476         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
477         argument but assert that it's NULL, because these archs don't yet
478         implement the virtual generic method thunk.  Changes in the IMT
479         thunk data structures.
480
481 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
482
483         * aot-compiler.c (emit_globals): Avoid invalid characters in
484         the static linking symbol.
485
486         * objects.cs: Add a test for the range check optimization. Fix warnings.
487
488         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
489         optimization from the current JIT.
490
491         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
492         later in decompose_array_access_opts () to allow more optimizations.
493
494         * method-to-ir.c (mono_handle_soft_float): Rename this to 
495         mono_decompose_soft_float () for consistency.
496
497         * mini-ops.h: Fix arguments of OP_STRLEN.
498
499         * method-to-ir.c (save_cast_details): Extract the cast details saving code
500         into a separate function.
501         (reset_cast_details): Ditto.
502         (handle_unbox): Save cast details. Fixes #431254.
503
504         * method-to-ir.c: Remove some obsolete FIXMEs.
505
506 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
507
508         * ir-emit.h (alloc_dreg): Write a warning before crashing.
509
510 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
511
512         * mini-codegen.c: More work on macros to make them
513         ready for multiple regbanks.
514
515 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
516
517         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
518
519         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
520
521 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
522
523         * mini-codegen.c (mono_spillvar_offset): Proper support for
524         multiple regbanks.
525
526 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
527
528         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
529         the stack overflow changes.
530
531 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
532
533         * mini-codegen.c: Make all bank macros depend on reg_bank.
534
535         * mini-codegen.c (mono_local_regalloc): Make free mask
536         initialization regbank aware.
537
538 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
539
540         * mini-codegen.c (mono_local_regalloc): Extract callee
541         mask selection to a function and make it regbank aware.
542
543 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
544
545         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
546         code to deal with many regbanks.
547
548 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
549
550         * mini-codegen.c: More fp->regbank changes.
551
552 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
553
554         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
555         of a hardcoded constant.
556
557 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
558
559         * method-to-ir.c (type_from_stack_type): Fix typo.
560
561 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
562
563         * mini-ia64.c (emit_move_return_value): Convert float return values to
564         double.
565
566         * objects.cs: Add a new test.
567         
568         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
569         VARARG methods to fix an assert later.
570
571         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
572         end so it at least compiles.
573
574 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
575
576         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
577
578 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
579
580         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
581         optimization to a new function (emit_optimized_ldloca_ir) and enable
582         it for both ldloca and ldloca_s.
583
584 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
585
586         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
587         gshared CASTCLASS code.
588
589         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
590         amd64, where the libc stack unwinder encounters stack frames referring to
591         native code in unmapped memory.
592
593         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
594         sharing.
595
596         * generics.cs: Add new test.
597
598 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
599
600         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
601         add a check that one of the ARM_FPU_ constants is defined.
602
603         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
604         
605         * mini-exceptions.c: Fix build on non-altstack platforms.
606
607         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
608         sharing of vtypes.
609
610         * ir-emit.h: Add a comment to NEW_PCONST.
611
612         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
613
614         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
615
616         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
617         after the changes to MonoJitDomainInfo.
618
619 2008-09-27  Mark Probst  <mark.probst@gmail.com>
620
621         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
622
623 2008-09-27  Mark Probst  <mark.probst@gmail.com>
624
625         * mini-ppc.c: Compiler warning fixes.
626
627 2008-09-27  Mark Probst  <mark.probst@gmail.com>
628
629         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
630         for pinvokes.
631
632 2008-09-27  Mark Probst  <mark.probst@gmail.com>
633
634         * exceptions-ppc.c, mini-ppc.h: Compile
635         mono_arch_handle_altstack_exception() on Darwin, too.
636
637 2008-09-27  Mark Probst  <mark.probst@gmail.com>
638
639         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
640         work on archs which don't have generic sharing implemented, only
641         without the vtable_arg.
642
643 2008-09-26  Mark Probst  <mark.probst@gmail.com>
644
645         * mini.c: Added comment explaining why delegate ctor icall
646         wrappers are compiled.
647
648 2008-09-26  Mark Probst  <mark.probst@gmail.com>
649
650         * mini.c: Don't produce trampolines to delegate ctor icall
651         wrappers but compile them upfront.
652
653 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
654
655         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
656         runtime-set function when going back to managed code. Currently this
657         is used to set back the protection on the soft ovf pages and/or to
658         throw the stack overflow exception that happened in unmanaged code.
659
660 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
661
662         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
663         runtime-set function when going back to managed code. Currently this
664         is used to set back the protection on the soft ovf pages and/or to
665         throw the stack overflow exception that happened in unmanaged code.
666
667 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
668
669         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
670         the support code for restoring stack protection after stack overflows
671         that happen in unmanaged code. Don't set the exec permission on the
672         soft overflow area.
673
674 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
675
676         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
677         delegate->method_ptr is set. Fixes #428054.
678
679 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
680
681         * tests.cs: Rename to ratests.cs.
682
683         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
684         emit_get_rgctx_... functions.
685
686 2008-09-25  Mark Probst  <mark.probst@gmail.com>
687
688         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
689
690 2008-09-25  Mark Probst  <mark.probst@gmail.com>
691
692         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
693         before asserting that method is sharable.
694
695 2008-09-25  Mark Probst  <mark.probst@gmail.com>
696
697         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
698         whether method needs a static RGCTX wrapper used instead of
699         complex conditions.
700
701         * generic-sharing.c, mini.h: A few functions moved to
702         metadata/generic-sharing.c.
703
704 2008-09-25  Mark Probst  <mark.probst@gmail.com>
705
706         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
707         Generic code sharing for value types, which essentially means
708         treating value type methods like static methods.  The RGCTX is
709         passed in the same way.
710
711 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
712
713         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
714         opcode when creating multi-dimensional arrays of open types.
715
716         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
717         open generic types.
718
719         * generics.cs: Add a test.
720
721         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
722
723 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
724
725         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
726
727         * mini.c (mini_method_compile): Set it when running under the debugger. 
728
729         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
730         vreg optimization if the flag is set.
731
732         * driver.c (mono_main): Add --attach= option to pass options to
733         the attach agent.
734
735         * mini.c (sigquit_signal_handler): Start the attach agent.
736
737         * ssapre.c: Disable this to save space since it is not yet ported to
738         linear IR.
739
740         * regalloc2.c: Disable this to save space.
741
742         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
743
744 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
745
746         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
747         the -v option useful again.
748
749 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
750
751         * mini-amd64.c (mono_arch_output_basic_block): Add support for
752         --break-at-bb.
753
754         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
755         arrays of arrays. Fixes #428406.
756
757         * method-to-ir.c (mini_emit_castclass): Ditto.
758
759         * objects.cs: Add new test.
760         
761 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
762
763         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
764         was wrong at it choked against target_type_is_incompatible for byref types.
765
766 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
767
768         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
769         places.
770
771 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
772
773         * mini-exceptions.c: update a few more exceptions-related counters.
774
775 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
776
777         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
778         new functions to allocate from persistent mempools.
779
780 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
781
782         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
783         multiple register banks in the future.
784
785         * mini-codegen.c (mono_local_regalloc): Fix a warning.
786
787 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
788
789         * mini.c (type_to_eval_stack_type): Remove duplicated function.
790
791         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
792
793         * mini.h: Export type_to_eval_stack_type.
794
795         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
796         is only ins->klass of byref types.
797
798 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
799
800         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
801         (mini_emit_memcpy2): Ditto.
802
803         * mini-amd64.c: Fix a warning.
804
805 2008-09-21  Mark Probst  <mark.probst@gmail.com>
806
807         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
808         linking.
809
810 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
811
812         * method-to-ir.c: Extract stloc micro-optimization to a
813         function and apply it to all cases.
814
815 2008-09-19  Mark Probst  <mark.probst@gmail.com>
816
817         * method-to-ir.c: Don't fail generic code sharing in cases we
818         already support.
819
820 2008-09-18  Mark Probst  <mark.probst@gmail.com>
821
822         * mini-ppc.c: Handle structs in tailcalls on Darwin.
823
824 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
825
826         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
827         implementation.
828
829 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
830
831         * trace.c: make tracing more useful and correct, with per-thread
832         id and indent info.
833
834 2008-09-15  Mark Probst  <mark.probst@gmail.com>
835
836         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
837         doing a method call and the argument is an R4.
838
839 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
840
841         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
842         generic methods.
843
844 2008-09-13  Mark Probst  <mark.probst@gmail.com>
845
846         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
847
848 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
849
850         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
851         (MONO_JUMP_TABLE_FROM_INS): Ditto.
852
853 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
854
855         * driver.c: Add a --agent argument (not supported yet) to load managed
856         agent assemblies before loading the main assembly, similarly to how the
857         Java VM handles agents.
858
859 2008-09-11  Mark Probst  <mark.probst@gmail.com>
860
861         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
862         function to do stack layout of local variables.
863
864 2008-09-11  Mark Probst  <mark.probst@gmail.com>
865
866         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
867         calculation.
868
869 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
870
871         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
872         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
873         JIT if DISABLE_JIT is defined.
874
875         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
876         defined.
877
878 2008-09-10  Mark Probst  <mark.probst@gmail.com>
879
880         * iltests.il.in: Disable the fconv test on PPC (the result is
881         undefined according to ECMA).
882
883 2008-09-10  Mark Probst  <mark.probst@gmail.com>
884
885         * iltests.il.in: Enable tail call tests for PPC.
886
887         * mini.h: Add variable for storing incoming valuetype argument
888         addresses for tail calls.
889
890         * mini-ppc.c: Implement valuetype arguments and return values for
891         tailcalls on Linux.
892
893 2008-09-09  Mark Probst  <mark.probst@gmail.com>
894
895         * mini-ppc.c: Partially implement tail calls (struct arguments and
896         return values not supported).
897
898         * method-to-ir.c: Enable tail calls on PPC.
899
900 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
901
902         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
903         runtime-invoke wrappers to work around the problem of them getting
904         assigned to a random class.
905
906         * aot-runtime.c (mono_aot_get_method): Ditto.
907         
908 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
909
910         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
911         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
912
913 2008-09-07  Mark Probst  <mark.probst@gmail.com>
914
915         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
916         until they're implemented properly.
917
918         * exceptions-ppc.c: Use arch-independent exception-handling code
919         instead of custom one.
920
921         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
922         for Linear IR.
923
924         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
925
926         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
927         applies when __powerpc__ is defined.
928
929 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
930
931         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
932         methods to their code to avoid computing the full name of wrappers and
933         doing a lookup in a string hash table.
934
935 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
936
937         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
938         we identify bblocks before method_to_ir () is ran.
939
940         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
941         Also avoid optimizing branches pointing to themselves.
942
943         * mini.c (mini_method_compile): Ditto. Fixes #422947.
944
945 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
946
947         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
948
949 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
950
951         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
952         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
953         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
954         'buf'.
955
956         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
957         jumped to the same entry in plt_jump_table.
958
959 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
960
961         * method-to-ir.c (initialize_array_data): Handle field with RVA from
962         dynamic images.
963
964 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
965
966         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
967         other assignment can be if converted. Saves 1.5% on corlib size and fixes
968         #421807.
969
970 2008-08-29  Geoff Norton  <gnorton@novell.com>
971
972         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
973         segment, and doesn't properly handle .space as .text.  Fixes
974         AOT Mach/ARM
975
976 2008-08-29  Geoff Norton  <gnorton@novell.com>
977
978         * mini.c: Disable the mach exception handler when running on 
979         ARM
980
981 2008-08-29  Geoff Norton  <gnorton@novell.com>
982
983         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
984         globals on Darwin/ARM
985
986 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
987
988         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
989         since too many things depend on it. Instead, call 
990         mono_runtime_set_no_exec ().
991         
992         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
993         the new JIT.
994
995         * aot-compiler.c: Add an 'asm-only' AOT option.
996
997         * mini.c: Avoid initializing the runtime when doing AOT compilation.
998                 
999         * aot-compiler.c (compile_method): Disable gshared support for now as it
1000         doesn't yet work.
1001
1002 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1003
1004         * mini-amd64.h : Fix a compiler warning.
1005
1006         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1007           Changed to use a callback function to retrieve the unwind info.
1008           This avoids problems observed when code blocks were removed by
1009           unloading an app domain.
1010
1011         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1012           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1013           to work properly.
1014
1015         Contributed under MIT/X11 license.
1016
1017 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1018
1019         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1020           case to keep the stack aligned to 8.
1021
1022         Contributed under MIT/X11 license.
1023
1024 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1025
1026         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1027         avoid repeated linear searches.
1028
1029 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1032         methods it can't handle.
1033         
1034         * aot-compiler.c (add_method): Avoid adding a method twice.
1035         (add_wrappers): Add runtime invoke wrappers for all methods.
1036
1037         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1038         function to create an aot-compatible version of this trampoline.
1039
1040         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1041
1042 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1043
1044         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1045
1046         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1047         with a generic sharing failure.
1048
1049         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1050
1051         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1052         CEE_RETHROW. Fixes #419634.
1053
1054         * mini.c (mono_method_to_ir): Ditto.
1055
1056         * exceptions.cs: Add a new test.
1057         
1058         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1059         to mono_type_stack_size_internal () since some callers might not pass in
1060         an rgctx.
1061
1062         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1063         instrument_prolog. Fixes #419878.
1064
1065         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1066         doubles in soft float mode volatile.
1067
1068 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1069
1070         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1071
1072         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1073         to handle soft float correctly.
1074
1075         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1076         the fast path.
1077
1078         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1079
1080         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1081         to sp, since the generics catch code requires it.
1082
1083         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1084         copying.
1085
1086         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1087         mono_arch_emit_imt_argument ().
1088
1089         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1090
1091         * mini-arm.c tramp-arm.c: Generic sharing updates.
1092
1093 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1094
1095         * mini-arm.c: Fix the arm build.
1096
1097         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1098         handling enums, generic instances and generic sharing.
1099         (mini_type_stack_size_full): Ditto.
1100
1101         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1102         
1103         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1104
1105         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1106
1107         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1108         trampolines.
1109
1110         * mini-arm.c: Various small generic sharing changes.
1111
1112         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1113         this for x86.
1114         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1115         custom code.
1116
1117         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1118         helper function to return a generic class init trampoline.
1119
1120         * method-to-ir.c mini.c: Use it.
1121         
1122         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1123         arch-specfic function to return a generic class init trampoline.
1124
1125         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1126         the GENERIC_CLASS_INIT custom code.
1127
1128         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1129         a fatal error, not a sharing failure.
1130
1131         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1132         needed.
1133
1134         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1135         trampoline argument from MONO_ARCH_VTABLE_REG.
1136
1137         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1138         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1139         argument, and pass the vtable in VTABLE_REG.
1140
1141         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1142         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1143         argument, and pass the vtable in VTABLE_REG.
1144         (mono_arch_create_trampoline_code_full): Remove some special casing for
1145         the rgctx fetch trampoline.
1146
1147         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1148         Fixes #419273.
1149
1150         * iltests.il: Add a test for it.
1151
1152 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1153
1154         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1155
1156         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1157         no longer needed.
1158
1159         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1160         use mono_jit_info_table_find () to avoid recursion.
1161         (mono_delegate_trampoline): Add a sync wrapper here.
1162
1163         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1164         here.
1165
1166         * mini.c (mono_method_to_ir): Ditto.
1167         
1168         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1169         add_sync_wrapper argument. Don't add a sync wrapper here.
1170         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1171
1172         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1173         
1174 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1175
1176         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1177           of nonvolatile registers back from MonoContext to CONTEXT.
1178
1179         Contributed under MIT/X11 license.
1180
1181 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1182
1183         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1184           arguments on Winx64 there are only 4 argument registers.  For this
1185           logic to work the last argument must be pulled from the stack.  
1186
1187         Contributed under MIT/X11 license.
1188
1189 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1190
1191         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1192
1193         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1194         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1195         encode/decode_method_ref ().
1196
1197         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1198
1199         * aot-runtime.c (decode_patch): Ditto.  
1200
1201         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1202         MONO_PATCH_INFO_METHOD.
1203
1204         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1205         MonoGenericJitInfo.
1206
1207         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1208         MonoGenericJitInfo.
1209
1210         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1211
1212         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1213         one from the caller.
1214
1215         * aot-runtime.c (decode_generic_inst): New function to decode and
1216         return a interned generic inst.
1217         (decode_klass_ref): Use it.
1218         (decode_method_ref): Ditto.
1219
1220         * aot-compiler.c (emit_exception_debug_info): Save 
1221         jinfo->has_generic_jit_info too.
1222
1223 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1224
1225         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1226
1227         * iltests.il.in: Add a test for fconv_to_i.
1228
1229         * liveness.c: Disable the liveness2 pass for now to save space.
1230
1231         * regalloc2.c: Include mempool-internals.h to fix warnings.
1232
1233         * aot-compiler.c (encode_method_ref): Encode the context of generic
1234         instance methods.
1235
1236         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1237         the context saved in the aot file.
1238
1239         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1240
1241         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1242
1243         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1244         volatile so they won't be optimized away.
1245
1246 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1247
1248         * ssa.c:
1249         * ssa2.c:
1250         * mini.c:
1251         * regalloc2.c:
1252         * dominators.c: Remove duplicated functions that now are in
1253         mempool-internals.h.
1254
1255 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1256
1257         * aot-compiler.c: Fix warnings.
1258
1259         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1260
1261         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1262
1263         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1264         as the patch type.
1265
1266         * mini.c (mono_resolve_patch_target): Ditto.
1267         
1268         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1269         (encode_klass_ref): Add support for encoding VARs/MVARs.
1270
1271         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1272
1273         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1274         the handling of the got entries into a separate 'decode_got_entry' function.
1275         Add support for RGCTX_FETCH.
1276
1277         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1278         clobbered by the trampoline code.
1279
1280         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1281         not clobbered by the indirect calling code.
1282
1283 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1284
1285         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1286         to fix the build.
1287
1288 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1289
1290         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1291         signature using the compilation mempool otherwise we would leak it.
1292
1293 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1296         mono_emit_abs_call ().
1297
1298         * patch-info.h: Add GENERIC_CLASS_INIT.
1299
1300         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1301
1302         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1303         as their target as a near call.
1304
1305         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1306         ABS handling code.
1307         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1308
1309         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1310         call to a runtime function described by a patch.
1311
1312         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1313         mono_emit_abs_call, this has the advantage that the ABS handling code in
1314         mono_codegen () can handle them both, and can handle other stuff in the
1315         future without additional code.
1316
1317         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1318         entry.
1319         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1320         abs addresses.
1321
1322         * mini.h: Add missing bblock related prototypes.
1323
1324         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1325         reverse_inst_list_len fields.
1326
1327         * mini.c: Refactor this file a bit by moving branch optimizations to 
1328         branch-opts.c.
1329
1330         * method-to-ir.c: Merge generic sharing changes missed earlier.
1331
1332         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1333
1334         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1335         shared patches. Process METHODCONST as a shared patch.
1336
1337         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1338         as it crashes on the 2.0 mscorlib.
1339
1340         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1341         to cause crashes.
1342         
1343         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1344         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1345         by IMT.
1346
1347         * aot-compiler.c: Reorganize the got handling code to be a bit more
1348         understandable.
1349
1350 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1351
1352         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1353         mono_patch_info_equals/hash, and use it to massively simplify
1354         get_plt_index ().
1355
1356         * mini.c (mono_patch_info_hash): Simplify this and add support for
1357         more patch types.
1358
1359         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1360
1361         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1362         handling code, since an offset is not enough to identify a trampoline.
1363
1364         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1365
1366 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1367
1368         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1369
1370         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1371
1372         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1373
1374         * decompose.c: PPC decompositions for various ops.
1375
1376         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1377
1378 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1379
1380         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1381         call the generic trampoline code using a call, instead of a jump, to
1382         remove some special casing from the generic trampoline code.
1383
1384         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1385         (mono_codegen): Ditto.
1386
1387         * aot-compiler.c aot-runtime.c: Ditto.
1388
1389         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1390
1391         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1392         helper function to find the offset corresponding to a lazy fetch trampoline.
1393
1394         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1395         when doing generic sharing.
1396
1397         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1398         places.
1399         
1400         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1401         mini-trampolines.c to be with the other trampoline creation functions.
1402
1403         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1404         as it is equal to method->signature in most cases, add a 
1405         mono_emit_method_call_full variant which takes a signature and an imt
1406         argument as well.
1407
1408 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1409
1410         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1411         to this function, since it could be computed easily from the method 
1412         argument.
1413         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1414         more.
1415
1416         * method-to-ir.c mini.c: Remove references to 
1417         compile_generic_method_wo_context.
1418
1419         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1420         generic method calls.
1421         
1422         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1423         dimensional non-szarrays.
1424
1425         * mini.c (mini_init): Register mono_array_new_1.
1426
1427         * jit-icalls.c (mono_array_new_1): New jit icall.
1428
1429         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1430         pointing to the method.
1431
1432         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1433         method addresses belonging to METHOD_JUMP patches in the 
1434         jump_target_got_slot_hash.
1435         (mono_aot_load_method): Ditto.
1436
1437         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1438         METHOD_JUMP patches.
1439
1440         * mini.c (mini_create_jit_domain_info): New helper function which 
1441         initializes/frees domain->runtime_info.
1442         (mini_free_jit_domain_info): Ditto.
1443         (mini_init): Install the domain hook functions with the runtime.
1444
1445         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1446         information maintained by the JIT.
1447
1448         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1449         insertion into jump_table_hash into mono_codegen (), also implement proper
1450         locking.
1451
1452         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1453         tail calls, it is already done by the aot code.
1454         
1455         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1456         mechanism on amd64.
1457
1458         * iltests.il.in: Make the jmp test a bit more complex.
1459
1460         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1461         generic instances which doesn't have a token.
1462
1463         * aot-runtime.c (decode_method_ref): Ditto.
1464         
1465         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1466         can handle this case now.
1467         (handle_box): Ditto.
1468
1469 2008-08-15  Geoff Norton  <gnorton@novell.com>
1470
1471         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1472         debugging check.
1473
1474 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1475
1476         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1477         calling generic methods.
1478
1479         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1480
1481         * aot-runtime.c (decode_patch_info): Ditto.
1482
1483         * mini.c (mono_resolve_patch_target): Ditto.
1484         
1485         * patch-info.h: Add METHOD_RGCTX.
1486
1487         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1488
1489 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1490
1491         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1492         arguments in registers.
1493
1494         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1495         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1496
1497         * mini.c (mini_method_compile): Abort aot compilation for generic
1498         methods if generic sharing is disabled.
1499         
1500         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1501         an mrgctx.
1502
1503         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1504         requiring an mrgctx.
1505
1506         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1507         store instructions when converting a vcall to a normal call.
1508
1509         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1510         mono_arch_find_jit_info.
1511
1512 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1513
1514         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1515         avoid calling mono_method_full_name () for every method even if the
1516         env var is not set.
1517         (check_inline_caller_method_name_limit): Ditto.
1518
1519 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1522         assemblies in one run.
1523
1524         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1525         skipped methods if it is not 0.
1526
1527         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1528
1529 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1530
1531         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1532           MONO_ARCH_HAVE_UNWIND_TABLE.
1533
1534         Contributed under MIT/X11 license.
1535
1536 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1537
1538         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1539           from default optimizaton list on Winx64.
1540
1541         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1542
1543         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1544           the LMF from the MonoJitTlsData structure.
1545
1546         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1547
1548         Contributed under MIT/X11 license.
1549
1550 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * mini.c (sigsegv_signal_handler): Fix the build.
1553
1554         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1555         assembly->aot_module.
1556
1557         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1558         hash table. This simplifies and speeds up a lot of code, and fixes support
1559         for .netmodules.
1560
1561         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1562         with the runtime.
1563
1564         * mini-exceptions.c: Ditto.
1565         
1566         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1567         'native_offset' argument, since these are computed in the 
1568         mono_find_jit_info () function.
1569
1570         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1571         is used by exceptions-ppc.c.
1572
1573         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1574         mono_arch_find_jit_info ().
1575         
1576         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1577         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1578         generic code in mini-exceptions.c.
1579
1580 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1581
1582         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1583
1584         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1585         
1586         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1587         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1588         called while holding the loader lock. Fixes #415608.
1589         (mono_aot_get_method_from_token_inner): Ditto.
1590
1591 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1592
1593         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1594         to reduce differences between this and the generic implementation in
1595         mini-exceptions.c.
1596         (ves_icall_get_frame_info): Ditto.
1597
1598         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1599
1600         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1601         longer neccesarry.
1602
1603         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1604         mono_arch_get_call_filter () and make it non-static, for consistency with the
1605         other architectures.
1606
1607 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1608
1609         * mini.c:
1610         * local-propagation.c:
1611         * mini-x86.c: Correct the name of arch defines.
1612
1613 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1614
1615         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1616         NO_EMULATE_LONG_SHIFT_OPS define.
1617
1618 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1619
1620         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1621         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1622
1623         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1624         MACH fixes. Merged from the 2.0 branch.
1625
1626         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1627
1628         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1629         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1630
1631         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1632
1633         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1634         mono_marshal_get_native_wrapper () signature changes.
1635
1636 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1637
1638         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1639         conversion bug under arm.
1640
1641 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1642
1643         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1644
1645         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1646         with overflow checking.
1647
1648 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1649
1650         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1651         to the genmdesc.pl file
1652
1653 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1654
1655         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1656         arg_array in the soft-float versions of the LOAD/STORE macros.
1657
1658         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1659         implementation.
1660
1661         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1662
1663 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1666         a float HFA. Fixes #413621.
1667
1668 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1669
1670         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1671         frame_size to args_size. Fixes build.
1672
1673 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1674
1675         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1676         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1677
1678         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1679         the stack are not unaligned. Fixes #413247.
1680         
1681 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1682
1683         * mini.c: update jitted methods performance counters.
1684
1685 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1686
1687         * mini-exceptions.c: increase the exceptions thrown performance
1688         counter in mono_handle_exception ().
1689
1690 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1691
1692         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1693         can work with netmodules.
1694
1695 2008-07-28  Geoff Norton  <gnorton@novell.com>
1696
1697         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1698         regression tests.
1699
1700 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1701
1702         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1703         correct place.
1704
1705 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1706
1707         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1708           The float param registers and other param registers must be the 
1709           same index on Windows x64.
1710
1711         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1712           ArgValuetypeAddrInIReg argument case.  Setting the argument
1713           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1714
1715         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1716           variable computed above as the copy length for arguments of storage
1717           type ArgValuetypeAddrInIReg.
1718
1719         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1720           ArgValuetypeAddrInIReg argument case.  This case will rely on
1721           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1722
1723         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1724           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1725           jump and tail call instructoins as they do not follow the typical call behavior.
1726
1727         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1728           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1729           local variable and pass the local variable by reference to the called method.
1730
1731         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1732           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1733           of a struct is passed in a register it must be saved with the other
1734           volatile argument on the stack.
1735
1736         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1737           frame pointer the stack adjustment value must be saved to the unwind 
1738           info structure.
1739
1740         Contributed under MIT/X11 license.
1741
1742 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1743
1744         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1745         which got lost in the merge.
1746
1747 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1748
1749         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1750         build.
1751
1752         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1753         
1754         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1755         icalls, since they won't be patched.
1756
1757         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1758         different code sequence when running under valgrind to prevent some valgrind
1759         errors.
1760
1761         * iltests.il.in: Add new regression test.
1762
1763         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1764         end with a throw.
1765
1766         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1767         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1768
1769         * iltests.il.in: Add new test.
1770
1771         * aot-compiler.c: Fix some warnings.
1772
1773         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1774         Fixes #412494.
1775
1776 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1777
1778         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1779         (mini_usage_jitdeveloper): Add a missing --wapi option.
1780
1781 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1782
1783         * mini-codegen.c: Simplify the is_fp macros.
1784         (free_up_ireg): Remove, use free_up_reg instead.
1785         (free_up_reg): Fix the fp case.
1786
1787 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1788
1789         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1790         lowered earlier.
1791
1792         * exceptions-x86.c: Merge some changes which seemed to have got lost
1793         in the linear-ir merge.
1794
1795         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1796
1797         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1798         long vreg volatile even if the variable was already created.
1799
1800         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1801         volatile variables.
1802
1803 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1804
1805         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1806
1807         * mini.c (mono_jit_compile_method_inner): Add support for 
1808         MONO_EXCEPTION_BAD_IMAGE.
1809
1810         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1811         mini_method_get_context () returns NULL. Fixes #356531.
1812
1813         * mini.c (mono_method_to_ir): Ditto.
1814         
1815         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1816         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1817
1818 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1819
1820         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1821         in the LDFTN implementation.
1822
1823 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1824
1825         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1826         code, patch calls to icalls, too, even if they're not in the
1827         shared generic code hash.  Fixes #411962.
1828
1829 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1830
1831         * cpu-x86.md: Increase the length of the fcall opcodes.
1832
1833         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1834         calls returning floats.
1835
1836         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1837         on NEWARR.
1838         
1839         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1840         missed earlier.
1841
1842         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1843         into the domain->method_code_hash.
1844
1845         * aot-compiler.c: Fix win32 build.
1846
1847         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1848         
1849         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1850         gshared NEWARR implementation.
1851
1852         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1853
1854         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1855         can be used outside of method_to_ir.
1856
1857         * mini.h (MonoCompile): Add arg_types field.
1858
1859         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1860         
1861         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1862         the values of the local arg_array and param_types array.
1863
1864 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1865
1866         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1867         got accesses might only get generated later when NEWOBJ is decomposed.
1868         
1869         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1870         looking up the native code of the target method when a delegate is called
1871         for the first time.
1872
1873         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1874         optimization.
1875
1876         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1877
1878         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1879         AOT work on platforms without a working dlsym implementation.
1880
1881         * mini.h: Bump AOT image format version.
1882         
1883 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1884
1885         * mini-exceptions.c: Free a MonoType with
1886         mono_metadata_free_type() instead of g_free().
1887
1888         * aot-runtime.c: Free a MonoType.
1889
1890 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1891
1892         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1893         optimization.
1894
1895         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1896         fp stack on x86.
1897
1898 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1899         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1900         profiler hook.
1901
1902 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1903
1904         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1905         NEWOBJ calls on valuetypes.
1906
1907         * iltests.il.in: Add new test.
1908
1909         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1910
1911 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1914         is no longer needed.
1915
1916         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1917         non register sized integer arguments.
1918         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1919         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1920         emit_memcpy2 ().
1921
1922         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1923         CEE_MONO_RETOBJ.
1924         
1925         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1926         two a binop with different sized arguments is emitted.
1927
1928         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1929         instruction in the ins==NULL case.
1930
1931 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1934
1935         * mini-x86.c: Fix osx build.
1936
1937         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1938         opcodes as well.
1939
1940         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1941         instruction for non int sized variables.
1942
1943         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1944         implementation.
1945
1946 2008-07-23  Robert Jordan  <robertj@gmx.net>
1947
1948         * method-to-ir.c: Fix MSVC build.
1949
1950 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1951
1952         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1953         a non int sized type, widen it to an int since newer versions of gcc seem to
1954         generate code which needs this.
1955
1956         * ssa2.c abcremoval2.c: Fix warnings.
1957
1958         * *: Merge the Linear IR branch.
1959
1960         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1961         the ChangeLog file there describes all the changes done over the years. 
1962         Further documentation can be found at www.mono-project.com/Linear_IL.
1963
1964 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1965
1966         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1967           The float param registers and other param registers must be the 
1968           same index on Windows x64.
1969
1970         Contributed under MIT/X11 license.
1971
1972 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1973
1974         * mini.c: Make the previous fix GC safe.
1975
1976 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1977
1978         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1979
1980 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1981
1982         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1983           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1984           ArgValuetypeAddrInIReg instead.
1985
1986         Contributed under MIT/X11 license.
1987
1988 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1989
1990         * mini-codegen.c (get_register_spilling): Fix a warning.
1991
1992 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1993
1994         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1995         for types which the initialization fails. Raises the provided exception
1996         at the right stop after cleanup.
1997
1998 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1999
2000         * aot-compiler.c: Free most of the memory allocated during compilation.
2001
2002         * mini.c (mini_parse_debug_options): Fix a leak.
2003         
2004         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2005         during aot compilation.
2006
2007 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2008
2009         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2010         it has too much register pressure.
2011
2012 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2013
2014         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2015
2016 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2017
2018         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2019         on x86.
2020
2021         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2022         on amd64 similar to the way it is done on arm.
2023
2024         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2025
2026         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2027         consistency, normalize error messages, avoid loading aot-only modules in
2028         normal mode.
2029
2030         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2031         for consistency.
2032
2033         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2034
2035 2008-07-11  Martin Baulig  <martin@ximian.com>
2036
2037         * debug-debugger.h
2038         (MonoDebuggerInfo): Add `interruption_request'.
2039
2040 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * aot-compiler.c (emit_plt): Remove some dead code.
2043
2044         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2045
2046         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2047         return the plt info offset belonging to a given plt entry.
2048
2049         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2050         mono_aot_get_plt_info_offset.
2051         
2052         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2053         similar to the amd64 code by makeing jumps through a separate jump table 
2054         instead of embedding the jump addresses into the code.
2055
2056 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2057
2058         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2059         method.
2060
2061 2008-07-10  Martin Baulig  <martin@ximian.com>
2062
2063         * mini.c (mini_method_compile): Disable generics sharing when
2064         running in the debugger.
2065
2066 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2069
2070         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2071         the local register allocator from running out of registers on x86 when 
2072         using aot.
2073
2074 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2075
2076         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2077         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2078         C4146.
2079
2080         Contributed under MIT/X11 license.
2081
2082 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2085         speed up the assembler.
2086
2087 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2088
2089         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2090         support.
2091
2092         * mini.c: Move the soft float handling macros a bit earlier, add 
2093         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2094         place.
2095
2096         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2097
2098         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2099         read-only to help catch code allocation requests.
2100         
2101         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2102         and turn it off when using --aot-only or when compiling with --aot=full.
2103
2104         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2105         jump table for switches from the normal domain mempool, not the code
2106         manager.
2107
2108         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2109         unbox trampoline which handles aot-only mode too.
2110
2111         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2112         an AOTed unbox trampoline.
2113
2114         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2115
2116 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2117
2118         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2119         ""
2120
2121         Contributed under MIT/X11 license.
2122
2123 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2124
2125         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2126           the unwind information for the method at the end of the allocated block.
2127           
2128         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2129           MonoCompileArch to hold the unwind info for SEH on Winx64
2130         
2131         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2132           frame pointer info for the method being compiled.
2133           
2134         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2135           the call to mono_exception_from_token.
2136           
2137         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2138           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2139           information is stored a the end of the method block because it is all 32-bit offset based.
2140
2141         Contributed under MIT/X11 license.
2142
2143 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2144
2145         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2146
2147         * wapihandles.c: Fix warnings.
2148
2149         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2150         mode.
2151
2152         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2153         mono_jit_compile_method in aot-only mode since that calls the type 
2154         initializer.
2155         
2156         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2157         get_delegate_invoke_impl in aot-only mode.
2158
2159         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2160
2161 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2162
2163         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2164
2165         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2166         is on by default.
2167
2168         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2169
2170         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2171         init trampoline from the AOT file as well.
2172
2173         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2174         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2175         code.
2176
2177         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2178         mono_init.
2179
2180         * exceptions-amd64.c: Add _full variants for the remaining exception code
2181         creation functions as well, allow emission of relocatable code, remove
2182         caching since that is now done by the caller.
2183
2184         * mini-exceptions.c: Add _full variants for the remaining exception code
2185         creation functions as well, add aot-only support.
2186
2187         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2188         if we can determine a proper token for them.
2189         (add_wrappers): Add a few more wrappers.
2190         (emit_method_code): Remove some dead code.
2191         (emit_trampolines): Emit exception code too.
2192
2193         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2194
2195         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2196         mono_array_new_va which avoids varargs.
2197
2198         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2199
2200         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2201         mono_arch_create_specific_trampoline () in all places.
2202
2203         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2204         a bit so it can be used for other things as well.
2205         
2206         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2207         on demand as well.
2208
2209         * exceptions-amd64.c: Rename the caching from the exception code creation
2210         functions, it is done by the caller instead.
2211         
2212         * exceptions-amd64.c: Change the signature of the exception code creation 
2213         functions to allow the creation of relocatable code later.
2214
2215         * mini-exceptions.c: Add a set of functions to query the various 
2216         runtime-generated exception functions.
2217
2218         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2219         mono_arch_.. () functions.
2220         
2221 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2222
2223         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2224
2225         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2226
2227         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2228         (mini_get_vtable_trampoline): Ditto.
2229
2230         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2231         code in the AOT case by returning the code size and a list of relocations to
2232         the caller.
2233
2234         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2235
2236 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2237
2238         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2239           clean the stack.
2240
2241         Contributed under MIT/X11 license.
2242
2243 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2244
2245         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2246         so the buffer size can be computed correctly. Fixes #404735.
2247
2248         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2249         normally as cfg->debug_info is already freed.
2250
2251 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2252
2253         * mini-amd64.c: For calls returning vtypes in registers, don't store
2254         the return address on the stack, instead allocate a separate local for
2255         it. Fixes #404729.
2256
2257 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2258
2259         * mini-trampolines.c, mini.h: Add an argument to
2260         mono_create_jit_trampoline_in_domain() for turning off the adding
2261         of the sync wrapper.
2262
2263         * mini.c: Use the JIT trampoline without sync instead of
2264         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2265         be patched.
2266
2267 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2268
2269         * driver.c: Turn on GSHARED optimization by default.
2270
2271 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2274         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2275
2276         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2277         create a variant of the generic trampoline code callable from AOTed trampolines.
2278
2279         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2280         trampoline code callable from AOTed trampolines.
2281
2282         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2283
2284 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2285
2286         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2287         pass-through manner.
2288
2289         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2290         and don't fail sharing for them anymore.
2291
2292         * mini-exceptions.c: Handle exceptions in shared generic methods.
2293
2294         * generic-sharing.c: When checking the context of a generic
2295         method, also check its class's context.  Don't treat wrappers as
2296         sharable.
2297
2298         * mini-trampolines.c: Some code factored out to
2299         metadata/generic-sharing.c.  Handle the MRGCTX case.
2300
2301         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2302         we must deal with the method being of another instantiation of the
2303         class.  Add static rgctx invoke wrappers to generic methods.
2304
2305 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2306
2307         * mini.c: Provide all jit infos of generic shared methods with a
2308         generic jit info.
2309
2310         * mini-exceptions.c: Handle the new situation that a generic info
2311         might be available, but not info about the this/vtable/mrgctx
2312         variable.
2313
2314 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2315
2316         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2317         generic methods.
2318
2319 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2320
2321         * dominators.c (check_dominance_frontier): Fix a warning.
2322
2323         * mini.h: Add some missing prototypes.
2324
2325         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2326
2327         * driver.c (mono_jit_init_version): Correct the comments since the first
2328         argument should be the name of the root domain, not a filename.
2329
2330         * aot-runtime.c (make_writable): Error out if this is called while running
2331         with --aot-only.
2332         (load_aot_module): Ditto.
2333
2334         * aot-compiler.c: Really fix the computation of method indexes.
2335
2336         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2337         optimizations as this is no longer called frequently.
2338
2339         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2340         method and the invoke impl code and pass it to the delegate trampoline instead of
2341         just the delegate class.
2342
2343 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2344
2345         * aot-compiler.c: Fixup the computation of method indexes.
2346         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2347         the method builder infrastructure.
2348
2349         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2350         has no header.
2351
2352         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2353         mode, load the method right away instead of creating a trampoline.
2354
2355         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2356
2357         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2358         some checks a bit.
2359
2360 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2363         (mono_aot_load_method): Use method_index instead of method->token.
2364
2365         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2366         can handle icalls etc. properly.
2367
2368         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2369
2370         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2371
2372         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2373         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2374         JIT_ICALL_ADDR patch type.
2375
2376         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2377
2378         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2379         request flag.
2380         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2381
2382         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2383
2384 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2385
2386         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2387         domain->jit_code_hash.
2388
2389 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2390
2391         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2392
2393 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2394
2395         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2396         get_this_arg_from_call, let it compute it when needed.
2397
2398         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2399         gsctx from code only when needed.
2400
2401         * mini-trampolines.c (get_generic_context): Rename this to 
2402         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2403         it can be called by the arch backends.
2404
2405         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2406
2407 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2408
2409         * driver.c (mono_main): Add experimental --aot-only command line option.
2410
2411         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2412         set.
2413
2414 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2415
2416         * driver.c (DllMain): Remove mono_module_handle.
2417
2418         Contributed under MIT/X11 license.
2419
2420 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2421
2422         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2423         for emitting methods which are not in the source assembly. Detect and report
2424         failure of assembling+linking.
2425         
2426         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2427
2428         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2429
2430 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2431
2432         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2433
2434 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2435
2436         * mini.h: Remove some obsolete prototypes.
2437
2438         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2439
2440 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2441
2442         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2443         supported by Visual Studio, so use alloca().
2444
2445 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2446
2447         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2448         Fixes #402585.
2449
2450 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2451
2452         * mini.c: Fail sharing of a generic method if it contains an open
2453         catch clause (because we don't pass MRGCTXs yet).
2454
2455 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2456
2457         * mini.c: When compiling a method with generic sharing, insert the
2458         method instantiated with an all-Object generic context into the
2459         jit info table, instead of the context of the first instantiation
2460         of the method we happen to compile.
2461
2462 2008-06-18  Martin Baulig  <martin@ximian.com>
2463
2464         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2465         `major_version' and `minor_version'.
2466
2467 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2468
2469         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2470         mono_method_is_generic_sharable_impl() takes an additional
2471         argument specifying whether to treat type variables as reference
2472         types.
2473
2474 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2475
2476         * mini.h: Removed obsolete prototypes.
2477
2478 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2479
2480         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2481         already handle them.
2482
2483 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2484
2485         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2486         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2487         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2488         tramp-x86.c: Added a MonoGenericContext* argument to
2489         mono_arch_get_unbox_trampoline() so that it can call other
2490         functions which require it.
2491
2492 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2493
2494         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2495         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2496         mono_arch_get_this_arg_from_call() takes a
2497         MonoGenericSharingContext* as well.
2498
2499 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2500
2501         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2502         implement generic sharing of unbox.
2503
2504 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2505
2506         * mini.c: Don't compute the vtable to determine whether a field is
2507         special static, because it might not work for open types.
2508
2509 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2510
2511         * mini.c: Removed the unused token_type and token_source arguments
2512         from get_runtime_generic_context_ptr().
2513
2514 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2515
2516         * mini.c (ADD_BINOP): fix the build
2517
2518 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2519
2520         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2521         a widening op.
2522
2523 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2524
2525         * mini.h: Removed class relations enum that's not used anymore.
2526
2527 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2528
2529         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2530
2531         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2532         the lazy fetch trampoline access code.
2533
2534 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2537
2538 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2541
2542         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2543
2544         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2545
2546 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2549         intrinsics.
2550
2551         * mini-ops.h: Add MIN/MAX_UN opcodes.
2552
2553         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2554         intrinsics.
2555
2556         * basic-math.cs: Add more min/max tests.
2557
2558         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2559
2560 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2561
2562         * mini.c: Small fix in the prologue of emit_castclass.
2563
2564 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2567
2568         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2569         do not work even for unsigned types. Fixes #400014.
2570
2571         * basic-math.cs: Add regression tests for unsigned Min/Max.
2572
2573 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2574
2575         * mini.c: Added additional context_used argument to several
2576         functions, which will be needed for sharing generic methods.  Use
2577         GET_RGCTX macro wherever appropriate.  Declare only one
2578         context_used in mono_method_to_ir().
2579
2580 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2581
2582         * mini.c, generic-sharing.c: Removed generic class relations.
2583
2584         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2585         functions due to MRGCTX changes.
2586
2587 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2588
2589         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2590         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2591         with calculated IMT.
2592
2593         * mini.c: Generic sharing of calls via generic interfaces.
2594
2595         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2596         generic method with non-constant MonoGenericContext*.  Instead,
2597         the context is taken out of the method itself.
2598
2599 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2600
2601         * mini.c: Generic sharing of ldvirtftn.
2602
2603 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2604
2605         * mini.c: Generic sharing of ldftn.
2606
2607 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2608
2609         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2610
2611 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2612
2613         * mini.c: Generic sharing of the special case of ldtoken followed
2614         by a call to GetTypeFromHandle.
2615
2616 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2617
2618         * mini.c: Generic sharing of box for nullable types.
2619
2620 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2623         are passed on the stack. Fixes #324807.
2624
2625 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2626
2627         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2628         for the ArgValuetypeAddrInIReg case.
2629
2630         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2631         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2632
2633         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2634         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2635         local variable and pass the local variable by reference to the called method.
2636           
2637         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2638         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2639
2640         Contributed under MIT/X11 license.
2641
2642 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2643
2644         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2645
2646         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2647         everything.
2648
2649 2008-06-10  Martin Baulig  <martin@ximian.com>
2650
2651         * debug-mini.c
2652         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2653
2654 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2655
2656         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2657         possible error when no arguments are passed.
2658
2659         Contributed under MIT/X11 license.
2660
2661 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2662
2663         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2664         where the file name is NULL.
2665
2666 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2667
2668         * mini.c: Fix s390 build.
2669
2670 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2671
2672         * trace.c (mono_trace_parse_options): Fix warnings.
2673
2674         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2675
2676 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2677
2678         * mini.c (remove_block_if_useless): Avoid printing the method name.
2679         
2680         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2681         MONO_INST_NEW.
2682
2683         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2684         LMF. Not yet used.
2685
2686         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2687         translated code after it has been patched.
2688
2689 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2690
2691         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2692         avoid problems during code patching on SMP systems.
2693         (emit_call): Avoid adding a patch info which is already added by 
2694         emit_call_body.
2695         (mono_arch_emit_exceptions): Ditto.
2696
2697 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2700         MONO_TYPE_ISSTRUCT already checks for it.
2701
2702 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2703
2704         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2705           structs with floats on Winx64 the float registers are not used.  
2706           The integer registers are always used..
2707         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2708           only one register will be used and only if the size of the struct 
2709           is 1,2,4, or 8 bytes.
2710
2711         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2712           to work for Winx64.
2713
2714         Contributed under MIT/X11 license.
2715
2716 2008-06-05  Martin Baulig  <martin@ximian.com>
2717
2718         * debug-debugger.c (debugger_lookup_class): Also call
2719         mono_class_setup_methods() here; we're only called from RTI.
2720
2721 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2722
2723         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2724         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2725         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2726         Post-process object files and add dtrace-generated object, if necessary.
2727
2728         Contributed under MIT/X11 license.
2729
2730 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2731
2732         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2733         element class.
2734
2735         * mini.c: Generic sharing for unbox.any and castclass.
2736
2737 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2738
2739         * mini.c: Ignore tailcall prefix in shared generic code and when
2740         doing calls which require a vtable/rgctx argument.
2741
2742 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2743
2744         * mini.c: Don't free the JIT info.
2745
2746         * driver.c: Changes in the JIT info table testing code.
2747
2748 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2749
2750         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2751         interruption. Fix some warnings.
2752
2753         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2754         interruption_checkpoint.
2755
2756 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2757
2758         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2759         from embedding applications.
2760
2761 2008-06-02  William Holmes  <billholmes54@gmail.com>
2762
2763         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2764           reserving 32 bytes on the stack when making calls. 
2765
2766         Contributed under MIT/X11 license.
2767
2768 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2771         the linear IL branch.
2772
2773         * driver.c: Print out more information for --version on arm.
2774
2775 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2776
2777         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2778         bb_exit instead, since out of line bblocks might not actually be emitted
2779         out-of-line.
2780         
2781         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2782         maximum epilog size for out of line bblocks if tracing is enabled.
2783
2784         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2785
2786 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2787
2788         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2789
2790 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2791
2792         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2793         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2794         opcodes.
2795
2796 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2797
2798         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2799         the 'value' to store is a constant.
2800
2801         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2802
2803         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2804         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2805
2806 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2807
2808         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2809         for accessing method->generic_container.
2810
2811 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2812
2813         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2814         
2815         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2816
2817         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2818
2819         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2820         fails.
2821
2822 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2825
2826         * mini.c: Handle the case when mono_class_vtable () fails.
2827
2828 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2829         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2830         the stat profiler.
2831
2832 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2833
2834         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2835         together with domain sharing.
2836
2837 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2838
2839         * mini.c: Treat callvirts to final methods like non-virtual calls
2840         when doing generic sharing, i.e. look them up in the runtime
2841         generic context.
2842
2843 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2844
2845         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2846         with computed types (for generic sharing).
2847
2848         * mini.c: Generic sharing for mkrefany and refanyval.
2849
2850 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2851
2852         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2853         possible.
2854
2855         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2856         the generic sharing code.
2857         
2858         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2859         when needed.
2860
2861 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2862
2863         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2864
2865 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2866
2867         * driver.c: updated copyright date
2868
2869 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2870
2871         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2872         needed.
2873
2874 2008-05-19  Martin Baulig  <martin@ximian.com>
2875
2876         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2877         pointing to the new `_mono_debug_using_mono_debugger' variable.
2878
2879         * driver.c
2880         (mono_main): Check mono_debug_using_mono_debugger() rather than
2881         the `MONO_INSIDE_MDB' environment variable to check whether we're
2882         inside the debugger.
2883
2884 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2885
2886         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2887         argument.
2888
2889 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2890
2891         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2892
2893         * mini.c: Added mini_assembly_can_skip_verification. This
2894         function checks if the assembly requested to skip verification. 
2895         Fixes part of #387274.
2896
2897 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * mini.c (mini_get_method): Disable the check for open generic classes when
2900         using generic sharing.
2901
2902         * generics.cs: Add a test for #387034.
2903
2904         * mini.c (mini_get_method): Check whenever the method class is an open generic
2905         type, and return NULL in that case, causing a verification error. Fixes
2906         #384123.
2907
2908 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2909
2910         * driver.c (mono_main): Revert r102623. The right
2911         thing to do is to enable the verifier under verifiable
2912         unless a --security flag was passed.
2913
2914         We need this non-trivial behavior for --verify-all otherwise
2915         mcs-compileall won't be able to use it. As it needs everything to
2916         be verified under validil.
2917
2918 2008-05-06  Martin Baulig  <martin@ximian.com>
2919
2920         Fix #383749.
2921
2922         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2923         (mono_debugger_thread_cleanup): Likewise.
2924         (mono_debugger_extended_notification): Likewise.
2925
2926 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2927
2928         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2929         against both inflated and non-inflated methods. We need to check against the
2930         generic definition for cases where the instantiated method is not visible.
2931         We need to check against the inflated types for cases where the instantiation
2932         changes any super type. This fixes #382986.
2933
2934         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2935         that check for visibiliy as generic params only appears as the type subject
2936         of tokens on call opcodes. Field manipulation and ldftn must always
2937         target an exact type.
2938
2939 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2940
2941         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2942         if no related --security flag is passed.
2943
2944 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2945
2946         * mini-arch.h: Prepare support for ppc64.
2947
2948         Contributed under MIT/X11 license.
2949
2950 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2951
2952         * aot-runtime.c: Prepare support for ppc64.
2953
2954         Contributed under MIT/X11 license.
2955
2956 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2957
2958         * mini-ops.h: Prepare support for ppc64.
2959
2960         Contributed under MIT/X11 license.
2961
2962 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2963
2964         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2965
2966         Contributed under MIT/X11 license.
2967
2968 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2969
2970         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2971         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2972         assemblies on windows.
2973
2974 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2975
2976         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2977         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2978         * main.c: Use UTF-8 encoded command line instead of Windows default code
2979         page on Windows to support Unicode.
2980         * driver.c (DllMain): New function for mixed-mode assembly support.
2981         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2982         export __stdcall functions without decoration.
2983
2984         Contributed under MIT/X11 license.
2985
2986 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2987
2988         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2989         saving it very early.
2990
2991 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2992
2993         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2994         deleted.  The only way to access the new RGCTX is via the
2995         trampline.
2996
2997         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2998         vtable instead of the RGCTX to static methods.
2999
3000         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3001         accessing the new RGCTX.
3002
3003         * generic-sharing.c: There is no separation between self, type
3004         arguments and other types in the RGCTX anymore.
3005
3006 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3007
3008         * mini-amd64.c (add_general): Remove previous stack adjustment.
3009         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3010         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3011         for 32 bytes of stack space reserved for all calls.
3012         
3013         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3014         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3015         adjustment.
3016         
3017         Code contributed under MIT/X11 license.
3018
3019 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3020
3021         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3022         against the root definition, peeling out method and type instantiations.
3023         Cache verify success results, code that fails verification is still
3024         checked multiple times.
3025
3026 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3027
3028         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3029
3030 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3031
3032         * mini-amd64.c (add_general): Always increment stack on Win64.
3033         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3034         on Win64.
3035         
3036         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3037         stack based argument handling on Win64.
3038         
3039         Code contributed under MIT/X11 license.
3040
3041 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3042
3043         * Makefile.am (version.h): Add support for git-svn.
3044
3045 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3046
3047         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3048         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3049         avoiding allocations and libc functions which might deadlock.
3050         
3051         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3052         'no-gdb-backtrace' option is set.
3053
3054         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3055
3056         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3057
3058 2008-04-21  Martin Baulig  <martin@ximian.com>
3059
3060         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3061         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3062
3063 2008-04-21  Martin Baulig  <martin@ximian.com>
3064
3065         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3066         `thread_vtable', `event_handler_ptr' and `event_handler'.
3067
3068 2008-04-21  Martin Baulig  <martin@ximian.com>
3069
3070         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3071         allows delayed initialization of the `executable_code_buffer' when
3072         attaching.
3073
3074 2008-04-21  Martin Baulig  <martin@ximian.com>
3075
3076         * mini.h (mono_debugger_create_notification_function): Removed.
3077         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3078
3079         * mdb-debug-info64.s
3080         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3081
3082         * mdb-debug-info32.s
3083         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3084
3085         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3086         currently only works on x86 and x86_64, so don't create it on ppc.
3087
3088 2008-04-21  Martin Baulig  <martin@ximian.com>
3089
3090         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3091
3092         * mini.c
3093         (mini_method_compile): In the fp elimination check, check
3094         `debug_options.mdb_optimizations' in addition to
3095         mono_debug_using_mono_debugger().       
3096
3097         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3098         disable some JIT optimizations which are only disabled when
3099         running inside the debugger.
3100         Added `--help-debug' option to describe the debugging options.
3101         (parse_debug_options): New static function to parse the `--debug'
3102         options, so we can easily add more stuff in future.
3103
3104 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3105
3106         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3107         the method has no body.
3108
3109 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3110
3111         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3112         assembly is not allowed in MSVC 64-bit compiler. 
3113         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3114         as we get floating point exceptions everywhere.
3115         
3116         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3117         correctly align arguments for call to throw_exception.
3118         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3119         
3120         Code contributed under MIT/X11 license.
3121
3122 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3123
3124         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3125
3126 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3127
3128         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3129
3130         * mini-amd64.c (NEW_INS): Set cil_code.
3131
3132         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3133         from mini-amd64.c so all debugger related logic is in one place.
3134
3135         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3136         later won't have a random ip assigned to them.
3137
3138 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3139
3140         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3141         the arch specific function initializes code_size.
3142         (mono_create_delegate_trampoline): Ditto.
3143
3144         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3145         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3146         platforms.
3147
3148         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3149         running under the debugger.
3150
3151         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3152         debugger.
3153
3154         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3155         debugger. Also move the disabling of optimizations here from driver.c.
3156         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3157         debugger.
3158
3159         * mini.h (MonoCompile): Add a few new flags.
3160
3161 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3162
3163         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3164         so the cil_code field of created MonoInst's is properly set.
3165         (mini_select_instructions): Ditto.
3166
3167         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3168         (MONO_INST_NEW_CALL): Ditto.
3169
3170         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3171         in many places so the ins->cil_code field is properly initialized.
3172
3173         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3174         place.
3175
3176 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3177
3178         * mini.c (mini_method_compile): Print a different message when compiling a 
3179         shared method.
3180         
3181         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3182         > 1.
3183
3184 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3185
3186         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3187         SSE2 instructions.
3188
3189         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3190         
3191 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3192
3193         * mini.c (handle_stack_args): Make this return void since its return value was
3194         never used. Also set cfg->unverifiable for invalid IL instead of calling
3195         G_BREAKPOINT ().
3196
3197 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3198
3199         * mini.c: Make sure "this" is live in catch clauses with type
3200         variables in shared generic code.
3201
3202 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3203
3204         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3205         generic_class_is_reference_type() to ensure the proper behaviour
3206         when sharing generic code and the type in question is a type
3207         argument.
3208
3209 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3212         race conditions when printing thread dumps. Fixes #377738.
3213
3214 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3215         
3216         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3217         shows up when both MonoInst arguments can cause aliasig.
3218         There is likely no way in the current JIT to trigger this problem, but
3219         it showed up in the development of generics sharing, when in a new
3220         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3221         When the generics sharing code will be committed, its tests will be
3222         valid also for this bug.
3223
3224 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3225
3226         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3227         PATCH_INFO_METHOD.
3228
3229         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3230         NULL.
3231
3232 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3233
3234         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3235         use a more detailed exception message for InvalidCastException.
3236
3237         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3238
3239         * driver.c (mono_main): Add --debug=casts option to turn on better 
3240         InvalidCastException message details.
3241
3242         * mini.c (mini_get_debug_options): New helper function to return the address of
3243         the debug_options variable.
3244
3245         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3246         the jit_tls TLS variable.
3247
3248         * mini.c (mono_jit_tls): New TLS variable.
3249
3250         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3251         option is used.
3252
3253 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3254
3255         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3256
3257         * mini.c: Removed verifer related stuff, code moved to verify.c.
3258
3259         * driver.c: Using code from verify.c instead of mini.c.
3260
3261 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3262
3263         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3264         longer valid.
3265
3266 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3267
3268         * mini.c (check_for_method_verify): Enabling verification of
3269         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3270         have been fixed.
3271
3272 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3273
3274         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3275         caller saved registers as well.
3276         
3277         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3278         saved registers as well.
3279
3280 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3281
3282         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3283
3284         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3285         code.
3286
3287 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3288
3289         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3290         to get_call_info.
3291         (get_call_info): Take a gsctx argument instead of 'cfg'.
3292
3293 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3294
3295         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3296         mono_verify_all is set.
3297
3298         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3299
3300         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3301
3302 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3303
3304         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3305         an exception.
3306
3307         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3308         verifier and the code generated by the compiler.
3309
3310 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3311
3312         * mini.c: Generic sharing of the non-nullable case of the box
3313         instruction.
3314
3315 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3316
3317         * inssel.brg: Fix the build.
3318
3319         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3320
3321 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3322
3323         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3324         Array:Address. Fixes #372410.
3325
3326         * iltests.il.in: New tests for readonly prefix.
3327
3328 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3329
3330         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3331         mini-trampolines.c.
3332
3333         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3334         mini-exceptions.c.
3335
3336         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3337         
3338         * mini.c (mono_decompose_op_imm): New helper function.
3339
3340         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3341         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3342         return value.
3343
3344         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3345         mono_arch_output_basic_block. Fix warnings.
3346
3347         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3348         for now.
3349
3350 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3353         since the extra frame is now detected automatically inside the loop.
3354
3355         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3356         opts which are now in mono_peephole_ins ().
3357         
3358         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3359
3360         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3361         frames and skip duplicate managed-to-native frames. Fixes #367665.
3362
3363         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3364         opts which are now in mono_peephole_ins ().
3365         (mono_arch_peephole_pass_2): Ditto.
3366
3367         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3368
3369         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3370         arch independent peephole optimizations.
3371
3372         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3373         opts which are now in mono_peephole_ins ().
3374
3375         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3376         
3377         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3378
3379         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3380         pattern.
3381
3382         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3383         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3384         opcode. 
3385
3386 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3389         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3390         return value.
3391
3392         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3393         mono_arch_output_basic_block. Fix warnings.
3394
3395 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3398         conv.ovf.u.un.
3399
3400 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3403         conv.ovf.u.un.
3404
3405         * iltests.il: Add new tests.
3406
3407 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3408
3409         * mini.c: Removed Windows version macros.
3410
3411 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3412
3413         * generic-sharing.c: Put reflection types in the extensible part
3414         of the runtime generic context.
3415
3416         * mini.c: Generic sharing of the GetTypeHandle special case of the
3417         ldtoken instruction.
3418
3419 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3422
3423         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3424         
3425         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3426         consistency with the other version on the linear IR branch.
3427
3428         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3429
3430         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3431
3432         * iltests.il.in: Add new tests.
3433
3434 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3435
3436         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3437
3438         * iltests.il.in: Add new tests.
3439
3440 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3441
3442         * mini.c: Two variables with the same name were declared in
3443         nesting contexts and one wasn't initialized.  Fixed.
3444
3445 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3446
3447         * mini.c: Generic sharing of the initobj instruction.
3448
3449 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3450
3451         * mini.c: make the test to optimize ldtoken from typeof() more
3452         precise.
3453
3454 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3455
3456         * mini.c: Generic sharing of the initobj instruction for reference
3457         types.
3458
3459 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3460
3461         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3462         the mono_breakpoint_clean_code() code to perform bound checks.
3463
3464 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3465
3466         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3467         mono_arch_patch_callsite() to include the start of the managed method
3468         to be able to perform bound checks.
3469
3470 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3471
3472         * mini.c: Generic sharing for the isinst instruction.
3473
3474 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3475
3476         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3477         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3478         with the runtime generic context argument.
3479
3480         * mini.c: Share calls to several types of unsharable methods by
3481         putting the address of the method code in the runtime generic
3482         context and doing an indirect call.
3483
3484         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3485         to switches.
3486
3487 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3488
3489         * generic-sharing.c: Change due to a change in the runtime genric
3490         context API.
3491
3492 2008-03-15  Martin Baulig  <martin@ximian.com>
3493
3494         * tramp-x86.c
3495         (mono_arch_nullify_class_init_trampoline): Add call to
3496         mono_breakpoint_clean_code() to make things work when running
3497         inside the debugger.
3498
3499         * tramp-amd64.c
3500         (mono_arch_nullify_class_init_trampoline): Add call to
3501         mono_breakpoint_clean_code() to make things work when running
3502         inside the debugger.
3503
3504 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3505
3506         * inssel-long.brg (reg): Fix 64 bit build.
3507
3508 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3509
3510         * mini.c, mini.h: Share static generic code by passing it an
3511         implicit argument pointing to the runtime generic context.
3512
3513         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3514         inssel-long32-mips.brg: New opcodes for calling shared static,
3515         which need to be passed the runtime generic context.
3516
3517         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3518         argument on the stack in the prologue if needed.  New function for
3519         finding the runtime generic context argument from the registers
3520         saved by the trampoline.
3521
3522         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3523         runtime generic context argument.
3524
3525         * tramp-amd64.c: Also restore the register used for the runtime
3526         generic context argument.
3527
3528         * mini-trampoline.c: Resolve shared static calls by consulting the
3529         runtime generic context via the new argument.
3530
3531         * generic-sharing.c: Add an argument to sharability-checking
3532         functions that specifies whether type variables should be treated
3533         as sharable type arguments.
3534
3535         * inssel-x86.brg: Removed a superfluous, buggy rule.
3536
3537         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3538         to switches.
3539
3540 2008-03-14  Martin Baulig  <martin@ximian.com>
3541
3542         * debug-debugger.c (main_thread_handler): Call
3543         mono_runtime_run_main() without sending any notifications.
3544
3545         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3546
3547 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3548
3549         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3550
3551 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3552
3553         * tramp-x86.c: Fixed register restore offsets in the trampoline
3554         code for ECX and EDX.
3555
3556 2008-03-12  Geoff Norton  <gnorton@novell.com>
3557
3558         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3559         different ucontext_t implementations.
3560         * exceptions-arm.c: Use the above defines to get exceptions working on 
3561         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3562         * mini-arm.c: Implement iPhone icache support (based on a patch by
3563         Luke Howard lukeh@padl.com)
3564
3565 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3566
3567         * mini.c: Enable generic sharing of calls to non-static
3568         non-interface non-generic non-value-type methods.
3569
3570         * mini-trampolines.c: Resolve calls from shared generic code.
3571
3572 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3573
3574         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3575
3576         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3577
3578 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3579
3580         * mini.c: some fixes for the AOT compiler.
3581
3582 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3583
3584         * cpu-amd64.md: Add clob:1 to some float opcodes.
3585
3586 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3587
3588         * mini.h: Added MiniVerifierMode enumeration.
3589
3590         * mini.c: Added mini_verifier_set_mode to control
3591         the usage of the new verifier.
3592
3593         * mini.c (mono_method): Integrated the new verifier.
3594
3595         * driver.c: Extended --security option with validil and
3596         verifiable options to activate the new verifier.
3597
3598 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3599
3600         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3601         optimization to ctors taking 0 or 2 arguments too.
3602
3603         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3604         a bit.
3605
3606         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3607
3608         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3609
3610 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3613         non-aot case as well.
3614
3615         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3616
3617         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3618         changes.
3619
3620         * aot-compiler.c (encode_patch): Ditto.
3621
3622         * mini.h (G_MININT32): Fix the definition of this.
3623
3624 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3625
3626         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3627
3628         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3629
3630 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3631
3632         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3633         methods returning vtypes in registers.
3634         (mono_arch_allocate_vars): Ditto.
3635
3636         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3637
3638         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3639
3640         * generics.cs: Add a test from the linear IR branch.
3641
3642         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3643
3644         * mini.c (inline_method): Cache failed inline attempts.
3645
3646 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3647
3648         * mini.c: For shared methods of generic classes put the location
3649         of "this" into the MonoGenericJitInfo.
3650
3651         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3652         register out of a MonoContext by register number.  Add the generic
3653         sharing context as an argument to mono_arch_find_this_argument().
3654
3655         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3656         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3657         for new arch function.
3658
3659         * mini-exception.c: Handle open exception clauses in shared
3660         generic code.
3661
3662         * mini-trampolines.c: Supply additional argument to
3663         mono_arch_find_this_argument().
3664
3665 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3666
3667         * Makefile.am (regtests): Run the bench.exe tests last.
3668
3669 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3670
3671         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3672         a bit.
3673
3674 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3675
3676         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3677         with MS.
3678
3679         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3680         
3681         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3682
3683         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3684         whose class has no cctor.
3685
3686         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3687
3688 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3689
3690         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3691         unverified.
3692
3693 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3694
3695         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3696         to be in sync with the code on the linear IR branch.
3697
3698         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3699
3700         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3701
3702 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3703
3704         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3705
3706         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3707
3708         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3709
3710         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3711
3712         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3713         
3714         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3715         body.
3716
3717 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3718
3719         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3720         OP_LOADR4_MEMBASE emission.
3721
3722         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3723         (mono_spillvar_offset_float): Ditto.
3724
3725         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3726
3727         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3728         emission.
3729
3730         * basic-long.cs: Add regression tests for them.
3731
3732         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3733         use.
3734         (mono_arch_allocate_vars): Fix representation of single-precision float
3735         argument.
3736         (mono_arch_output_basic_block): Ditto.
3737
3738         * inssel-mips.brg: Ditto, remove duplicate items.
3739
3740         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3741         arguments of tail calls as on other platforms.
3742         (mono_arch_output_basic_block): Handle tail calls.
3743
3744         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3745         register.
3746
3747         * objects.cs (test_5_pass_static_struct): Add test for it.
3748
3749         Contributed under MIT/X11 license.
3750
3751 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3752
3753         * Makefile.am: Use gmcs for compiling the regression tests.
3754
3755         * *.2.cs *.2.il: Rename to *.cs and *.il.
3756
3757 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3758
3759         * regalloc.h: Make the vassign array smaller.
3760
3761         * mini.c (mini_method_compile): Remove an unused field in cfg.
3762
3763         * mini-codegen.c: Add a bunch of micro optimizations.
3764
3765 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3766
3767         * regalloc.h: Remove some unused fields.
3768
3769 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3772
3773         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3774
3775 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3776
3777         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3778
3779         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3780         trampoline: Fetch an entry from the runtime generic context.  If
3781         it's NULL, jump to the actual trampoline to fill the runtime
3782         generic context.  Otherwise, return it.
3783
3784         * mini.c: Call the lazy fetch trampoline to get entries out of the
3785         runtime generic context.
3786
3787         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3788         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3789         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3790
3791 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3792
3793         * mini.c: Fetch data out of the extensible part of the runtime
3794         generic context instead of calling a helper function.
3795
3796         * generic-sharing.c: Some functions moved into
3797         metadata/generic-sharing.c.  Helper function for fetching other
3798         types now checks and asserts against extensible rgctx (just for
3799         debugging purposes - the helper function isn't called anymore
3800         unless for debugging).
3801
3802 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3803
3804         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3805         for tail calls up to the point that the tests in iltests.exe run. Also add a
3806         dummy CKFINITE implementation.
3807         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3808         needed for trampoline LMF frames.
3809
3810         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3811         trampoline LMF frames.
3812
3813 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3814
3815         * mini.c (inline_method): clean any pending loader error when inlining fail.
3816         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3817
3818 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3821
3822         * aot-runtime.c (decode_patch_info): Ditto.
3823
3824         * mini.c (mono_resolve_patch_target): Ditto.
3825         
3826         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3827         icall wrappers.
3828
3829         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3830         
3831         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3832         if it references an icall address.
3833
3834 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3835
3836         * cpu-s390x.md: Remove some more unused opcodes.
3837         
3838         * cpu-s390x.md: Remove some unused opcodes.
3839
3840         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3841         mono_op_imm_to_op ().
3842
3843         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3844         instead of a switch statement.
3845         
3846         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3847         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3848
3849         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3850         
3851         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3852
3853         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3854         -1.
3855
3856 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3857
3858         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3859         opened. Fixes #362607.
3860
3861         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3862
3863         * iltests.il.in: Add a test for static methods in interfaces.
3864
3865 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3866
3867         * genmdesc.c (build_table): Fix a crash on older glib versions.
3868
3869         * cpu-sparc.md: Remove some unused opcodes.
3870         
3871         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3872         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3873
3874         * cpu-amd64.md: Remove some unused opcodes.
3875
3876         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3877         like the other opcodes.
3878
3879 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3880
3881         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3882
3883         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3884
3885         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3886         variables 'cfg' instead of 'm' for consistency.
3887
3888         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3889
3890         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3891         argument holding the vtype return address, to avoid the ambigious use of
3892         cfg->ret for this purpose.
3893
3894         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3895
3896         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3897         
3898         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3899         new mono_print_ins () function which only takes one argument.
3900
3901 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3902
3903         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3904         macro arguments.
3905
3906 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3907
3908         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3909
3910         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3911
3912         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3913         opcodes and other small changes.
3914
3915         * mini-ops.h: Add some new opcodes from the linear IR branch.
3916
3917         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3918
3919         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3920         opcodes, use the REG_MEMBASE opcodes instead.
3921         
3922         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3923         opcodes, use the REG_MEMBASE opcodes instead.
3924         
3925         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3926         linear IR branch.
3927
3928         * mini.c (mono_op_imm_to_op): New helper function.
3929
3930         * mini-ops.h: Add some opcodes from linear IR branch.
3931
3932 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3933
3934         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3935         <tsv@solvo.ru>.
3936
3937 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3938
3939         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3940         OP_ICONV_TO_R4/R8.
3941
3942         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3943
3944 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3945
3946         * aot-compiler.c (emit_method_code): Add an assert.
3947
3948         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3949         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3950         methods.
3951
3952 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3953
3954         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3955         some load/store opcodes so they are consistent. 
3956         (mono_arch_emit_prolog): Simplify some code.
3957
3958         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3959
3960         * objects.cs: Add tests for large argument offsets on ARM.
3961
3962         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3963         stack offsets. Fixes #359651.
3964
3965         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3966
3967         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3968
3969         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3970
3971         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3972
3973         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3974
3975         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3976         rid of CEE_CONV_R_UN.
3977
3978         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3979
3980 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3981
3982         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3983
3984         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3985
3986         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3987
3988         * cpu-amd64.md: Remove some unused opcodes.
3989
3990         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3991
3992         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3993
3994         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3995         arch specific functions for its parts. Call the peephole pass after local
3996         regalloc so the prolog can compute a more accurate max_offset.
3997         
3998         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3999         the corresponding OP_I/OP_L opcodes.
4000
4001         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4002
4003         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4004
4005 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4006
4007         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4008         as they are handled in mini.c.
4009
4010         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4011         
4012         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4013         case since it is handled in mini.c.
4014
4015         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4016
4017         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4018
4019         * *.c: Use the new opcodes in the IR and back end code.
4020
4021         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4022
4023         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4024
4025 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4026
4027         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4028         an assert because it has a race condition.
4029
4030 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4031
4032         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4033
4034         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4035
4036         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4037
4038         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4039         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4040
4041 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4042
4043         * cpu-amd64.md (move): Correct the maximum size of move.
4044
4045 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4046
4047         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4048         the generic class init trampoline to return quickly if the class
4049         is already inited.
4050
4051 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4052
4053         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4054         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4055
4056 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4057
4058         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4059         branch.
4060
4061 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4062
4063         * objects.cs: Add some soft-float tests.
4064
4065         * mini.c: Fix a couple more soft-float issues.
4066
4067         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4068
4069         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4070         avoid a REX prefix.
4071
4072 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4073
4074         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4075         exception happens while compiling a virtual method.
4076
4077 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4078
4079         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4080         
4081         * mini-sparc.c: Fix build.
4082
4083         * mini-sparc.c (get_call_info): Add support for generic sharing.
4084
4085         * mini-exceptions.c: Add a FIXME.
4086
4087 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4088
4089         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4090         altstack handling code.
4091
4092         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4093         
4094         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4095
4096         * mini-s390.c: Add support for generic sharing.
4097
4098         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4099         Fix CAS on s390.
4100         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4101
4102         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4103
4104         * mini-s390x.c: Add support for generic sharing.
4105         
4106         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4107         Fix CAS on ia64.
4108         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4109
4110         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4111         can be used since it takes a 16 bit signed immediate.
4112
4113         * inssel-s390x.brg: Fix OP_SETRET.
4114
4115         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4116
4117         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4118
4119         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4120
4121         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4122
4123         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4124         in one place.
4125
4126         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4127         stuff.
4128
4129         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4130         of the unused mono_arch_patch_delegate_trampoline stuff.
4131
4132 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4133
4134         * basic-long.cs: Move the fp related tests to basic-float.cs.
4135
4136         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4137
4138         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4139
4140         * basic-calls.cs: Add a test for proper float argument passing.
4141
4142         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4143         if the context corresponds to an exception received through a signal.
4144
4145         * exceptions.cs: Add a test for nullref handling at the start of a try
4146         clause.
4147
4148         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4149
4150         * jit-icalls.c (mono_break): New JIT icall.
4151
4152         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4153
4154         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4155
4156 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * cpu-*.md: Get rid of unused opcodes.
4159
4160         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4161
4162         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4163         by all platforms.
4164
4165         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4166         define.
4167
4168         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4169         the arch independent trampoline code in mini-trampolines.c.
4170
4171         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4172
4173         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4174
4175         * mini-s390.h: Remove an unused define.
4176         
4177         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4178         the arch independent trampoline code in mini-trampolines.c.
4179
4180         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4181
4182 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4183
4184         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4185
4186         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4187
4188         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4189
4190         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4191
4192         * cpu-amd64.md: Use smaller sizes for int opcodes.
4193
4194         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4195
4196         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4197         objects.cs.
4198
4199         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4200         debugging.
4201
4202         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4203         instead of though a pointer to save an indirection when accessing elements of
4204         the array.
4205
4206         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4207         some typos.
4208         (NOT_IMPLEMENTED): New helper macro.
4209         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4210         of a bb.
4211
4212         * *.c: Use the new helper macro.
4213
4214 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4215
4216         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4217
4218 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4219
4220         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4221         stack slots.
4222
4223 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4224
4225         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4226         profiling is enabled.
4227         
4228         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4229         the end.
4230         (mono_arch_emit_prolog): Add more first bblock optimizations.
4231
4232         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4233         in order if possible.
4234         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4235         bblock, since the arguments are still in their original registers.
4236
4237         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4238
4239 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4240
4241         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4242         as well.
4243
4244         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4245         offset 0.
4246
4247         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4248
4249         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4250         process async exceptions received while in unmanaged code.
4251
4252         * mini.c (mini_init): Install a callback with the runtime which will be called
4253         when a thread receives an async exception while in unmanaged code.
4254
4255         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4256
4257         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4258
4259 2008-01-16  Wade Berrier  <wberrier@novell.com>
4260
4261         * cpu-g4.md:
4262         * cpu-arm.md:
4263         * cpu-s390x.md:
4264         fix build
4265
4266 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4267
4268         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4269         compilation with sun cc.
4270
4271         * cpu-*.md: Fix the build.
4272
4273         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4274
4275         * mini-amd64.h: Add some comments to the MonoLMF structure.
4276
4277         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4278         
4279         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4280         in the LMF structure if possible. This saves two instructions in the
4281         managed->native wrappers.
4282
4283         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4284
4285 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4286
4287         * generic-sharing.c: New type argument lookup code which uses the
4288         runtime generic context template.
4289
4290 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4291
4292         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4293
4294         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4295         (mono_arch_output_basic_block): Fix localloc implementation.
4296
4297         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4298
4299         * mini-ia64.c (peephole_pass): Fix ia64 build.
4300
4301         * mini-amd64.c (peephole_pass): Fix a warning.
4302         
4303         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4304         at a constant offset from sp/fp.
4305
4306         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4307         instead of obtaining it from *lmf in the managed method case.
4308
4309 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4310
4311         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4312
4313 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4314
4315         * mini.h (MonoInstList): New type.
4316         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4317         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4318         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4319         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4320         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4321         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4322         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4323         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4324         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4325         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4326         MONO_INST_LIST_FOR_EACH_ENTRY,
4327         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4328         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4329         mono_inst_list_first, mono_inst_list_last,
4330         mono_inst_list_next, mono_inst_list_prev): New instruction
4331         list handling interfaces.
4332         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4333         list head 'ins_list'.
4334         (MonoInst): Replace next pointer with list head 'node'.
4335         (MonoCallInst): Make 'out_args' a MonoInstList.
4336         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4337         (MonoCompile): Delete reverse_inst_list and
4338         reverse_inst_list_len.
4339         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4340         mono_arch_lowering_pass, mono_arch_local_regalloc,
4341         mono_arch_output_basic_block, mono_arch_emit_prolog):
4342         Convert to new instruction lists.
4343         (insert_after_ins): Delete.
4344         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4345         instruction lists.
4346         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4347         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4348         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4349         mono_emulate_opcode, mono_emit_load_got_addr,
4350         inline_method, mono_method_to_ir, mono_print_bb_code,
4351         print_dfn, decompose_pass, nullify_basic_block,
4352         replace_out_block_in_code, remove_block_if_useless,
4353         merge_basic_blocks, move_basic_block_to_end,
4354         try_unsigned_compare, optimize_branches, mono_print_code,
4355         mini_select_instructions, remove_critical_edges): Likewise.
4356         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4357         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4358         mono_arch_output_basic_block, mono_arch_emit_prolog):
4359         Likewise.
4360         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4361         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4362         mono_arch_output_basic_block): Likewise.
4363         (inst_list_prepend, insert_after_ins): Delete.
4364         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4365         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4366         instruction lists.
4367         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4368         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4369         mono_arch_emit_prolog): Likewise.
4370         * cfold.c (mono_constant_fold): Likewise.
4371         * liveness.c (visit_bb, mono_analyze_liveness,
4372         optimize_initlocals): Likewise.
4373         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4374         * graph.c (mono_draw_code_cfg): Likewise.
4375         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4376         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4377         mono_ssa_cprop): Likewise.
4378         * abcremoval (get_relations_from_previous_bb, process_block):
4379         Likewise.
4380         * local-propagation (mono_cprop_invalidate_values,
4381         mono_local_cprop_bb): Likewise.
4382         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4383         peephole_pass, mono_arch_output_basic_block,
4384         mono_arch_emit_prolog): Likewise.
4385         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4386         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4387         mono_arch_emit_prolog): Likewise.
4388         (insert_after_ins): Delete.
4389         * aliasing.c (print_code_with_aliasing_information,
4390         mono_build_aliasing_information, mono_aliasing_deadce):
4391         Convert to new instruction lists.
4392         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4393         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4394         mono_arch_local_regalloc, mono_arch_output_basic_block):
4395         Likewise.
4396         (insert_after_ins): Delete.
4397         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4398         peephole_pass, mono_arch_output_basic_block): Convert to
4399         new instruction lists.
4400         * mini-codegen (InstList, inst_list_prepend,
4401         insert_after_ins): Delete.
4402         (insert_before_ins, get_register_force_spilling,
4403         get_register_spilling, free_up_ireg, free_up_reg,
4404         create_copy_ins, create_spilled_store, alloc_int_reg,
4405         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4406         to new instruction lists.
4407         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4408         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4409         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4410         (insert_after_ins): Delete.
4411         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4412         mono_arch_local_regalloc, mono_arch_output_basic_block,
4413         mono_arch_call_opcode): Convert to new instruction lists.
4414         (insert_after_ins): Delete.
4415         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4416         peephole_pass, mono_arch_output_basic_block,
4417         mono_arch_emit_prolog): Convert to new instruction lists.
4418
4419 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4422
4423         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4424         Fixes #353182.
4425
4426         * Makefile.am (version.h): Make this work with non-bash shells.
4427
4428 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4429
4430         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4431
4432 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4433
4434         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4435         the InitializeArray optimization.
4436
4437 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4438
4439         * mini.c driver.c: Don't include os/gc_wrapper.h.
4440
4441 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4442
4443         * mini.c (print_jit_stats): Print GC statistics if available.
4444
4445 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4448
4449 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4450
4451         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4452
4453 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4454
4455         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4456         
4457         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4458
4459         * driver.c (mono_main): Ditto.
4460
4461 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4462
4463         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4464
4465         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4466         in the vtable can't be encoded.
4467         (compile_method): Ditto.
4468
4469 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4470
4471         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4472         defined.
4473
4474         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4475         lmf->rbp.
4476
4477         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4478         the top LMF entry belongs to the current method.
4479
4480         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4481
4482 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4483
4484         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4485         
4486         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4487
4488         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4489
4490         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4491
4492         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4493
4494         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4495         implementation.
4496
4497         * basic-float.cs: Add an ulong->double cast test.
4498
4499 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * mini.c (mono_method_to_ir): Fix a warning.
4502
4503 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * mini-ops.h: Add OP_SWITCH.
4506
4507         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4508         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4509
4510 2007-12-11  Geoff Norton  <gnorton@novell.com>
4511
4512         * mini-s390x.c: Minor change to the MAX() define to allow
4513         it to compile with other gcc versions.
4514
4515 2007-12-11  Geoff Norton  <gnorton@novell.com>
4516
4517         * cpu-s390x.md:
4518         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4519
4520 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4521
4522         exceptions-arm.c (mono_arch_get_restore_context): Restore
4523         the frame pointer.
4524
4525         exceptions-arm.c (throw_exception): Save the frame pointer.
4526         This is a partial fix for #323747. Only the client side is
4527         fixed.
4528
4529 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4530
4531         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4532         was using an unrelated variable to log the class which
4533         needed the cctor to be called. This was crashing on arm.
4534
4535 2007-12-09  Robert Jordan  <robertj@gmx.net>
4536
4537         * mini-x86.c (mono_arch_emit_epilog):
4538         Consider all kinds of 64-bit types. Fixes #323114.
4539
4540 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4541
4542         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4543
4544 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4547
4548 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4549
4550         * mini.c: run type ctor before allocating an object, not only
4551         when running it's constructor method (fixes at least part of bug #342507).
4552
4553 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4554         
4555         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4556         
4557         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4558         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4559         function.
4560
4561         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4562         mono_generic_class_init_trampoline () the same as it is done with the other
4563         trampolines.
4564
4565         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4566         aot-runtime.c aot-compiler.c: Implement AOT support.    
4567
4568 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4569
4570         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4571         build for archs which don't have the vtable trampoline defined
4572         yet.
4573
4574 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4575
4576         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4577
4578         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4579
4580         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4581
4582         * tramp-<ARCH>.c: Use the new helper function.
4583
4584 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4585
4586         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4587         trampoline call, which takes a vtable argument.
4588
4589         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4590         OP_TRAMPCALL_VTABLEs like other calls.
4591
4592         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4593         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4594         call.  Implemented a support function which fetches the vtable
4595         from a register set.
4596
4597         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4598         Implemented a generic class init trampoline, using the
4599         OP_TRAMPCALL_VTABLE opcode.
4600
4601         * mini.c: Implemented static field access when sharing generic
4602         code.  This implies initing the class using the new
4603         OP_TRAMPCALL_VTABLE call.
4604
4605 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4606
4607         * mini.c: Don't compile methods with sharing enabled if their
4608         classes are disabled for sharing.
4609
4610 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4611
4612         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4613         opcodes. Fixes #346563.
4614
4615         * objects.cs: Add a new test.
4616
4617         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4618
4619         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4620         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4621
4622 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4623
4624         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4625
4626 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4627
4628         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4629         code stream.
4630
4631 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4632
4633         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4634
4635         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4636         optimization in the AOT case.
4637         
4638 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4639
4640         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4641         
4642         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4643
4644         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4645
4646         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4647
4648         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4649         is created by the inlined delegate ctor.
4650
4651         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4652
4653         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4654
4655 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4656
4657         * cpu-x86.md: Fix the length of ckfinite.
4658
4659 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4660
4661         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4662         
4663         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4664         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4665
4666         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4667
4668         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4669         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4670
4671 2007-11-28  Martin Baulig  <martin@ximian.com>
4672
4673         * mini-x86.c
4674         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4675         after creating the trampoline.
4676
4677 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4678
4679         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4680
4681         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4682         the same version.
4683
4684         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4685         instead of the calling method to help AOT.
4686
4687         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4688
4689 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4690
4691         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4692         is defined.
4693
4694 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4695
4696         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4697         
4698         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4699         (encode_method_ref): No need to handle generic method definitions specially.
4700
4701         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4702
4703         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4704         decode_klass_info.
4705
4706         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4707         encode_klass_info.
4708         (compile_method): Enable generic sharing.
4709
4710 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4711
4712         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4713         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4714
4715         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4716         generic code.
4717
4718         * mini-trampolines.c: Fix a warning.
4719
4720         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4721         NEW_PCONST.
4722         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4723         (generic_class_is_reference_type): Remove unused function.
4724
4725         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4726         in the generic vtable trampoline case.
4727
4728         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4729         
4730         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4731         return an AOT method based on a vtable slot.
4732
4733         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4734
4735         * mini.c (mini_get_vtable_trampoline): Export this.
4736
4737 2007-11-22  Martin Baulig  <martin@ximian.com>
4738
4739         * debug-debugger.h
4740         (MonoDebuggerInfo): Move `debugger_version' up.
4741
4742 2007-11-22  Martin Baulig  <martin@ximian.com>
4743
4744         * mini-amd64.c
4745         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4746
4747         * mini-trampolines.c
4748         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4749         after compiling the method.
4750
4751 2007-11-20  Martin Baulig  <martin@ximian.com>
4752
4753         * debug-mini.c
4754         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4755         (mono_debugger_remove_breakpoint): Likewise.
4756         (mono_debugger_check_breakpoints): Likewise.
4757
4758         * debug-debugger.c: Implement the new breakpoint interface here.
4759
4760 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4761
4762         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4763         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4764
4765         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4766
4767 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4768
4769         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4770
4771         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4772         mini.c.
4773
4774         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4775         mini.c.
4776
4777         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4778         returning a vtype in a register.
4779
4780         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4781         here from the arch specific code.
4782
4783         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4784         mini.c.
4785
4786         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4787         (mono_arch_emit_prolog): Increment maximum prolog size.
4788
4789         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4790         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4791
4792         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4793         MonoGenericSharingContext.
4794
4795         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4796         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4797
4798 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4799
4800         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4801         which extract fields out of the runtime generic context.  Full
4802         sharing of the NEWARR opcode.
4803
4804 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4805
4806         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4807         --enable-minimal=ssa.
4808
4809 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4810
4811         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4812         mono_marshal_get_delegate_invoke () signature change.
4813
4814 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4815
4816         * mini.c: Removed the shared context in favor of the generic
4817         sharing context.  Allocate the MonoJitInfo structure with room for
4818         the generic sharing context if it's needed.
4819
4820         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4821         domain-internals.h now.
4822
4823         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4824
4825         * generic-sharing.c: Several changes for working without a shared
4826         context and instead operating on open types instead.
4827
4828 2007-11-12  David S. Miller  <davem@davemloft.net>
4829
4830        * inssel-sparc.brg: Fix double instruction emit.
4831
4832 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4835         Get/Set/Address methods.
4836         
4837         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4838         mono_marshal_get_delegate_invoke signature change.
4839
4840 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4841
4842         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4843         This can happens with dynamic methods. Fixes the other bug in #322722.
4844
4845 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4846
4847         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4848         BX call sequence.
4849
4850         * mini-arm.c (arm_patch): Implement patching of BX call
4851         sequence. Fixes one of the bugs in #322722.
4852
4853 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4854
4855        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4856        under Linux.  We only need to flush every 32-byte cache line.    
4857
4858 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4859
4860         * mini.c:
4861         move_basic_block_to_end: Add branches when needed, eventually creating
4862         a new BB.
4863         optimize_branches: added a parameter that tells if it's ok to create
4864         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4865         and avoid calling move_basic_block_to_end when it's not ok.
4866         Fixes bug 318677.
4867
4868 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4869
4870         * mini.c: Abort inlining call to InitializeArray if something
4871         looks wrong.  Let the icall handle it, which now has proper safety
4872         checks.
4873
4874 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4875
4876         * mini.c (mono_spill_call): add support for soft-float.
4877
4878         * mini.c (mono_method_to_ir): add support for soft-float
4879         to inlined functions that return float.
4880
4881         * mini.c (mono_method_to_ir): add support for soft-float
4882         to cee_stsfld opcode on float fields.
4883
4884 2007-11-05  Geoff Norton  <gnorton@novell.com>
4885
4886         * mini-x86.h: Fix the structure access for X86 Leopard.
4887
4888
4889 2007-11-05  Martin Baulig  <martin@ximian.com>
4890
4891         * mini-trampolines.c
4892         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4893         after compiling the method to notify the debugger.
4894
4895 2007-11-05  Martin Baulig  <martin@ximian.com>
4896
4897         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4898
4899 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4900
4901         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4902         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4903
4904 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4907         native-to-managed wrappers.
4908         
4909 2007-11-01  Geoff Norton  <gnorton@novell.com>
4910
4911         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4912         members.
4913
4914 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4915
4916         * mini.c, mini-x86.c: when getting back from unmanaged code
4917         to managed via a marshaled delegate we also need to set the
4918         right domain.
4919
4920 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4921
4922         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4923         for amd64.
4924
4925 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4926
4927         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4928         let the debugger or other external agents to tell the JIT when
4929         a sw breakpoint has been inserted in the code that the JIT needs
4930         to be able to inspect.
4931
4932 2007-10-31  Martin Baulig  <martin@ximian.com>
4933
4934         * debug-debugger.h
4935         (MonoDebuggerInfo): Remove `runtime_class_init'.
4936
4937 2007-10-30  Martin Baulig  <martin@ximian.com>
4938
4939         * debug-mini.h
4940         (mono_debugger_thread_created): Added `MonoThread *' argument.
4941         (mono_debugger_extended_notification): New public method.
4942         (mono_debugger_trampoline_compiled): New public method.
4943
4944         * debug-mini.c
4945         (MonoDebuggerThreadInfo): Added `thread' and
4946         `extended_notifications' fields.
4947
4948         * debug-debugger.c
4949         (debugger_executable_code_buffer): New static variable.
4950
4951         * debug-debugger.h
4952         (MonoDebuggerInfo): Added `executable_code_buffer',
4953         `executable_code_buffer_size', `breakpoint_info_area',
4954         `breakpoint_table' and `breakpoint_table_size'.
4955
4956 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4957
4958         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4959         that IP  either is an unused value or the vtable pointer. IMT 
4960         calls use vtable + offset now. Reduced by almost half the size
4961         of IMT entries.
4962
4963 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4964
4965         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4966         defines to access param registers. Replace long usage with
4967         gsize as sizeof(long) != sizeof(void*) on Win64.
4968
4969         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4970         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4971         instead of non-existant _GetAddressOfReturnAddress.
4972
4973         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4974         param registers. Save/restore %rdi and %rsi in MonoLMF.
4975
4976         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4977         param registers. Modify (throw_exception) signature to take 
4978         %rdi and %rsi on Win64. 
4979
4980         Code is contributed under MIT/X11 license.
4981
4982 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4983
4984         * helpers.c: unlink debugging output files.
4985
4986 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4987
4988         * mini.c: Move mono_create_ftnptr () to object.c.
4989
4990 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4991
4992         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4993         optional. This function can now be used to disassemble code generated
4994         outside the JIT such as trampolines and IMT thunks.
4995
4996         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4997
4998         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4999         vtable pointer from a ldr instruction.
5000
5001         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5002         new IMT call sequence.
5003
5004         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5005         call sequence for interface invocations.
5006
5007         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5008         for imt support. This function is empty since IMT on ARM requires no
5009         special handling on the IR side.
5010
5011         * mini-arm.c (mono_arch_find_imt_method): added, required for
5012         imt support.
5013
5014         * mini-arm.c (mono_arch_find_this_argument): added, required
5015         for imt support.
5016
5017         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5018         a ldr instruction to load a value stored in the code stream.
5019
5020         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5021         for imt support.
5022
5023
5024 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5025
5026         * mini.c (mini_init): Install the jump trampoline callback.
5027
5028 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5029
5030         * mini-trampolines.c: handle synchronized methods with the common
5031         vtable trampoline (bug #335601).
5032
5033 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5034
5035         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5036
5037         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5038         64 bit platforms.
5039
5040         * mini-ia64.h mini-ia64.c: Add support for IMT.
5041
5042         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5043         prolog. Fixes #331958.
5044
5045 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5046
5047         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5048
5049 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5050
5051         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5052         trampoline.
5053
5054 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5055
5056         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5057         trampoline.
5058
5059 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5060
5061         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5062         trampoline.
5063
5064 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5065
5066         * mini-trampolines.c: changed the magic rampoline to understand
5067         the common vtable trampoline method: the method to invoke is
5068         determined by the vtable displacement of the call.
5069
5070 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5071
5072         * mini.c, mini.h: register the common vtable trampoline if the
5073         architecture supports it.
5074
5075 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5076
5077         * cpu-amd64.md: use the correct max length for tls_get.
5078
5079 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5080
5081         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5082         CEE_STELEM_ANY. Fixes #333696.
5083
5084 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5085
5086         * exceptions-x86.c: provide more graceful handling of the case where
5087         we followed a bogus function pointer from managed code (bug #332866).
5088
5089 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5090
5091         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5092         replaces the generic_shared flag and will carry more information
5093         in the future.
5094
5095         * generic-sharing.c: Added mini_type_stack_size() which allows
5096         allows open types if given a generic sharing context.
5097         mini_get_basic_type_from_generic() takes a
5098         MonoGenericSharingContext* instead of a MonoCompile* now.
5099
5100         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5101         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5102         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5103         changes above.  Just passing arguments through to the right
5104         places.
5105
5106 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5107
5108         * mini-arm.c: unify the call emission to emit_code_seq().
5109
5110 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5111
5112         * tramp-arm.c: reduced the trampoline size.
5113
5114 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5115
5116         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5117         variable handling out of arch-specific code.
5118
5119 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5120
5121         * mini-arm.c: implemented fast delegate dispatch.
5122
5123 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5124
5125         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5126         that fp elimination is turned off if the space required by locals is too
5127         big. Fixes #331958.
5128
5129 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5130
5131         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5132         ARM to the new style trampoline.
5133
5134 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5135
5136         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5137
5138         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5139
5140 2007-10-09  Martin Baulig  <martin@ximian.com>
5141
5142         * debug-debugger.h
5143         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5144         `field_info_offset_offset'.     
5145
5146 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5147
5148         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5149         removed more internal usage of the r11 register and made it available
5150         to the register allocator.
5151
5152 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5153
5154         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5155         when sharing generics and treat type variables as references.
5156
5157 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5158
5159         * mini-ppc.c: started removing the internal uses of register r11
5160         to eventually allow the register allocator to manage it as an
5161         additional available register.
5162
5163 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5164
5165         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5166
5167 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5168
5169         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5170         specific trampolines as they are not performance critical as a jump
5171         target (maybe align as before only for AOT code?). This saves about
5172         200 KB of native code on x86 for monodevelop startup.
5173
5174 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5175
5176         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5177         monodevelop startup.
5178
5179 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5182
5183         * mini-sparc.h mini-sparc.c: Implement IMT support.
5184
5185         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5186         its smaller and doesn't clobber sparc_g1.
5187
5188         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5189
5190 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5191
5192         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5193
5194 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5195
5196         * mini-ppc.c: implemented fast delegate invocation.
5197
5198 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5199
5200         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5201
5202 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5203
5204         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5205         code to the new style trampoline in preparation for IMT support.
5206
5207 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5208
5209         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5210         systems already. This also reduces the specific trampiline sizes and
5211         prepares for the use of r12 as the IMT identifier register.
5212
5213 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5214
5215         * mini-mips.h: endianess fix (simplified from a patch by
5216         Thomas Kunze <thommy@tabao.de>, bug #323737).
5217
5218 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5219
5220         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5221         to access ucontext fields and enable netbsd support
5222         (partially from Magnus Henoch <mange@freemail.hu>).
5223
5224 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5225
5226         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5227         use the preprocessor from the CPP env var if it is set.
5228
5229 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5230
5231         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5232         code, before interface_offset gets used.
5233
5234 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5235
5236         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5237         mono_class_setup_vtable () before accessing klass->vtable.
5238
5239 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5240
5241         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5242         hackish.
5243
5244 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5245
5246         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5247         IMT slots (this saves hundreds of KB of memory in programs like
5248         IronPython and Monodevelop).
5249
5250 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5251
5252         * mini.c: print the delegate counter.
5253
5254 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5255
5256         * mini-x86.c: make it easier to enable the debugging code for IMT
5257         slots.
5258
5259 2007-09-28  Martin Baulig  <martin@ximian.com>
5260
5261         * debug-debugger.h
5262         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5263         `mono_method_klass_offset' and `mono_method_token_offset'.
5264
5265 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5266
5267         * mini.c: First generics sharing implementation.  Can only share
5268         in very simple cases.  If sharing doesn't work it falls back to
5269         dedicated compilation.
5270
5271         * mini.h: Flag in MonoCompile to specify whether generic
5272         compilation is shared.  Flags enum for marking which generic inst
5273         of a context is used.  Prototypes for helper functions.
5274
5275         * generic-sharing.c: Helper functions for generic method sharing.
5276
5277         * optflags-def.h: Optimization flag (gshared) for enabling generic
5278         method sharing added.
5279
5280         * Makefile.am: generic-sharing.c added.
5281
5282 2007-09-19 Daniel Nauck <dna@mono-project.de>
5283
5284         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5285
5286 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5287         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5288         fixes bug 325507.
5289
5290 2007-09-19  Martin Baulig  <martin@ximian.com>
5291
5292         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5293         mono_debug_cleanup() is now part of mono_cleanup().
5294
5295 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * driver.c (mono_main): Fix a warning.
5298
5299 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5300
5301         * aot-compiler.c: Optimize various parts when processing large assemblies.
5302         Fixes ##325568.
5303
5304         * mini.c (mono_patch_info_hash): Improve hash function.
5305
5306 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5307
5308         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5309         
5310         Code is contributed under MIT/X11 license.
5311
5312 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5313
5314         * mini.c (mini_init): Fix a leak.
5315
5316         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5317
5318 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5319
5320         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5321
5322 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5323
5324         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5325
5326 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5327
5328         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5329         variance tests.
5330
5331         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5332
5333         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5334
5335         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5336
5337         * aot-runtime.c (decode_patch_info): Ditto.
5338
5339 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5340
5341         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5342         static case. Cache delegates in architecture specific code, 
5343         based on number of parameters.
5344         
5345         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5346         in architecture specific code, based on number of parameters.
5347         
5348         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5349         caching happen in architecture specific code now.
5350         
5351         Code is contributed under MIT/X11 license.
5352
5353 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5354
5355         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5356         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5357         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5358
5359         Code is contributed under MIT/X11 license.
5360
5361 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5362         * mini.c: (mono_thread_abort) Fixed bug #82416.
5363
5364 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5365
5366         * mini.: hook the new managed GC allocation feature into the JIT.
5367
5368 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5369
5370         * mini.c: implementation for the new runtime tls opcode.
5371
5372 2007-09-11  Martin Baulig  <martin@ximian.com>
5373
5374         * debug-debugger.h
5375         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5376         `mono_method_inflated_offset'.
5377
5378 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5381         async exceptions into a method.
5382
5383         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5384         purpose of testing whenever the unwinder works at every instruction.
5385
5386 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5387
5388         * mini.c: check accessibility of method used in ldftn (fixes
5389         bug #82635).
5390
5391 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5392
5393         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5394
5395         * inssel.brg: Fix a warning.
5396
5397 2007-09-03  Martin Baulig  <martin@ximian.com>
5398
5399         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5400         now takes the `main_method' as argument.
5401
5402 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5403
5404         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5405
5406 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5407
5408         * driver.c: include the cil-coff.h header on Windows.
5409         
5410         Code is contributed under MIT/X11 license.
5411
5412 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5413
5414         * mini.c, driver.c: don't include the cil-coff.h header.
5415
5416 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5417
5418         * mini.c: flag places that needs fixes fo soft-float support.
5419
5420 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5421
5422         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5423         endian systems (partially from Dean Jenkins, bug #81924).
5424
5425 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5426
5427         * mini.c (check_linkdemand): Remove embedded reference object in
5428         call to LinkDemandSecurityException.
5429         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5430         with an IntPtr instead of a reference object.
5431
5432 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5433
5434         * mini.c (handle_initobj): Handle alignment properly.
5435
5436         * inssel.brg (mini_emit_memset): Ditto. 
5437
5438         * inssel.brg (mini_emit_memcpy): Ditto. 
5439
5440         * inssel-sparc.brg: Ditto.              
5441
5442         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5443
5444 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5445
5446         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5447         exceptions raised in unmanaged code. Fixes part of #82594.
5448
5449 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5450
5451         * mini.c (mono_method_to_ir), declsec.c
5452         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5453
5454 2007-08-22  Martin Baulig  <martin@ximian.com>
5455
5456         * debug-mini.h
5457         (MonoDebuggerThreadInfo): New typedef.
5458         (mono_debugger_thread_table): New global variable.
5459         (mono_debugger_thread_created): New public function.
5460         (mono_debugger_thread_cleanup): New public function.
5461
5462         * debug-debugger.h
5463         (MonoDebuggerInfo):
5464         - removed `get_current_thread' and `lookup_assembly'.
5465         - removed `data_table'.
5466         - added `thread_table'.
5467
5468         * mini.c
5469         (mono_thread_start_cb): Call mono_debugger_thread_created().
5470         (mono_thread_attach_cb): Likewise.
5471         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5472         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5473         initial domain.
5474
5475         * driver.c (mono_main): Move mono_debug_init() up, before calling
5476         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5477
5478 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5479
5480         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5481         together when passing several arguments of type double (gives a small
5482         speedup and saves a few bytes of generated code).
5483
5484 2007-08-20  Jb Evain  <jbevain@novell.com>
5485
5486         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5487
5488 2007-08-20  Jb Evain  <jbevain@novell.com>
5489
5490         * mini.c (mono_method_to_ir): throw MethodAccessException
5491         and FieldAccessException instead of InvalidProgramException.
5492
5493 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5494
5495         * mini.c: CoreCLR security checks.
5496
5497         * mini.h: Removed MonoSecurityMode (moved to
5498         metadata/security-manager.h) and mono_security_mode global var
5499         (replaced by set/get functions in security-manager.h).
5500
5501         * driver.c: Added "core-clr-test" security mode for testing.  Used
5502         set-function for setting security mode.
5503
5504 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5505
5506         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5507         the new jit_info_table.
5508
5509         * driver.c: Test code for the new jit_info_table (enabled by the
5510         define MONO_JIT_INFO_TABLE_TEST).
5511
5512 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5513
5514         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5515         detection of call <REG> instruction sequence. Fixes build on freebsd.
5516
5517 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5518
5519         * mini-exceptions.c: Fix a warning.
5520
5521 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5522
5523         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5524         stack overflow handling code on amd64 too.
5525
5526         * mini-exceptions.c (mono_setup_altstack): Make this use 
5527         mono_thread_get_stack_bounds ().
5528
5529         * mini-x86.h: Disable sigaltstack on solaris x86.
5530
5531 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5532
5533         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5534
5535 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5536
5537         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5538
5539 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5540
5541         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5542
5543         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5544
5545 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5546
5547         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5548         due to alignment.
5549
5550 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5551
5552         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5553         to be emitted (bug #82281).
5554
5555 2007-08-01  Martin Baulig  <martin@ximian.com>
5556
5557         Merged the `debugger-dublin' branch.
5558
5559         * debug-debugger.h (MonoDebuggerInfo):
5560         Removed the `old_*' compatibility entries.
5561         Added `debugger_version' and `data_table'.
5562         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5563         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5564
5565         * debug-mini.c
5566         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5567         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5568         instead of a `gconstpointer'.
5569         (mono_debugger_insert_method_breakpoint): Return a
5570         `MonoDebugMethodAddressList *'.
5571
5572 2007-06-28  Martin Baulig  <martin@ximian.com>
5573
5574         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5575
5576 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5577
5578         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5579         __builtin_frame_address () since it is broken on older gcc versions.
5580
5581 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5582
5583         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5584         on the stack overflow handling and made the managed stack overflows
5585         catchable in most cases using soft guard pages.
5586         * exceptions-x86.c: added code to restore the protection in the soft
5587         guard pages at the end of exception handling.
5588
5589 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5592
5593 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5594
5595         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5596         exception handling.
5597
5598 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5599
5600         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5601         signal handling support until it has been ported to the new mechanism.
5602         * mini.c: fixed stack overflow detection and use the new
5603         architecture code  to handle signals on the altstack.
5604
5605 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5606
5607         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5608         stack overflows on the alt stack.
5609
5610 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5611
5612         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5613         stack overflows on the alt stack.
5614
5615 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5616
5617         * exceptions-ppc.c: cleanup preparing for altstack support.
5618
5619 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5620
5621         * exceptions-arm.c: cleanup preparing for altstack support.
5622
5623 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5624
5625         * mini.c (print_jit_stats): Output hazard pointer stats.
5626
5627 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5628
5629         * driver.c, mini.c: Replaced security mode flags with a single
5630         enum variable.
5631
5632 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5633
5634         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5635
5636 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5637
5638         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5639         (which doesn't do anything yet) for activating Core CLR
5640         (Silverlight) security.
5641
5642 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5643
5644         * mini-codegen.c: work around a possible gcc bug on arm.
5645
5646 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5647
5648         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5649         message for platforms that don't support AOT compilation.
5650
5651 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5652
5653         * mini.h, mini.c, driver.c: temporary smcs hack.
5654
5655 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5656
5657         * mini-arm.h, mini-arm.c: arm EABI fixes.
5658
5659 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5660
5661         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5662         case.
5663
5664         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5665         trampolines taking a method argument.
5666
5667         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5668
5669         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5670         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5671
5672         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5673         JIT compilation throws an exception. Fixes #82050.
5674
5675 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5676
5677         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5678         with the MONO_EXCEPTION_ defines.
5679
5680 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5683         #82117.
5684         
5685         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5686         the cause of an assertion.
5687
5688 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5689
5690         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5691         removed.
5692
5693 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5694
5695         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5696         assert. Should fix #82103.
5697
5698 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5701         here too. Fixes #82095.
5702
5703         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5704         addresses.
5705
5706         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5707
5708         * mini-amd64.h: Enable IMT for amd64.
5709         
5710         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5711
5712 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5715
5716 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5717
5718         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5719         as soon as check_linkdemand sets an exception_type.
5720
5721 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5722
5723         * mini-x86.c: fixed offsets for IMT call sequence.
5724         * mini-x86.h: enable IMT again.
5725
5726 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5727
5728         * trace.c (mono_trace_enter_method): Decode MonoType too.
5729
5730         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5731
5732         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5733
5734         * mini-amd64.c: Add preliminary IMT implementation.
5735         
5736 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5737
5738         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5739         understand the new IMT-base interface invocation (thanks to
5740         Daniel Nauck for the report and the remote debugging session).
5741
5742 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5743
5744         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5745
5746 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5747
5748         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5749
5750 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5751
5752         * mini-trampolines.c: implement AOT IMT support.
5753         * mini-x86.h: enable IMT support for wider testing.
5754
5755 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5756
5757         * inssel.brg (emit_imt_argument): Add aot support here.
5758
5759         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5760
5761 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5762
5763         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5764         of the IMT implementation, partially from massi, with my
5765         implementation of the bsearch sequence. Disabled by default until
5766         the AOT code is implemented.
5767
5768 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5769
5770         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5771
5772         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5773
5774 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5775
5776         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5777         arch-independent IMT JIT code from Massimiliano
5778         Mantione (massi@ximian.com) with small cleanups from me.
5779
5780 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5781
5782         * Makefile.am: fix svn invocation to get the svn revision to be
5783         independent of the local language (build fix).
5784
5785 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5786
5787         * mini.c (inline_method): Reset cfg->exception_type if the
5788         inlining is aborted.  Fixes: 82049.
5789
5790 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5791
5792         * mini.c: remove assert from exception handling code when exception_ptr
5793         is not set.
5794
5795 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5796
5797         * mini.c (mono_codegen): Add an assert.
5798
5799         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5800         enter and leave code.
5801         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5802
5803 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5804
5805         * mini-ppc.c: fixed memory corruption for localloc(0)
5806         (bug #81852).
5807
5808 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5809         
5810         * mini.c: Fix warnings.
5811
5812 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5813
5814         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5815         to emit better double->int conversions.
5816
5817 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5818
5819         * mini.c: the provided Min/Max optimizations are valid for unisgned
5820         ints.
5821
5822 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5823
5824         * 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
5825
5826 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5827
5828         * mini.c (mono_running_on_valgrind): Add support for reporting the
5829         method and  its boundaries to valgrind.
5830
5831 2007-06-28  Martin Baulig  <martin@ximian.com>
5832
5833         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5834
5835 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5836
5837         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5838
5839         * generic.2.cs: Add new test case.
5840
5841 2007-06-25  Martin Baulig  <martin@ximian.com>
5842
5843         Merged the `debugger-dublin' branch.
5844
5845         * debug-mini.c
5846         (mono_debugger_insert_method_breakpoint): New public method.
5847         (mono_debugger_remove_method_breakpoint): Likewise.
5848         (mono_debugger_check_breakpoints): New static method.
5849         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5850
5851         * debug-debugger.h (MonoDebuggerInfo):
5852         Renamed (to keep backward compatibility in the vtable):
5853         `insert_breakpoint' -> `old_insert_breakpoint'.
5854         `remove_breakpoint' -> `old_remove_breakpoint'.
5855         `create_string' -> `old_create_string'.
5856         `lookup_class' -> `old_lookup_class'.
5857         `lookup_type' -> removed; changed into a dummy field.
5858         `lookup_assembly' -> `old_lookup_assembly'.
5859         Added (same functionality, but different signature):
5860         `create_string', `lookup_class', `lookup_assembly'
5861         Added new:
5862         `get_method_addr_or_bpt', `remove_method_breakpoint',
5863         `runtime_class_init'.
5864
5865         * debug-debugger.c: Merged the `debugger-dublin' branch.
5866
5867 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5870         well.
5871         (peephole_pass): Likewise.
5872
5873 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5874
5875         * driver.c: hopefully make setaffinity work also for ancient
5876         versions of linux.
5877
5878 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5879
5880         * driver.c : win32 build fix.
5881
5882 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5883
5884         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5885         processor if it is set.
5886
5887 2007-06-21  Martin Baulig  <martin@ximian.com>
5888
5889         * debug-mini.h: New file.
5890
5891         * debug-mini.c
5892         (mono_debugger_insert_breakpoint_full): Moved here from
5893         ../metadata/mono-debug-debugger.c.
5894         (mono_debugger_remove_breakpoint): Likewise.
5895         (mono_debugger_breakpoint_callback): Likewise.
5896
5897 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5898
5899         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5900         changes in MonoGenericClass.
5901
5902 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5903
5904         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5905
5906 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5907
5908         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5909         removal of MonoGenericMethod.
5910
5911 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5912
5913         * mini-exceptions.c: hooks for the exception events profiling API.
5914
5915 2007-06-14  Randolph Chung  <tausq@debian.org>
5916
5917         * Makefile.ma: Add hppa target.
5918         * mini-arch.h: Include mini-hppa.h
5919         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5920         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5921         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5922
5923 2007-06-14  Randolph Chung  <tausq@debian.org>
5924
5925         * inssel.brg: Add rules for "chained" compare-branch operations so that
5926         a single compare op can affect multiple branches.  Adjust cost for
5927         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5928         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5929         cost for some rules so that they can more easily be overridden by
5930         per-arch rules (with fixes from lupus).
5931         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5932
5933 2007-06-13  Randolph Chung  <tausq@debian.org>
5934
5935         * mini-ops.h: Reorder branch ops so that they match the order of the
5936         corresponding CEE_* ops.  The code expects them this way.
5937         Add new ops for HPPA target.
5938         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5939
5940 2007-06-13  Randolph Chung  <tausq@debian.org>
5941
5942         * mini-exceptions.c: Handle cases where the stack grows towards
5943         larger addresses.
5944         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5945
5946 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5947
5948         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5949         counter.
5950         * driver.c: explain where a non-matching corlib is found.
5951
5952 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5953
5954         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5955
5956 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5957
5958         * mini-exceptions.c: Generate a method profile leave event during
5959         an exception to ensure that the profiler gets notified.
5960
5961 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5962
5963         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5964         branch.
5965
5966         * cpu-amd64.md: Add long_and/or/xor opcodes.
5967
5968 2007-06-06  Wade Berrier  <wberrier@novell.com>
5969
5970         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5971         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5972         length of instruction shr_imm (expected 8, got 10)
5973
5974 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5975
5976         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5977
5978 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5979
5980         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5981         MonoInternalHashTable again (fixed bug in the internal hash table
5982         code).
5983
5984 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5985
5986         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5987         Have to figure out what makes it crash the SWF regression.
5988
5989 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5992
5993 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5994
5995         * mini.c: optimize out the type check when storing null in a
5996         reference array.
5997
5998 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5999
6000         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6001         MonoInternalHashTable.
6002
6003 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6004
6005         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6006         signed integer methods.
6007
6008 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6009
6010         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6011         permanently since the current approach doesn't work.
6012
6013 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6016         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6017
6018 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6019
6020         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6021         the sreg2==rdx case.
6022         
6023         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6024         account if it contains a rex prefix.
6025         (peephole_pass): Handle OP_FMOVE as well.
6026
6027 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6028
6029         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6030         as it causes regressions.
6031
6032 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6033
6034         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6035         static case as well.
6036
6037         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6038
6039         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6040         (mono_arch_get_this_arg_from_call): Ditto.
6041
6042         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6043
6044         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6045         invoke_impl field.
6046
6047         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6048         (mono_arch_get_this_arg_from_call): Ditto.
6049
6050         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6051         
6052         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6053         try to create optimized invoke code and use that for further invocations. 
6054         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6055
6056         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6057
6058 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6059
6060         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6061         sealed classes or methods.
6062         *devirtualization.cs: tests for the new optimization
6063
6064 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6065
6066         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6067         by the update_volatile () function.
6068
6069 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6070
6071         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6072         require it.
6073
6074         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6075
6076 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6077
6078         * mini.c: Add configure checks for header files.
6079         * mini-x86.c: Add configure checks for header files.
6080         * trace.c: Add configure checks for header files.
6081         * aot-runtime.c: Add configure checks for header files.
6082         * aot-compiler.c: Add configure checks for header files.
6083         * driver.c: Add configure checks for header files.
6084         * mini-codegen.c: Add configure checks for header files.
6085         
6086         Code is contributed under MIT/X11 license.
6087
6088 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6089
6090         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6091         icompare_imm -128 + op_iclt. Fixes #81703.
6092
6093 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6094
6095         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6096
6097 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6098
6099         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6100         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6101         so that all isinst checks now use "interface_bitmap".
6102
6103 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * cpu-amd64.md (jmp): Fix a warning.
6106
6107         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6108
6109         * basic.cs: Add new regression test.
6110
6111         * basic.cs: Remove test which is now in basic-long.cs.
6112
6113         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6114
6115         * basic-long.cs: Add new test.
6116         
6117 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6118
6119         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6120
6121 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6122
6123         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6124
6125         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6126         places.
6127         
6128         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6129         throwing code a bit.
6130
6131         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6132         the exception throwing code a bit.
6133
6134         * mini-x86.c (get_call_info): Allocate result from a mempool.
6135
6136 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6137
6138         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6139
6140         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6141
6142         * mini.h (MonoCompile): Add 'token_info_hash' field.
6143
6144         * mini.c: Save token->method associations during compilation so the AOT 
6145         compiler can use it.
6146         
6147         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6148         which reference generic classes and methods.
6149
6150 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6151
6152         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6153
6154         * aot-compiler.c (compile_method): Fix a typo in a comment.
6155
6156         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6157
6158         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6159         everything generic.
6160
6161         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6162
6163 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6164
6165         * mini.h (MonoCompile): Add 'args' field.
6166
6167         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6168         into cfg->args.
6169
6170         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6171
6172 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6173
6174         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6175
6176         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6177
6178         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6179         opcodes for some opcodes.
6180
6181         * mini.h *.brg *.c: Use the new opcodes.
6182
6183 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6184
6185         * mini.h: Bumped aot revision.
6186
6187         * inssel.brg: modified code generation of type checks for interfaces
6188         to use the new "MonoClass.interface_bitmap" instead of the old
6189         "MonoClass.interface_offsets".
6190
6191 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6192
6193         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6194
6195 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6198         64 bit platforms.
6199
6200 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6201
6202         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6203
6204 2007-04-27  Wade Berrier  <wberrier@novell.com>
6205
6206         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6207         mini.h) to fix build.
6208
6209 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6210
6211         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6212         
6213         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6214         causes the corlib unit tests to fail.
6215
6216 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6217
6218         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6219
6220         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6221
6222         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6223         opcodes to the comparison relations.
6224
6225         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6226         opcodes to their types.
6227         
6228         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6229
6230         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6231         it in cfg->arch.cinfo.
6232
6233         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6234
6235         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6236         cfg->cil_offset_to_bb.
6237
6238 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6239
6240         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6241         created becase of initlocals.
6242
6243 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6244
6245         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6246         Sergey Tikhonov <tsv@solvo.ru>.
6247
6248 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6249
6250         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6251
6252 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6253
6254         * cpu-s390.md (break): Correct the length of break instruction.
6255
6256 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6257
6258         * mini.c: fix a couple of soft-float issues and comments.
6259
6260 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6261
6262         * trace.c (is_filenamechar): - is also a filename char.
6263
6264 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6265
6266         * mini-s390.c: Correct checking for enum type in return value processing.
6267
6268 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6269
6270         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6271         (version.h): Makefile is in the build directory.
6272
6273 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6274
6275         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6276
6277 2007-04-11  Martin Baulig  <martin@ximian.com>
6278
6279         * mini.c (can_access_member): Fix handling of generic classes;
6280         fixes #81259.
6281
6282 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6283
6284         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6285
6286 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6287
6288         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6289
6290 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6291
6292         * mini-codegen.c: make sure the right spill amount is
6293         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6294
6295 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6296
6297         * mini-ppc.c: fixes for the fp_branch_nan test.
6298
6299 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * basic.cs: Comment out new test which still fails on ia64.
6302
6303 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6304
6305         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6306
6307 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6308
6309         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6310
6311 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6312
6313         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6314         on 64 bit machines. Fixes part of #80738.
6315
6316         * basic.cs: Add regression test.
6317
6318 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6319
6320         * inssel.brg basic.cs: Revert previous change to fix build.
6321
6322         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6323         platforms.
6324         
6325         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6326
6327         * basic.cs: Add new regression test.
6328
6329 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6330
6331         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6332         many arguments.
6333
6334 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6335
6336         * cpu-s390x.md: Correct length of break instruction.
6337
6338 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6339
6340         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6341         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6342
6343 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6344
6345         * *.c: Begin WIN64 port.
6346         * mini.c:  Use correct register in profiler.
6347         * mini-amd64.c: No inline assembly on Win64.
6348         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6349         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6350         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6351         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6352         mono_arch_ip_from_context for Win64.
6353         
6354         Contributed under MIT/X11 license.
6355
6356 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6357
6358         * exceptions-amd64.c (seh_handler): Ditto.
6359
6360         * exceptions-x86.c (seh_handler): Fix a memory leak.
6361
6362 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6363
6364         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6365         mini-s390x.c: fixed peephole optimizations to deal
6366         correctly with 1 and 2 byte reload avoidance.
6367
6368 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6369
6370         * cpu-s390.md, cpu-s390x.md: update localloc length.
6371
6372 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6373
6374         * cpu-g4.md: added missing descriptions.
6375
6376 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6377
6378         *  Makefile.am: Add support so the tail tests are not executed on
6379         PowerPC as that is a known limitation of the PowerPC port.
6380
6381 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6382
6383         * runmdesc.bat:  Move to msvc directory.
6384         
6385 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6386
6387         * runmdesc.bat:  Run executable that was produced by the current
6388         target and sent via an argument.
6389         
6390 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6391
6392         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6393         #81102.
6394
6395         * generics.2.cs: Add regression test.
6396
6397 2007-03-09  Wade berrier  <wberrier@novell.com>
6398
6399         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6400
6401 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6402
6403         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6404         AOT code depends on this.
6405
6406 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6407
6408         * mini.c: more precise tracking of types in the eval stack
6409         (part of fix for bug #81044).
6410
6411 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6412
6413         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6414
6415         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6416
6417 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6418
6419         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6420
6421         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6422
6423 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6424
6425         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6426         a pointer on 64 bit systems. Fixes #80190.
6427
6428         * iltests.il: Add new regression test.
6429
6430 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6431
6432         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6433
6434 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6435
6436         * trace.c: Remove an erroneous alignemnt check when tracing.
6437           Fixes --trace on OSX86.
6438
6439 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6440
6441         * mini-$(arch).h: initialize SP in context for all the archs.
6442
6443 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6444
6445         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6446         regressions in the thread tests.
6447
6448 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6449
6450         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6451         - fixed implementation of LOCALLOC opcode
6452         - implemented non-un compare for floats
6453         - code cleanup
6454         - implementation of FDIV and CKFINITE opcodes
6455         - fixes for latest mono updates
6456         - additional arch opcodes
6457
6458 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6459
6460         * Makefile.am: simplify and merge rules for cross-compilation.
6461
6462 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6463
6464         * local-propagation.c: Actually *apply* the fix for bug 80591...
6465
6466 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6467
6468         * mini-exceptions.c: backuot part of the last change
6469         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6470
6471 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6472         * inssel.brg: Fix bug 59286.
6473
6474
6475 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6476
6477         * mini-exceptions.c: patch from Zoltan to correctly check for
6478         stack boundaries (using the stack register, not the frame register),
6479         fixes bugs #80724, #79717.
6480
6481 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6482
6483         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6484         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6485
6486         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6487         presence of frame pointer elimination.
6488
6489 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6490         
6491         * mini-x86.h: NetBSD UCONTEX_REG defines.
6492
6493 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6494
6495         * inssel-amd64.brg: Fix amd64 build.
6496
6497 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6498
6499         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6500         on amd64.
6501
6502 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6503
6504         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6505         ends.
6506
6507         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6508
6509 2007-01-30 Mark Mason <mason@broadcom.com>
6510
6511            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6512            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6513            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6514            beginning support for CEE_JMP [not quite working yet]
6515            * tramp-mips.c: LMF handling now works
6516         
6517 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6518
6519         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6520
6521         * mini.h (NULLIFY_INS): New macro.
6522
6523 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6524
6525         * mini.c: statistical profiler fix for windows, patch
6526         from Tor Lillqvist (tml@novell.com).
6527
6528 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6529         * local-propagation.c: Fix bug 80591.
6530
6531 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6532
6533         * Makefile.am: put back the --export-dynamic option as with
6534         the previous gmodule flags (thanks to Robert Jordan).
6535
6536 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6537
6538         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6539
6540         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6541         simplify and speed up the local register allocator. Also rename some fields
6542         like iassign->vassign.
6543         
6544         * regalloc.c: Remove some functions which are no longer used since their
6545         inlined version is in mini-codegen.c.
6546         
6547         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6548
6549         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6550
6551 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6552
6553         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6554         narrowing. Fixes #80622.
6555
6556         * iltests.il: Add new regresssion test. 
6557
6558 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6559
6560         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6561         debug-debugger.c, debug-debugger.h: warning fixes.
6562         * driver.c: updated copyright year and made it fit in one line.
6563
6564 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6565
6566         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6567
6568 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6569
6570         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6571
6572         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6573
6574         * iltests.il: Add new test for bug #80507.
6575
6576 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6577
6578         * mini-arm.h: use soft-float also on vfp for now.
6579
6580 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6581
6582         * mini.c: fix some more soft-float issues.
6583
6584 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6585
6586         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6587
6588 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6589         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6590         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6591         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6592
6593 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6594
6595         * mini-arm.c: typo fix.
6596
6597 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6598
6599         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6600
6601 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6602
6603         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6604         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6605
6606         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6607
6608         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6609
6610         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6611         
6612         * inssel.brg: Fix a warning.
6613
6614         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6615
6616         * abcremoval.c ssa.c ssapre.c: Update after this change.
6617         
6618         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6619
6620         * dominators.c (df_set): Use mono_bitset_union_fast.    
6621
6622 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6623
6624         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6625         mini-codegen.c: reduce relocations and memory usage for the cpu
6626         description.
6627
6628 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6629
6630         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6631
6632         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6633         to reduce their size.
6634
6635 2007-01-19 Mark Mason <mason@broadcom.com>
6636
6637         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6638         * mini-mips.c: more configuration macros, support long conditional branches, additional
6639         asserts, fix epilog instrumentation.
6640         * mini-mips.h: use standard stack walk
6641         * cpu-mips.md: increase size of div, rem and conditional branches
6642         
6643 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6644
6645         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6646         to cpu spec data.
6647
6648 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6649
6650         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6651         (compile_method): Ditto.
6652
6653         * aot-runtime.c (decode_klass_info): Ditto.
6654
6655         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6656         needed by the code generated by inssel.brg. Also fix a warning.
6657
6658 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6659
6660         * mini.c: deal with enums that become genericinsts by
6661         being nested in a generic class (bug #79956).
6662
6663 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6664
6665         * mini.c: match the generic definition to check for
6666         private access with generic types (bug #78431).
6667
6668 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6669
6670         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6671         to make life easier for people cross-compiling that insist on not
6672         using scratchbox.
6673
6674 2007-01-17 Mark Mason <mason@broadcom.com>
6675
6676         * inssel-long.brg: patch to deal with mips missing flags
6677         * inssel-long32-mips.brg: implement overflow checks
6678         * insset-mips.brg: implement overflow checks
6679         * mini-mips.h: implement conditional exception handling
6680         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6681           Remove unused code, minor cleanups.
6682         * exceptions-mips.c: minor cleanups
6683         * mini-ops.h: add mips conditional exception ops
6684         * cpu-mips.md: add mips conditional exception ops
6685
6686         
6687 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6688
6689         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6690         to deal with mips missing of flags.
6691
6692 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6693
6694         * exceptions-ppc.c: execute fault handlers.
6695
6696 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6697
6698         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6699
6700 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6701
6702         * mini.c: handle also floating point values in initialize_array.
6703
6704 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6705
6706         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6707         array initialization and make it conditional on the intrins option.
6708
6709 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6710
6711         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6712         relocations and put the patch info names close to the enum definition.
6713
6714 2007-01-15 Mark Mason <mason@broadcom.com>
6715
6716         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6717
6718 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6719
6720         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6721
6722 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6723
6724         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6725
6726 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6727
6728         * Makefile.am: distribute the mips sources.
6729
6730 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6731
6732         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6733         directly.
6734
6735 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6736
6737         * cpu-x86.md: back out for now as this triggers other regressions.
6738
6739 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6740
6741         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6742         to eax:edx, so ecx can't get allocated to them (bug #80489).
6743
6744 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6745
6746         * mini.c, mini-exceptions.c: enabled running fault handlers
6747         (bug #80469).
6748
6749 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6750
6751         * driver.c: If nothing fail, do not use the string "failed",
6752         because it makes it very annoying to view test result logs on the
6753         web. 
6754
6755 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6756
6757         * debug-debugger.c (mono_debugger_main): Rename "main" to
6758         "main_method" to prevent a warning.
6759
6760         Remove a warning for unused field.
6761
6762 2006-12-28  Martin Baulig  <martin@ximian.com>
6763
6764         * debug-debugger.c
6765         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6766
6767 2006-12-22  Martin Baulig  <martin@ximian.com>
6768
6769         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6770         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6771         seperate `.mdb_debug_info' section, so we can access it from the
6772         debugger even if the binary is stripped.
6773
6774         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6775         from the `.mdb_debug_info' here to prevent the linker from
6776         removing that section.
6777
6778         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6779         mdb-debug-info64.s.
6780
6781 2006-12-19  Robert Jordan  <robertj@gmx.net>
6782
6783         * mini-x86: enable the code to return small structures in
6784         registers for FreeBSD as well. Fixes bug #80278.
6785         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6786
6787 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6788
6789         * mini-x86.c: align the stack when calling the profiler
6790         function instrumenting the prolog (on OSX).
6791
6792 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6793
6794         * mini.c: emit a break opcode where Debugger.Break () is called.
6795
6796 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6797
6798         * mini.c (mono_method_to_ir): Provide useful information on this
6799         assert, to prevent others from debugging like I did.
6800
6801 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6802
6803         * mini.c: enable code which was incorrectly commented
6804         (bug #80235).
6805
6806 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6807
6808         * mini-x86.c: enable on OSX, too, the code to return small
6809         structures in registers.
6810
6811 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6812
6813         * mini-x86.c: remove the use of the dynamic code manager here, too.
6814
6815 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6816
6817         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6818         mono_debugger_create_notification_function() to use
6819         mono_global_codeman_reserve () instead of a dynamic code manager.
6820
6821 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6822
6823         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6824         ves_array_element_address() jit icall and use a generated
6825         managed method instead (which is about 4 times faster for a rank 3
6826         array access).
6827
6828 2006-11-29  Mark Mason  <mason@broadcom.com>
6829
6830         * basic-calls.cs: additional tests for passing
6831         structures as function arguments.
6832
6833 2006-11-29  Mark Mason  <mason@broadcom.com>
6834
6835         * mini-mips.h: disable custom exception handling
6836         * mini-mips.c: throw/rethrow should use jalr to call
6837         exception stubs.  Fixed bug with passing structures
6838         by value. More support for tracing floating point
6839         functions.
6840
6841 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6842
6843         * mini.c: fixed typo in the soft-float ldind.r4 handling
6844         (bug #80086).
6845
6846 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6847
6848         * mini.c, mini.h, driver.c: added --runtime command line
6849         option to select a different runtime than the autodetected one.
6850         * jit.h: added API for embedders to initialize with a specific
6851         runtime version.
6852
6853 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6854
6855         * mini.c: handle also boxing of r4 values (bug #80024).
6856
6857 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6858
6859         * mini-ppc.c: force indirect calls until we reserve
6860         enough address space for all the generated code.
6861
6862 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6863
6864         * exceptions-arm.c: workaround bugs in the libc definition
6865         of struct ucontext.
6866
6867 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6868
6869         * inssel.brg: fixes from me and Mark Mason.
6870
6871 2006-11-23  Dick Porter  <dick@ximian.com>
6872
6873         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6874         semaphore display now we've fixed the initial value
6875
6876 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6877
6878         * inssel.brg: partially revert the last change to fix the build.
6879
6880 2006-11-21  Mark Mason  <mason@broadcom.com>
6881
6882         * inssel.brg: Add and use compare-and-branch macros to support
6883         architectures that do not have condition code registers (ie. MIPS).
6884         * *-mips.{c,brg,md}: Fix copyright statements
6885
6886 2006-11-20  Mark Mason  <mason@broadcom.com>
6887
6888         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6889         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6890         * mini.h: Added declaration for mono_print_ins()
6891         * mini-codegen.c: added ins_spec initializer for MIPS
6892         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6893         vreg to be virtual and hreg to be non-virtual.
6894         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6895         is not yet working/implemented correctly.
6896         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6897         non-static, fixup calls to print_ins() from other parts in the file.
6898
6899 2006-11-20  Mark Mason  <mason@broadcom.com>
6900
6901         * basic-calls.cs: added tests for passing structures as arguments
6902         to calls.
6903
6904 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6905
6906         * inssel-long32.brg: optimize signed division by power of two.
6907
6908 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6909
6910         * mini-arm.c: added support for interworking with thumb code
6911         (mono must be still be built using the ARM instruction encoding).
6912
6913 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6914
6915         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6916         verifier has different rules for it.   Fixes a few verifier issues
6917         in the test suite.
6918
6919         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6920         at the end, so people know what happened.
6921
6922 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6923
6924         * brach-opts.c: in optimize_exception_target() make sure we
6925         are in a catch clause (fixes bug #79871).
6926
6927 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6928
6929         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6930         more soft-float support fixes.
6931
6932 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6933
6934         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6935         that are passed half on the stack and half in registers.
6936
6937 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6938
6939         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6940         more mips integration work from Mark E Mason 
6941         <mark.e.mason@broadcom.com>.
6942
6943 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6944
6945         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6946         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6947         tramp-mips.c: added sources for the mips port, not
6948         integrated in the build yet. Contributed by
6949         Mark E Mason <mark.e.mason@broadcom.com>.
6950
6951 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6952
6953         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6954
6955 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6956
6957         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6958         put the soft-float rules in its own file since it seems to
6959         break s390 compilation.
6960
6961 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6962
6963         * mini-arm.c: fixed wrnings.
6964
6965 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6966
6967         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6968         inssel-arm.brg: ARM support for soft-float.
6969
6970 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6971
6972         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6973         loads and stores of 32 bit fp values.
6974
6975 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6976
6977         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6978
6979         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6980         works. Fixes #79852 and #79463.
6981
6982 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6983
6984         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6985         more soft-float support WIP and fixes.
6986
6987 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6988
6989         * mini-arm.c: some VFP updates.
6990
6991 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6992
6993         * mini-exceptions.c: 0 is a valid local var offset in some
6994         architectures, don't assert (bug #78508).
6995
6996 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6997
6998         * exceptions-arm.c: fixed off by one error in stack walk code.
6999
7000 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7001
7002         * mini.h, mini.c: more precise tracking of type load exceptions.
7003
7004 2006-11-03  Robert Jordan  <robertj@gmx.net>
7005
7006         * Makefile.am: [WIN32] Add monow.exe target.
7007         * driver.c: [WIN32] Don't detach the console when debugging.
7008         Fixes bug #79797.
7009         
7010 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7011
7012         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7013
7014 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7015
7016         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7017
7018         * driver.c (mini_regression): Fix --regression with AOT.
7019
7020         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7021
7022 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7023
7024         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7025
7026         * mini-sparc.h: Don't use sigaction on sparc/linux.
7027
7028         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7029
7030         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7031
7032         * mini-exceptions.c: Add proper include files for getpid ().
7033
7034 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7035
7036         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7037         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7038         method.
7039
7040         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7041         name cache to reduce its size.
7042
7043         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7044
7045 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7046
7047         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7048         the mono_lmf TLS variable.
7049
7050         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7051         trampoline lmf frames.  
7052
7053         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7054
7055 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7056
7057         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7058         the mono_lmf TLS variable.
7059
7060         * mini-exceptions.c: Access the LMF structure through accessors.
7061
7062         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7063         variable instead of in jit_tls->lmf.
7064
7065         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7066         
7067         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7068         trampoline lmf frames.
7069
7070         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7071
7072 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7073
7074        * mini.c trace.c mini-x86.c: Revert these too.
7075         
7076        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7077        signature change.
7078
7079 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7080
7081         * genmdesc.c: removed now dead code.
7082
7083 2006-10-09  Robert Jordan <robertj@gmx.net>
7084
7085         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7086
7087 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7088
7089         * mini.h: do not leave gaps in the opcode values.
7090
7091 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7092
7093         * jit-icalls.h: flag functions as internal here, too.
7094
7095 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7096
7097         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7098         functions with the internal attribute.
7099
7100 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7101
7102         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7103
7104 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7105
7106         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7107         for soft-float.
7108
7109 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7110
7111         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7112         tail calls as on other platforms.
7113
7114         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7115
7116         * iltests.il: Add a few tailcall tests.
7117
7118 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7119
7120         * driver.c: fix loop for old compilers (bug #79521).
7121
7122 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7123
7124         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7125
7126         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7127
7128         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7129         metadata without any code.
7130
7131         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7132         more precise debugging information using gdb.
7133
7134 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7135
7136         * inssel-ia64.brg: Make the helper methods static.
7137
7138 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7139
7140         * inssel-x86.brg: make the helper methods static.
7141
7142 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7143
7144         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7145
7146 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7147
7148         * mini.c: updates for monoburg changes.
7149         * inssel.brg: make a few helper functions static as they should.
7150
7151 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7152
7153         * Makefile.am: Move mini-codegen.c to common_sources.
7154
7155 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7156
7157         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7158         instructions.
7159         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7160         mini-ppc.h: port to use the common local register allocator.
7161
7162 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7163
7164         * mini.h: Remove the comment too then.
7165
7166 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7167
7168         * mini.h: put back backend.data which is to be used shortly and
7169         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7170         pointers on 4 byte boundaries it'd have much bigger issues running
7171         and you can ifdef it out anyway.
7172
7173 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7176         MonoInst size by 4 bytes on 64 bit machines.
7177
7178 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7179
7180         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7181         replacement with more meaningful field names. Arch maintainers, please
7182         check the assigned names are good enough for your arch.
7183
7184 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7185
7186         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7187         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7188
7189 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7190
7191         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7192         relocations and memory requirements, put the optimization flags
7193         definitions in their own file.
7194
7195 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7196
7197         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7198
7199         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7200
7201 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7202
7203         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7204
7205 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7206
7207         * inssel.brg: use the correct function to get the size of an item
7208         in an array, given an element class.
7209         * aot-compiler.c: do not access class->class_size directly.
7210
7211 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7212
7213         * mini.h, debug-mini.c: added a debugging function to print
7214         info about local variables and arguments in a jitted method.
7215
7216 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7217
7218         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7219
7220         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7221
7222 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7223
7224         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7225         inner and outer loops when passing vtypes.
7226
7227 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7228
7229         * mini-ppc.c: take into account the cpu errata for cache flushing
7230         which caused some random errors (bug #79381).
7231
7232 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7233
7234         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7235         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7236
7237 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7238
7239         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7240         loaded.
7241
7242         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7243         freebsd ports tree.
7244
7245         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7246         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7247
7248         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7249         displacement.
7250
7251 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7252
7253         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7254
7255 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7256
7257         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7258         macro does not have to be changed during debugging.
7259
7260         * 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>.
7261
7262         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7263
7264         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7265         
7266         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7267         MONO_ARCH_NO_EMULATE_MUL is defined.
7268
7269         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7270
7271         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7272
7273         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7274
7275         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7276         
7277 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7278
7279         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7280         stuff to mini-exceptions.c where it is used.
7281
7282         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7283         setup code, the real one is in mini-exceptions.c.
7284
7285         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7286         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7287         some changes from the freebsd ports tree.
7288
7289         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7290         constants.
7291         
7292         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7293
7294 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7295
7296         * mini.c: on Linux, check for /proc to be mounted
7297         (bug# 79351, novell bug#201204).
7298
7299 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7300
7301         * mini.c: handle cases where pthread_attr_getstack() behaves
7302         incorrectly (bug #78096).
7303
7304 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7305
7306         * mini-arm.c: support larger stack frames (bug #79272).
7307
7308 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7309
7310         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7311
7312         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7313         tokens.
7314
7315         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7316         mono_class_from_name () to find a class from its name.
7317
7318         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7319
7320 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7321
7322         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7323
7324 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7325
7326         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7327
7328 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7329
7330         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7331         callinfo->trampoline.
7332
7333         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7334         fixes #79271.
7335         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7336         future.
7337
7338 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7339
7340         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7341
7342 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7343
7344         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7345         stats.method_trampolines, it is already done by the generic trampoline code.
7346
7347         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7348         
7349 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7350
7351         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7352
7353         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7354
7355         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7356
7357         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7358         
7359         * mini.c (print_jit_stats): Print new stats.
7360
7361         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7362
7363 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7364
7365         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7366         Address on two dimensional arrays. Fixes #78729.
7367
7368         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7369
7370         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7371         a method.
7372
7373         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7374
7375         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7376         #79130.
7377         
7378         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7379         a race condition.
7380         (mini_get_ldelema_ins): Ditto.
7381
7382 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7383
7384         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7385         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7386         Fixes #79213.
7387
7388 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7389
7390         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7391         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7392
7393         * exceptions-s390x.c: Cosmetic change.
7394
7395         * tramp-s390.c: Fix warning.
7396
7397         * cpu-s390.md: Correct length of mul_imm.
7398
7399 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7400
7401         * aot-compiler.c: added binary writer with ELF backend
7402         implementation (only on Linux/x86 for now).
7403
7404 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7405
7406         * Makefile.am: Don't run net 2.0 AOT tests.
7407
7408         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7409         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7410
7411         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7412
7413 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7414
7415         * aot-compiler.c: simplified and refactored the asm-writing code
7416         to allow different backends.
7417
7418 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7419
7420         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7421
7422         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7423         little. Share patches of type TYPE_FROM_HANDLE as well.
7424
7425         * mini.c (mono_patch_info_equal): New helper function.
7426         (mono_patch_info_hash): Ditto.
7427
7428         * aot-compiler.c (emit_method_code): Fix s390 build.
7429
7430         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7431         is not handled because it is stored as a flag and not as a type ctor. Fixes
7432         #79016.
7433
7434 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7435
7436         * aot-compiler.c: Fix computation of GOT slot statistics.
7437         
7438         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7439         Also remove support for not PIC AOT.
7440
7441         * mini.h: Bump AOT file format version.
7442
7443         * objects.cs: Add a test for #78990.
7444
7445         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7446         (peter.dettman@iinet.net.au). Fixes #79087.
7447
7448         * basic-long.cs: Add a test for the above.
7449
7450 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7451
7452         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7453         
7454         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7455         code somewhat.
7456
7457 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7458
7459         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7460         exceptions.
7461
7462 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7463
7464         * mini.c: Don't verify COM proxy invoke calls
7465         
7466
7467 2006-08-10  Dick Porter  <dick@ximian.com>
7468
7469         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7470         which process is holding semaphores locked.
7471
7472 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7473
7474         * mini-ia64.c mini-amd64.c: Fix #79027.
7475
7476         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7477
7478         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7479
7480         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7481         implicit arguments in a vararg call. Fixes #79027.
7482
7483 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7484
7485         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7486         (mono_get_array_new_va_signature): Ditto.
7487
7488 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7489
7490         * aot-runtime.c: Call init_plt lazily.
7491
7492         * inssel-long.brg: Fix unsigned long->int conversion.
7493
7494         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7495
7496         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7497         that most data is now in the .rss/.data section.
7498
7499 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7500
7501         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7502
7503         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7504
7505         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7506
7507         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7508
7509         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7510         virtual call. Fixes #79010.
7511
7512         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7513         and use the result as the this argument in the real call.
7514
7515         * generics.2.cs: Add a new test for #79010.
7516         
7517 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7518
7519         * mini-x86.c: Fix a warning.
7520
7521         * aot-compiler.c: Add a bunch of statistics.
7522
7523         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7524
7525 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7526
7527         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7528
7529 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7530
7531         * 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>.
7532
7533 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7534
7535         * mini.c (mono_method_to_ir): Obtain the original method in the
7536         CIL stream and use this to perform validation.
7537
7538         Fixed: #78816
7539
7540 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7541
7542         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7543         (mono_arch_call_opcode): Ditto.
7544
7545         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7546         #78826.
7547
7548         * mini.c (mono_patch_info_dup_mp): New helper function.
7549         
7550         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7551         compilation. Fixes #78827.
7552
7553 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7554
7555         * declsec.c: Use original security informations for
7556           MONO_WRAPPER_MANAGED_TO_MANAGED.
7557
7558 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7559
7560         * mini.c: Allow Com Interop methods/classes and
7561         don't verify COM wrapper calls
7562         
7563
7564 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7565
7566         * inssel-long32.brg: Fix long->i4 checked conversion.
7567
7568         * exceptions.cs: Add a test for the above.
7569
7570 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7571
7572         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7573
7574         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7575         leaks.
7576
7577         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7578         #78775.
7579
7580 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7581
7582         * mini.c: Fix solaris/x86 exception handling.
7583
7584         * Makefile.am: Get rid of $(ICU_LIBS).
7585
7586 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7587
7588         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7589         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7590         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7591
7592         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7593
7594         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7595         this function causes a SIGSEGV.
7596
7597 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7598
7599         * mini.c: Remove unused solaris/x86 includes.
7600
7601 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7602
7603         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7604
7605 2006-06-20  Jb Evain  <jbevain@gmail.com>
7606
7607         * cpu-g4.md: fix max length of start_handler instruction.
7608
7609 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7610         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7611
7612 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7613         * ssa.c: Fixed bug 78653 for SSA based deadce.
7614         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7615         MonoInst.flags, used in SSA based deadce.
7616         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7617         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7618
7619 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7620
7621         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7622         it can end up using non executable memory on ppc64 systems
7623         running ppc32 userspace (fix from Johannes Berg).
7624
7625 2006-06-14  Dick Porter  <dick@ximian.com>
7626
7627         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7628         4.1.1
7629
7630 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7631         * mini.c: Made so that inline is locally disabled if it would
7632         trigger a .cctor, because too many apps depend on this behavior
7633         (which seems to be also the one of the MS CLR).
7634
7635 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7636
7637         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7638         No idea why this worked before.
7639
7640         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7641         which branch to outer exception clauses since they could skip the
7642         inner finally clauses. Fixes #78633.
7643
7644         * exceptions.cs: Add a test for the above.
7645
7646         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7647         Fixes #78629.
7648
7649         * iltests.il: Add a test for the above.
7650
7651 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7652
7653         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7654         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7655
7656         * iltests.il: Add a test for the above.
7657
7658 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7659
7660         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7661         
7662         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7663         methods as instrinsics.
7664
7665 2006-06-09  Wade Berrier <wberrier@novell.com>
7666
7667         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7668         (simple-cee-ops.h ssapre-mini-ops.h)
7669
7670 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7671
7672         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7673         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7674         instruction).
7675         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7676         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7677
7678 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7679
7680         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7681
7682 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7683
7684         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7685         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7686         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7687         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7688         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7689         of opcodes, so that bug 78549 should not happen again.
7690         * ssapre.c: Updated to use the renamed files.
7691
7692 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7695         in OP_ATOMIC_EXCHANGE_I4.
7696
7697 2006-06-07  Wade Berrier <wberrier@novell.com>
7698
7699         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7700         in mono_debugger_create_notification_function)
7701
7702 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7703
7704         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7705         
7706         * mini.c (type_from_stack_type): Disable some changes which do not
7707         seem to work.
7708
7709         * driver.c: Reenable opts.
7710
7711         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7712         of the evaluation stack.
7713         
7714         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7715         evaluation stack trace at entry to the bblock.
7716
7717         * mini.c (merge_stacks): New function to perform verification of stack merges.
7718         Turned off by default.
7719
7720         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7721         STACK_MP.
7722         
7723 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7724
7725         * local-propagation.c: Fixed bug 78549.
7726
7727 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7728
7729         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7730
7731 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7732
7733         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7734         tramp-arm.c, tramp-ia64.c
7735         (mono_debugger_create_notification_function): Update signature to
7736         new signature and use new protocol for creating the notification
7737         function.  
7738
7739         Should fix the build.
7740
7741 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7742
7743         * exceptions-ppc.c (mono_jit_walk_stack)
7744         (ves_icall_get_frame_info): Fix the build
7745
7746 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7749
7750 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7751
7752         * il2tests.2.il: New file for generics CIL tests.  Add test for
7753         #78019.
7754         * Makefile.am: Update.
7755
7756         Fix #78019
7757         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7758         to nullable types.
7759
7760 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7761
7762         * aliasing.c: Fixed bug 78311.
7763
7764 2006-05-29  Martin Baulig  <martin@ximian.com>
7765
7766         * mini-exceptions.c (mono_find_jit_info): When computing the
7767         native offset, check whether we're actually inside the method's
7768         code; call mono_debug_print_stack_frame() to format the frame.
7769         (ves_icall_System_Exception_get_trace): Call
7770         mono_debug_print_stack_frame() to format the stack frame.
7771         (ves_icall_get_trace): Update to the new debugging API.
7772         (mono_jit_walk_stack_from_ctx): Likewise.
7773         (ves_icall_get_frame_info): Likewise.
7774
7775         * mini.c (get_method_from_ip): Use the new debugging API.
7776         (mono_print_method_from_ip): Likewise.
7777
7778         * exceptions-ppc.c
7779         (mono_jit_walk_stack): Use the new debugging API.
7780         (ves_icall_get_frame_info): Likewise.   
7781
7782 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7783
7784         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7785
7786 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7787
7788         * mini.c: Added "limitator" to inline for debugging.
7789
7790 2006-05-24  Martin Baulig  <martin@ximian.com>
7791
7792         * debug-debugger.c (mono_debugger_init): Create a private,
7793         malloc()-based code manager for the notification function and
7794         intentionally leak it on exit.  This fixes the crash-on-exit race
7795         condition.
7796
7797         * tramp-amd64.c
7798         (mono_debugger_create_notification_function): Added
7799         `MonoCodeManager *' argument.
7800
7801         * tramp-x86.c
7802         (mono_debugger_create_notification_function): Added
7803         `MonoCodeManager *' argument.
7804
7805 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7806
7807         * aliasing.c: Fixed 64 bit issue.
7808         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7809         default since all known bugs are fixed (one more time!).
7810
7811 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7812
7813         * mini.c: write barrier support.
7814
7815 2006-05-23  Martin Baulig  <martin@ximian.com>
7816
7817         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7818         check at the top of the file.
7819
7820 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7821
7822         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7823         reverting changes without reason and without changelog entries.
7824
7825 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7826
7827         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7828         to a few opcodes. Fixes #78439.
7829
7830         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7831         consistency with other archs.
7832
7833         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7834
7835 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7836
7837         * debug-debugger.c: fix the build.
7838
7839 2006-05-17  Martin Baulig  <martin@ximian.com>
7840
7841         * debug-debugger.c
7842         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7843         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7844         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7845         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7846
7847 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7848
7849         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7850
7851 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7852
7853         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7854         MONO_TYPE_GENERICINST.
7855         
7856         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7857         MONO_TYPE_GENERICINST.
7858
7859 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7860
7861         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7862         #78325.
7863
7864 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7865
7866         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7867         mempool.
7868         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7869
7870 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7871
7872         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7873         mono_trace_cleanup ().
7874
7875         * iltests.il: Fix problem with the newly added test.
7876
7877         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7878         due to register constraints, free up the previous hreg. Fixes #78314.
7879
7880         * iltests.il: Add new test for #78314.  
7881
7882         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7883         Interlocked.Add. Fixes #78312.
7884
7885         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7886         
7887 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7888
7889         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7890
7891 2006-05-05  Martin Baulig  <martin@ximian.com>
7892
7893         * debug-mini.c (mono_debug_open_block): New method.
7894
7895         * mini-amd64.c
7896         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7897         the beginning of each basic block.
7898
7899         * mini-x86.c
7900         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7901         the beginning of each basic block.
7902
7903 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7904
7905         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7906         default until I understand why they break the build on amd64.
7907
7908 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7909
7910         * mini.c (mini_cleanup): Call mono_cleanup ().
7911
7912         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7913         errors.
7914
7915 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7916
7917         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7918         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7919         default since all known bugs are fixed, and I cannot reproduce bug
7920         77944... I'm asking Matt Hargett to test again after this commit.
7921
7922 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7923
7924         * mini-codegen.c: Fixed typo that thrashed inline.
7925
7926 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7927
7928         * dominators.c (compute_dominators): Avoid using a worklist since
7929         it is not correct in some cases. Instead, iterate over all bblocks as
7930         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7931
7932 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7933
7934         * mini.c (mono_jit_compile_method_inner): Use
7935         mono_prepare_exception_from_error that resets the value
7936         internally.
7937
7938 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7939
7940         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7941         
7942 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7943
7944         * aliasing.c: Fixed bug 78210.
7945
7946 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7947
7948         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7949         default until all their problems (or the ones they trigger) are fixed.
7950
7951 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7952
7953         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7954         
7955         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7956         as loaded only after resolving patches since that could invoke the same method.
7957
7958         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7959
7960         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7961         functions.
7962
7963         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7964         AOT loader.
7965
7966         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7967         stack.
7968
7969         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7970         made from AOT code through the PLT table.
7971
7972         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7973         holding the plt offset when a call is made to the aot plt trampoline.
7974         
7975 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7976
7977         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7978         amd64 AOT support.
7979
7980         * Makefile.am (common_sources): Fix build breakage.
7981
7982         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7983         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7984         intra-assembly calls if possible.
7985         
7986         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7987
7988         * mini-trampolines.c: Handle PLT entries.
7989
7990         * mini.c: Avoid creating a GOT var for calls.
7991
7992         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7993         from mscorlib code.
7994
7995         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7996         from mscorlib code.
7997
7998         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7999         AOT code.       
8000
8001         * mini.h: Bump AOT file format version.
8002         
8003         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8004         covers more cases.
8005
8006 2006-04-25  Martin Baulig  <martin@ximian.com>
8007
8008         * driver.c: Disable copyprop, consprop and inline when running
8009         inside the debugger.
8010
8011 2006-04-25  Martin Baulig  <martin@ximian.com>
8012
8013         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8014         with `get_current_thread' and added `detach'.
8015         (MonoDebuggerMetadataInfo): Added `thread_size',
8016         `thread_tid_offset', `thread_stack_ptr_offset' and
8017         `thread_end_stack_offset'.
8018
8019 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8020
8021         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8022         aot-runtime.c.
8023
8024         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8025         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8026
8027         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8028
8029         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8030
8031         * aot.c: Add support for ADJUSTED_IID.  
8032
8033 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8034
8035         * aot.c (emit_method_order): Don't align method_order_end.
8036
8037         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8038         the interface ID changes.
8039
8040 2006-04-21  Dick Porter  <dick@ximian.com>
8041
8042         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8043         cleaning up a thread.  Fixes the new part of bug 77470.
8044
8045 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8046
8047         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8048         to managed wrapper.
8049                      
8050 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8051
8052         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8053         
8054         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8055         SIGSEGV. Fixes #78072.
8056
8057         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8058         unregister our SIGABRT handler.
8059
8060 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8061
8062         * mini.c: Disabled inline where it can alter the call stack in a
8063         way visible from managed code.
8064         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8065         default.
8066
8067 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8068
8069         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8070         on other platforms. Fixes #78089.
8071
8072 2006-04-13  Martin Baulig  <martin@ximian.com>
8073
8074         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8075         determine whether we're inside the debugger.
8076
8077         * debug-debugger.h
8078         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8079
8080 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8081
8082         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8083         handler clauses. Fixes #78024.
8084
8085         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8086         in the CALL_MEMBASE opcodes. Fixes #78088.
8087         (mono_arch_get_vcall_slot_addr): Ditto.
8088
8089 2006-04-10  Martin Baulig  <martin@ximian.com>
8090
8091         * debug-debugger.c: The thread handling code has now been moved
8092         into ../metadata/threads.c.
8093
8094 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8095
8096         * driver.c (mono_main): Fix --with-gc=none build.
8097
8098         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8099         (mono_spillvar_offset_float): Ditto.
8100         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8101         hreg, not when its !global, since on ia64, there is a third category: stacked
8102         registers.      
8103
8104 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8105
8106         * mini.c: set MonoInst->klass for load field address and a few other
8107         places.
8108
8109 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8110
8111         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8112
8113 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8114
8115         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8116         the branch opt changes.
8117
8118 2006-04-06  Dick Porter  <dick@ximian.com>
8119
8120         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8121         
8122         * wapihandles.c (mini_wapi_seminfo): 
8123         * driver.c (mono_main): Add semaphore info option
8124
8125 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8126
8127         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8128         branch optimization changes. Fixes #78009.
8129
8130 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8131
8132         * mini.c: ignore accessibility of methods in managed->native wrappers.
8133
8134 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8135
8136         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8137         
8138         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8139
8140 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8141
8142         * mini.c: Modify the branch optimizations to preserve the invariant that
8143         the entries inside the in_bb and out_bb arrays are unique.
8144         (mono_unlink_bblock): Avoid creation of new arrays.
8145
8146 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8147
8148         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8149         change (#77992).
8150
8151 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8152
8153         * mini.c (optimize_branches): Remove the "optimizations" in
8154         the cbranch1/cbranch2 -> branch cases which were causing several
8155         problems in the past. Fixes #77986.
8156
8157 2006-03-31  Chris Toshok  <toshok@ximian.com>
8158
8159         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8160         default optimizations :(
8161
8162 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8163
8164         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8165         branch.
8166
8167 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8168
8169         * local-propagation.c: Added comments to structs and removed
8170         "Mono" prefixes from local tree mover types.
8171
8172 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8173
8174         * Makefile.am (arch_sources): Define this for each architecture so 
8175         libmono_la_SOURCES is defined in one place.
8176
8177 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8178
8179         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8180         from handles/.
8181
8182 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8183
8184         * driver.c: print the GC name supplied by configure.
8185
8186 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8187
8188         * local-propagation.c: Added tree mover, and moved here all the
8189         local propagation code from mini.c
8190         * mini.c: Added support for treeprop, and moved all the local
8191         propagation code to local-propagation.c
8192         * mini.h: Added support for treeprop
8193         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8194         treeprop, inline and deadce by default
8195         * Makefile.am: Added local-propagation.c
8196
8197 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8198
8199         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8200
8201 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8202
8203         * debug-debugger.c: make it compile without the Boehm GC.
8204
8205 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8206
8207         * mini.c: fixed issue with mismatch when an icall is registered
8208         with multiple names but same address.
8209
8210 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8211
8212         * declsec.c, mini-exceptions.c: use write barrier to set reference
8213         fields of managed objects.
8214
8215 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8216
8217         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8218         (can_access_internals): Fix a warning.
8219
8220         * mini.c (print_method_from_ip): Rename this to 
8221         mono_print_method_from_ip so it gets exported.
8222
8223         * trace.c: Deal with strings inside StringBuilder's containing garbage
8224         and fix memory leaks. Fixes #77848.
8225
8226 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8227
8228         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8229         fixes #77787.
8230
8231 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8232         
8233         * mini-s390.c: Remove OP_X86_TEST_NULL.
8234
8235 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8236
8237         * mini.c: use the correct GetHashCode() for the moving collector.
8238
8239 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8240
8241         * liveness.c: Regalloc spill cost tuning.
8242
8243 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8244         
8245         * mini-s390x.h: Correct S390_LONG macro.
8246
8247         * mini-s390x.c: Cleanup unused code.
8248
8249 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8250
8251         * jit-icalls.h: New file.
8252
8253         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8254         icalls and include that instead of including jit-icalls.c.
8255
8256         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8257         OP_X86 opcodes.
8258
8259 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8260
8261         * mini.c: when checking for member accessibility, also check for
8262         friend assemblies and for explicit interface implementations.
8263
8264 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8265
8266         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8267
8268         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8269
8270         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8271         common cases are done first.    
8272
8273         * mini-ops.h: Only define platform specific opcodes on the given platform.
8274
8275         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8276         branch.
8277         
8278 2006-03-14  Martin Baulig  <martin@ximian.com>
8279
8280         Revert Paolo's change from r57348:
8281
8282         * mini.h: don't use gboolean for bitfields.
8283         * mini.c: verifier changes for fields and methods accessibility.
8284
8285 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8286
8287         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8288
8289         * mini-s390x.c: Fix conv_r_un.
8290
8291         * cpu-s390, cpu-s390x.md: Fix lengths.
8292
8293 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8294
8295         * mini.c: nested types have access to all the nesting
8296         levels, not just the enclosing types.
8297
8298 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8299
8300         * mini.c: added a few more verification checks.
8301
8302 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8303
8304         * liveness.c: Merge optimizations from the linear-il branch.
8305
8306 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8307
8308         * mini-ia64.c (emit_call): Add a comment.
8309
8310         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8311
8312         * tramp-ia64.c: Fix some warnings.
8313
8314 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8315
8316         * mini.h: don't use gboolean for bitfields.
8317         * mini.c: verifier changes for fields and methods accessibility.
8318
8319 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8320
8321         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8322         lazy icall wrapper changes.
8323
8324         * dominators.c: Replace all the dominator algorithms with faster
8325         ones from the linear-il branch.
8326
8327         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8328         the mempool.
8329
8330         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8331         common cases are done first.
8332
8333         * mini-amd64.c: Fix some warnings.
8334
8335         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8336         from the mempool.
8337
8338         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8339         added code.
8340
8341         * mini.h: Add a missing prototype.
8342
8343 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8344
8345         * mini.c: Compile icall wrappers lazily.
8346
8347         * mini-codegen.c: Use printf instead of g_print since its much faster.
8348
8349         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8350         function.
8351
8352         * mini.c (optimize_branches): Cache the negative result from 
8353         remove_block_if_useless ().
8354
8355         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8356         Also fix some bblock linking issues.
8357
8358         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8359         assembly files.
8360
8361         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8362
8363         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8364         accessed fields first, for better cache behavior.
8365         
8366 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8367
8368         * mini.c: speedup IList<T> array accesses.
8369
8370 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8371
8372         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8373         inline_costs counter. Fixes #77190.
8374
8375 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8376
8377         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8378         trace messages. Fixes #77706.
8379
8380 2006-03-04  Martin Baulig  <martin@ximian.com>
8381
8382         * tramp-amd64.c, tramp-x86.c
8383         (mono_debugger_create_notification_function): Use
8384         mono_global_codeman_reserve() to allocate a buffer at runtime and
8385         return it.
8386
8387         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8388
8389         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8390         notification function at runtime and then call `initialize' in the
8391         `MONO_DEBUGGER__debugger_info' vtable.
8392
8393 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8394
8395         * iltests.il: Fix a visibility problem.
8396
8397 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8398
8399         * driver.c, mini.c: add hooks for the counters API.
8400
8401 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8402
8403         * driver.c: show disabled options.
8404
8405 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8406
8407         * linear-scan.c: always use cost-driven selection.
8408
8409 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8410
8411         * jit-icalls.c (helper_compile_generic_method): Revert change from
8412         2006-02-24.
8413
8414 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8415
8416         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8417
8418 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8419
8420         * inssel.brg: style fixes, mostly to force the updated monoburg
8421         to run for people using svn.
8422
8423 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8424
8425         * mini.c: match monoburg changes.
8426
8427 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8428
8429         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8430         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8431         declaration in the header file.
8432
8433 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8434
8435         * helpers.c: reduce relocations and mem usage.
8436
8437 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8438
8439         * mini.h, mini-codegen.c: disable logging features if
8440         requested by configure.
8441
8442 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8443
8444         * mini.c: tiny verifier changes.
8445
8446 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8447
8448         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8449         cpu-pentium.md: stack alignment changes for osx/x86,
8450         partially from Geoff Norton <gnorton@customerdna.com>.
8451
8452 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8453
8454         * jit-icalls.c (helper_compile_generic_method): Update to changes
8455         in metadata/class.c.
8456
8457 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8458         
8459         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8460         
8461         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8462         interface calls with large offsets.
8463
8464 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8465
8466         * jit-icalls.c (helper_compile_generic_method): Document the
8467         special-case we depend on so that we can inflate the method twice
8468         with the same context with no bad side-effects.
8469
8470 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8471
8472         * mini-x86.c, mini-amd64.c: fix for case when xen support
8473         is disabled.
8474
8475 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8476
8477         * mini-x86.c, mini-amd64.c: generate code to access tls items
8478         in a faster way for Xen systems.
8479
8480 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8481
8482         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8483         updates and compilation fixes for the OSX/x86 port, mostly from
8484         Geoff Norton <gnorton@customerdna.com>.
8485
8486 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8487
8488         * inssel.brg: faster interface call implementation
8489         to sync with the interface_offsets MonoVTable changes.
8490
8491 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8492
8493         * mini.c: more verification checks.
8494
8495 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8496
8497         * mini.c: added a few more verification checks.
8498
8499 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8500
8501         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8502         facility on the processor and use it if available.
8503
8504 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8505
8506         * driver.c, aot.c, mini.c: throw exception if the IL code is
8507         invalid or unverifiable.
8508
8509 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8510
8511         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8512         m.StructField.
8513
8514 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8515
8516         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8517
8518 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8519
8520         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8521         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8522         handling of instantiated generic valuetypes.
8523
8524 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8525
8526         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8527         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8528         instead.
8529
8530         * generics.2.cs: Revert the nullable reftypes tests.
8531
8532 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8533
8534         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8535         using __builtin_frame_address (1) as it doesn't work in the presence
8536         of optimizations. Hopefully fixes #77273.
8537
8538         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8539         -> generics.cs change as it doesn't work with some automake versions.
8540
8541 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8542
8543         * mini.c: handle systems that sue a different way to
8544         retrieve the stack address of the current thread.
8545
8546 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8547
8548         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8549         it specially in the makefile.
8550
8551         * generics.2.cs: Add tests for nullable reference types.
8552
8553 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8554
8555         * mini.c: always handle the case when mono_jit_init()
8556         is called in a thread different from the main thread,
8557         confusing libgc (bug #77309).
8558
8559 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8560
8561         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8562
8563 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8564
8565         * mini.c: change optimize_branches () to use a single loop
8566         and introduce a new optimization to simplify some range checks.
8567
8568 2006-02-03  Martin Baulig  <martin@ximian.com>
8569
8570         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8571         and merged with debugger_thread_manager_add_thread().
8572         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8573         inform the debugger about the main thread.
8574
8575 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8576
8577         * basic.cs: Add test for div.un/rem.un constant folding.
8578
8579 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8580
8581         * cpu-s390x.md: correct int_xor_imm length
8582
8583 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8584
8585         * generics.2.cs: New test for #77442.
8586
8587         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8588         #77442.
8589
8590 2006-02-02  Martin Baulig  <martin@ximian.com>
8591
8592         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8593         <mono/metadata/mono-debug-debugger.h>   
8594
8595         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8596
8597 2006-02-02  Martin Baulig  <martin@ximian.com>
8598
8599         * debug-debugger.h: New header file for debug-debugger.c.
8600
8601         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8602         function is a separate thread anymore; add support for attaching.
8603
8604 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8605
8606         * tramp-x86.c: Fix a warning.
8607
8608 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8609
8610         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8611         on very large methods.
8612
8613         * aot.c (load_patch_info): Fix a warning.
8614
8615 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8616
8617         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8618         mini-ops.h: alu membase optimizations.
8619
8620 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8621
8622         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8623         to speedup StringBuilder.
8624
8625 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8626
8627         * dominators.c (mono_compute_natural_loops): Fix detection of
8628         loop body start blocks.
8629
8630         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8631
8632 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8633
8634         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8635         #75145.
8636
8637 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8638
8639         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8640
8641 2006-01-25  Martin Baulig  <martin@ximian.com>
8642
8643         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8644         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8645         started to cleanup this file a little bit.
8646
8647 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8648
8649         * mini.c: optimize a codepath frequently happening in generics code.
8650
8651 2006-01-23  Martin Baulig  <martin@ximian.com>
8652
8653         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8654
8655         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8656         functions directly.
8657
8658         * driver.c: debug-debugger.c is only available if
8659         `MONO_DEBUGGER_SUPPORTED' is defined.   
8660
8661 2006-01-23  Martin Baulig  <martin@ximian.com>
8662
8663         * debug-debugger.c: Only enable this on platforms where the Mono
8664         Debugger is working (x86 and x86_64).
8665
8666 2006-01-21  Martin Baulig  <martin@ximian.com>
8667
8668         The Mono Debugger is now using the normal `mono' instead of the
8669         `mono-debugger-mini-wrapper' when executing managed code.
8670
8671         * debug-debugger.c: New file; previously known as
8672         debugger/wrapper/wrapper.c.
8673
8674         * debug-mini.c (mono_init_debugger): Removed.
8675
8676         * driver.c (mono_main): Added new `--inside-mdb' command line
8677         argument which is used when running inside the debugger.
8678
8679 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8680
8681         * liveness.c (mono_analyze_liveness): Remove some unused data
8682         structures.
8683
8684 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8685
8686         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8687
8688 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8689
8690         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8691         depends on implementation details of monobitset.
8692
8693         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8694         Fixes #77271.
8695
8696 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8697
8698         * liveness.c: Update after monobitset changes.
8699
8700 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8701
8702         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8703
8704 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8705
8706         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8707
8708         * mini-s390x.c: Remove warning messages.
8709
8710 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8711
8712         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8713
8714 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8715
8716         * generics.2.cs: Add ldelem/stelem_any test.
8717
8718 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8719
8720         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8721
8722 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8723
8724         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8725         
8726 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8727
8728         * generics.2.cs: Reenable vtype tests.
8729
8730         * inssel-x86.brg: Remove an icorrect valuetype rule.
8731
8732 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8733
8734         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8735         initial support for OP_ABS.
8736
8737 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8738
8739         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8740
8741 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8742
8743         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8744         conversion and implement LADD/LSUB.
8745
8746         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8747         architectures.
8748
8749 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8750
8751         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8752
8753         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8754         architectures.
8755
8756 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8757
8758         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8759         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8760         (stack walk problem).
8761
8762 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8763
8764         * aot.c (mono_aot_load_method): Fix a warning.
8765
8766 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8767
8768         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8769
8770 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8771
8772         * iltests.il: Add test for #77148.
8773
8774         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8775         #77148.
8776
8777 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8778
8779         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8780
8781 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8782
8783         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8784         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8785
8786         * basic-long.cs: Add lconv-to-r4/r8 tests.
8787
8788 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8791
8792         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8793         here as on other archs.
8794
8795 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8796
8797         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8798
8799 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8800
8801         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8802         
8803         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8804
8805         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8806         instrument_prolog; Add memory_barrier instruction.
8807
8808 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8809
8810         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8811
8812 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8813
8814         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8815
8816         * aliasing.c inssel.brg: Fix warnings.
8817
8818         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8819         could skip initialization of some parts of memory.
8820
8821         * mini.c mini-ia64.c: Fix warnings.
8822
8823         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8824
8825 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8826
8827         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8828         a crash seen on sparc.
8829
8830         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8831         
8832         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8833
8834 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8835
8836         * mini-ops.h: Add s390_backchain instruction
8837
8838         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8839
8840         * cpu-s390.md: Add s390_backchain instruction
8841
8842         * mini-s390.c: Significant ABI changes
8843
8844         * mini-s390.h: Cater for zero length structures
8845
8846 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8847
8848         * mini-s390.c: ABI fixes
8849
8850         * inssel-s390.brg: Remove debug statements
8851
8852         * cpu-s390.md: Fix length of ATOMIC_xx operations
8853
8854 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8855
8856         * basic-float.cs: Add float<->long conversion tests.
8857
8858 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8859
8860         * mini-s390.c: Fix LOCALLOC processing.
8861
8862         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8863
8864 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8865
8866         * iltests.il: Add tests for some opcodes not covered by the other
8867         tests.
8868
8869 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8870
8871         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8872         register loading for Tail processing; Correct trace output.
8873
8874         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8875
8876         * cpu-s390.md: Correct size of jmp instruction. 
8877
8878 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8879
8880         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8881
8882 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8883
8884         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8885           Bring s390 up to current level.
8886
8887 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8888
8889         * generics.2.cs: Disable the newly added tests as they do not work yet.
8890         
8891         * generics.2.cs: Add valuetype tests.
8892
8893 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8894
8895         * basic-long.cs: Add i4->u8 test.
8896
8897         * objects.cs: Add tests for JIT intrinsic.
8898
8899         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8900         optimizations lost by a mistake.
8901
8902 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8903
8904         * basic-long.cs: Remove a test moved to objects.cs.
8905
8906         * arrays.cs: Add more array tests.
8907
8908 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8909
8910         * arrays.cs: Add new tests for multi-dimensional arrays.
8911
8912 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8913
8914         * Makefile.am (test_sources2): Add generics.2.cs.
8915         (EXTRA_DIST): Add test_sources2.
8916
8917 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8918
8919         Support for boxing and unboxing nullable types as well as the
8920         isinst operation on nullables, per the CLI ammendment.
8921
8922         * inssel.brg (CEE_ISINST): Special case for nullable
8923
8924         * mini.c (handle_unbox_nullable): new method
8925         (handle_box): Special case for nullable types
8926         (mono_method_to_ir): Call handle_unbox_nullable in correct
8927         places.
8928
8929         * generics.2.cs: New test suite
8930
8931         * Makefile.am: Support for regression tests with generics.
8932
8933 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8934
8935         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8936         allocated to registers. Fixes #76800.
8937
8938 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8939
8940         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8941
8942 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8943
8944         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8945         of platforms.
8946
8947 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8948
8949         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8950         objects.cs.
8951
8952         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8953         
8954         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8955 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8956
8957         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8958         single precision before storing to a single precision location.
8959
8960 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8961
8962         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8963
8964 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8965
8966         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8967         correct files.
8968
8969         * basic.cs: Remove test_0_byte_compares test which was moved to
8970         objects.cs a long time ago.
8971
8972 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8973
8974         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8975
8976 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8977
8978         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8979         handlers are called.
8980
8981         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8982         throwing code.
8983
8984          * mini-ia64.c: Add support for the throw->branch exception 
8985         optimization.   
8986
8987         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8988
8989 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8990
8991         * mini.c: Enabled "fastpath" deadce :-)
8992         
8993 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8994
8995         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8996         alias analysis pass to support it.
8997         * mini.h: Likewise.
8998         * ssa.c: Likewise.
8999         * liveness.c: Likewise (liveness computation can use aliasing
9000         information to be more accurate).
9001         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9002         moreover made so that "--compile-all" uses the given optimization
9003         flags and not the default ones.
9004         * aliasing.c: Alias analysis (new file).
9005         * aliasing.h: Likewise.
9006         * Makefile.am: added "aliasing.c" and "aliasing.h".
9007         
9008 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9009
9010         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9011         OP_L opcodes.
9012
9013 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9014
9015         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9016         fp >= end_of_stack exit condition, as it is not needed, and it might
9017         become true for fp eliminated frames.
9018
9019 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9020
9021         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9022         coded offsets.
9023
9024 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9025
9026         * mini-arm.c: fixed alignment of doubles/longs to match
9027         the C ABI (bug #76635).
9028
9029 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9030
9031         * aot.c: fix compilation with --enable-minimal=aot.
9032
9033 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9034
9035         * mini-arm.c: fixed compatibility with the new
9036         floating point emulator package for compares.
9037
9038 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9039
9040         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9041
9042 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9043
9044         * mini-exceptions.c (print_stack_frame): Output to stderr.
9045         (mono_handle_native_sigsegv): Ditto.
9046
9047 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9048
9049         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9050         OP_LCONV_TO_OVF_I implementation.
9051
9052         * mini-amd64.c: Add support for the throw->branch exception 
9053         optimization.
9054
9055         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9056         when the catch clause catches a more general exception, i.e. Object.
9057
9058 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9059
9060         * cpu-ia64.md: Remove unused opcodes.
9061
9062         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9063         specific defines for architectures defining USE_SIGACTION.
9064
9065         * mini-ia64.c: Fix some warnings.
9066
9067         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9068         version seemed to skip a frame.
9069
9070 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9071
9072         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9073         only calls which are made to native code use this flag.
9074
9075 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9078         varargs methods as well.
9079         
9080         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9081         which have save_lmf set. Reorganize methods prologs a bit.
9082
9083         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9084         debugger to the proper place.
9085
9086 2005-10-29  Martin Baulig  <martin@ximian.com>
9087
9088         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9089         when running inside the debugger until the debugger has support
9090         for it.
9091
9092 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9093
9094         * mini.h: Fix a warning.
9095
9096 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9097
9098         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9099         we expose publicly, this returns the string.
9100
9101 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9102
9103         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9104         with fp elimination.
9105
9106 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9107
9108         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9109         native stacktrace using the glibc 'backtrace' function if available.
9110
9111 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9112
9113         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9114
9115         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9116         handle SIGSEGVs received while in native code.
9117
9118         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9119         code, call mono_handle_native_sigsegv which will abort the runtime
9120         after printing some diagnostics, instead of converting it into a
9121         confusing NullReferenceException.
9122
9123 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9124
9125         * cpu-pentium.md: Remove unused opcodes.
9126
9127 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * mini-amd64.h (MonoLMF): Add rsp field.
9130
9131         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9132         the lmf too.
9133
9134 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9135
9136         * mini-codegen.c (get_register_spilling): Fix some warnings.
9137
9138 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9139
9140         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9141         elimination during exception handling. Enable fp elimination by
9142         default.
9143
9144         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9145         elimination.
9146
9147 2005-10-16  Martin Baulig  <martin@ximian.com>
9148
9149         * mini-exceptions.c
9150         (mono_debugger_run_finally): New public method for the debugger.
9151
9152 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9153
9154         * debug-mini.c (mono_debug_init_method): Fix warning.
9155
9156         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9157         the 'exname' parameter const to fix some warnings.
9158
9159 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9160
9161         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9162         introduced by the previous patch.
9163
9164 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9165
9166         * basic-float.cs: Add test for precision of float arithmetic.
9167
9168         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9169         when loading/storing single values from/to memory.
9170
9171         * mini.c (mono_jit_compile_method_with_opt): Create the function
9172         pointers in the correct domain.
9173
9174 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9175
9176         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9177         introduced by previous patch.
9178         
9179         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9180         when out_filter_idx is NULL.
9181
9182         * mini-exceptions.c: Don't run filter clauses twice during exception
9183         handling. Fixes #75755.
9184
9185 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9186
9187         * aot.c: Add support for ldflda wrappers.
9188
9189         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9190         #75902.
9191
9192 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9193
9194         * mini.c, mini.h: do not consider exception handlers blocks when
9195         setting up interface variables.
9196
9197 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9198
9199         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9200
9201 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9202
9203         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9204         causes a regression.
9205
9206         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9207
9208 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9209
9210         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9211         of the OP_P definitions.
9212
9213         * TODO: Add a proposal for dealing with the CEE/OP mess.
9214
9215         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9216         optimizations from the x86 port.
9217
9218         * cpu-amd64.md: Ditto.
9219
9220         * basic.cs basic-long.cs: Add tests.
9221
9222 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9223
9224         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9225         Patrik Torstensson's implementation of my exception-handling
9226         optimization idea, when the exception object is not used
9227         (bug #62150).
9228
9229 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9230
9231         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9232         of the mul_imm optimizations from the old jit.
9233
9234 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9235
9236         * mini.c, liveness.c: patch by Patrik Torstensson and
9237         Zoltan Varga to improve performance in methods with
9238         exception clauses.
9239
9240 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9241
9242         * driver.c: Remove 'Globalization' entry from --version.
9243
9244 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9245
9246         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9247         there is a profiler interested in JIT events.
9248
9249         * aot.c: Load profile files produced by the AOT profiling module, and
9250         reorder methods based on the profiling info. Add a 'method_order' table
9251         to the AOT file to make mono_aot_find_jit_info work with the reordered
9252         methods.
9253
9254         * mini.h: Bump AOT file version info.
9255
9256 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9257
9258         * mini-arm.h: work around what looks like a gcc bug when optimizations
9259         are enabled.
9260
9261 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9262
9263         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9264         conditionals.  Use ...
9265         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9266
9267 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9268
9269         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9270         to determine the amount of memory to copy when passing valuetypes.
9271
9272         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9273         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9274
9275 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9276
9277         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9278         information about aot.
9279
9280 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9281
9282         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9283         macros. This will allow a deadlock debugger to easily be plugged
9284         in.
9285
9286 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9287
9288         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9289
9290 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9291
9292         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9293         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9294         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9295         ($(arch_built)) [CROSS_COMPILING]: Error out.
9296
9297 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9298
9299         * aot.c: Add support for the no_special_static flag for classes.
9300
9301 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9302
9303         * Reapply reverted patches.
9304
9305         * *: Revert r50174 as well.
9306
9307         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9308
9309 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9310
9311         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9312
9313 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9314
9315         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9316         part of the SIG_HANDLER_SIGNATURE.  
9317
9318 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9319
9320         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9321         statistics.
9322
9323         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9324         introduced by previous patch.
9325
9326 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9327
9328         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9329         saved registers too.
9330
9331         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9332         upon the information returned by get_call_info ().
9333         
9334         * mini-x86.c (add_float): Fix stack size calculation.
9335         (mono_arch_call_opcode): Rewrite this so it works based up the
9336         information returned by get_call_info ().
9337         (mono_arch_get_this_vret_args): Ditto.
9338
9339 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9340
9341         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9342         in cinfo to determine the registers which need to be used.
9343
9344 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9345
9346         * driver.c (mono_main): Add --server and --desktop flags. 
9347
9348 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9349
9350         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9351         registers as global registers.
9352
9353         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9354         longer needed with the new register allocator.
9355
9356         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9357
9358         * cpu-ia64.md: Remove unused opcodes.
9359         
9360         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9361         
9362 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9363
9364         * cpu-amd64.md: Remove unused opcodes.
9365
9366         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9367         needed with the new register allocator.
9368
9369         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9370         reg-reg moves.
9371
9372 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9373
9374         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9375
9376 2005-09-16  Martin Baulig  <martin@ximian.com>
9377
9378         * exceptions-amd64.c
9379         (throw_exception): Don't call mono_debugger_throw_exception() if
9380         we're a rethrow - see the FIXME in the code.
9381
9382 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9383
9384         * mini.c (mono_init_exceptions): This only works on some architectures.
9385         
9386 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9387
9388         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9389         on ia64.
9390
9391         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9392
9393         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9394         now in mini-exceptions.c.
9395
9396 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9397
9398         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9399         now in mini-exceptions.c.
9400
9401 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9402
9403         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9404         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9405
9406         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9407         code into mini-exceptions.c. Add some assertions to it.
9408
9409 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9410
9411         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9412         (<software@solmersa.com>). Fix as errors on windows.
9413
9414 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9415
9416         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9417         method info into the LMF.
9418
9419 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9420         
9421         * mini-ia64.c: Add proper unwind info for method epilogs.
9422
9423         * exceptions-ia64.c: Add some code to help debugging.
9424         
9425         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9426
9427         * mini-exceptions.c: Fix warning.
9428
9429 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9430
9431         * mini.c: Really fix build.
9432
9433         * mini-x86.c mini-amd64.c: Fix build.
9434
9435 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9436
9437         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9438
9439         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9440         some Interlocked methods as intrinsics.
9441
9442         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9443         for Thread methods as well.
9444
9445         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9446
9447         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9448
9449         * mini-ia64.c mini-x86.c mini-amd64.c 
9450         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9451         OP_MEMORY_BARRIER.
9452         
9453         * mini.c (mono_init_exceptions): Fix build breakage.
9454
9455 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9456
9457         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9458         of instructions. Use the new ia64_unw_op macros for emitting unwind
9459         info.
9460
9461         * mini.c (mono_init_exceptions): Initialize exception handling
9462         related trampolines at startup.
9463
9464 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9465
9466         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9467
9468 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9469
9470         * mini.c: Handle type loading errors gracefully during compilation and
9471         throw the appropriate exception.
9472
9473 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9474
9475         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9476         for the mono binary.
9477
9478 2005-09-09  Martin Baulig  <martin@ximian.com>
9479
9480         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9481         the release.
9482
9483 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9484
9485         * mini-arm.h: use emulation for conv.r.un for the release.
9486
9487 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini-arm.c, objects.cs: more fixes and tests for them.
9490
9491 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9492
9493         * mini-arm.c: align structures to at least 4 bytes to be able
9494         to keep our current optimized memcpy.
9495
9496 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9497
9498         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9499
9500 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9501
9502         * mini.c: ignore SIGPIPE.
9503
9504 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9505
9506         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9507
9508         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9509
9510 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9511
9512         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9513
9514 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9515
9516         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9517         exception handling support.
9518         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9519         patch by Brian Koropoff <briank@marakicorp.com>).
9520
9521 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9522
9523         * mini.c: revert another 'optimization' which breaks when
9524         items on the eval stack need to be saved at a basic block end
9525         (bug #75940).
9526
9527 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9528
9529         * jit-icalls.c: for arrays, ensure we always provide
9530         lower bounds.
9531
9532 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9533
9534         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9535         
9536         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9537
9538 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9539
9540         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9541         arguments in their original register.
9542
9543 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9544
9545         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9546         memset/memcpy.
9547
9548         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9549         when ssapre is enabled.
9550
9551         * inssel-long.brg: Fix bug in previous patch.
9552
9553         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9554         multiplication by a constant.
9555
9556 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9557
9558         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9559         icc.
9560
9561         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9562         saving registers.
9563
9564 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9565
9566         * inssel-arm.brg: apply changes tested by Brian Koropoff
9567         <briank@marakicorp.com>.
9568
9569 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9570
9571         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9572         
9573 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9574
9575         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9576         to the same register if dreg is just a base register.
9577         (print_ins): Improve printing of membase opcodes.
9578
9579         * inssel-x86.brg: Add optimized ldind(reg) rules.
9580
9581         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9582
9583 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9584
9585         * mini.c: when running under valgrind, set the stack bottom for
9586         the GC at the actual approximate stack for the app (fixes running
9587         mono with valgrind).
9588
9589 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9590
9591         * mini.c: do no break at the first valuetype to init found
9592         (fixes bug #75791).
9593
9594 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9595
9596         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9597
9598 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9599
9600         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9601
9602 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9603
9604         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9605
9606 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9607
9608         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9609
9610         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9611         code.
9612
9613         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9614         code.
9615
9616         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9617         methods.
9618
9619 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9620
9621         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9622
9623 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9624
9625         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9626         in the tail recursion optimization.
9627
9628         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9629         debug info into the assembly file.
9630
9631         * iltests.il: Add test for filter regions.
9632
9633         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9634         initial stack of filter regions. Fixes #75755.
9635
9636 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9637
9638         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9639         stack requirements.
9640
9641 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9642
9643         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9644         the check for an already compiled method on non-ia64 platforms.
9645         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9646         proper domain.
9647
9648         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9649
9650         * inssel-x86.brg: Add some optimized call rules.
9651
9652 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9653
9654         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9655         method here.
9656
9657         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9658         mono_arch_patch_delegate_trampoline.
9659
9660         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9661
9662         * mini-trampolines.c: Fix build.
9663
9664         * mini-amd64.h: Add delegate trampolines.
9665
9666         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9667
9668         * inssel-amd64.brg: Add optimized call rules.
9669         
9670         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9671
9672         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9673
9674 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9675
9676         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9677         change.
9678
9679         * mini-ia64.c: Remove LMF fixmes.
9680
9681         * mini-ia64.h: Remove most fields from LMF.
9682
9683         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9684
9685         * mini-trampolines.c: Add support for IA64 function descriptors.
9686
9687         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9688         for IA64 function descriptors.
9689
9690 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9691
9692         * tramp-arm.c: patch the vtable for virtual calls. Added
9693         support code to register/unregister the LMF.
9694         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9695         more LMF work.
9696
9697 2005-08-19  Dick Porter  <dick@ximian.com>
9698
9699         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9700         bit value if needed.
9701
9702 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9703
9704         * mini.c (mini_get_method): Move handling of wrapper data here.
9705
9706         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9707
9708         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9709         virtual.
9710
9711         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9712         bblock->code does not remain empty.
9713
9714 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9715
9716         * arrays.cs: Add regression test for #75832.
9717
9718         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9719         rules. Fixes #75832.
9720
9721         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9722         instruction scheduling.
9723
9724 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9725
9726         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9727
9728 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9729
9730         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9731
9732         * mini-codegen.c: Fix VC build.
9733
9734         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9735
9736 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9737
9738         * mini.h: fix signature for mono_register_opcode_emulation.
9739
9740 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9741
9742         * mini.c: Get rid of most of the helper_sig_... constants using
9743         mono_create_icall_signature ().
9744
9745 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9746
9747         * jit-icalls.c (helper_ldstr): New helper function.
9748
9749         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9750
9751         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9752         throw, load the string using a helper call instead of creating a string object.
9753
9754         * aot.c: Update after LDSTR changes.
9755
9756         * mini.h: Bump AOT file version.
9757         
9758         * aot.c: Save class size info into the AOT file. Print more statistics during
9759         compilation.
9760
9761         * mini.h: Bump AOT file version.
9762
9763         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9764         ordering of disasm cases. Fixes #74957.
9765
9766 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9767
9768         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9769         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9770         the generic code needed for the ARM port.
9771
9772 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9773
9774         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9775         inssel-arm.brg: more ARM features and fixes.
9776
9777 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9778
9779         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9780         ARM port work in progress.
9781
9782 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9783
9784         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9785
9786         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9787
9788         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9789
9790         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9791
9792         * *-ia64.*: Ongoing IA64 work.
9793         
9794         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9795
9796 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9797
9798         * TODO: Remove out-of-data todo stuff.
9799
9800         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9801         dead code.
9802
9803         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9804
9805         * mini.h: Bump corlib version.
9806
9807 2005-07-27  Martin Baulig  <martin@ximian.com>
9808
9809         * mini-codegen.c
9810         (create_copy_ins): Added `const unsigned char *ip' argument; set
9811         `copy->cil_code' from it.
9812
9813 2005-07-27  Martin Baulig  <martin@ximian.com>
9814
9815         * mini-exceptions.c (mono_handle_exception): Don't call
9816         mono_debugger_handle_exception() for filters.
9817
9818 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9819
9820         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9821         as well.
9822
9823 2005-07-26  Martin Baulig  <martin@ximian.com>
9824
9825         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9826
9827         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9828         helper_compile_generic_method() if the method is actually virtual
9829         and non-final.
9830
9831 2005-07-26  Martin Baulig  <martin@ximian.com>
9832
9833         * mini.c
9834         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9835         public; this is now accessed directly by the debugger.
9836         (mono_generic_trampoline_code): Removed.
9837
9838         * debug-mini.c
9839         (mono_debug_init_method): Also add interncalls and wrappers.
9840
9841 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9844
9845 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9846
9847         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9848
9849 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9850
9851         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9852
9853 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9854
9855         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9856         getting TLS offsets on AMD64 too.
9857
9858 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9859
9860         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9861
9862 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9863
9864         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9865         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9866
9867 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9868
9869         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9870
9871         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9872         to mini.c.
9873
9874         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9875         mono_sparc_is_virtual_call ().
9876         
9877         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9878
9879         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9880         trampoline parameters.
9881
9882         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9883         
9884         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9885         to mono_arch_get_vcall_slot_addr.
9886
9887         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9888         trampoline code.
9889
9890         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9891
9892 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9893
9894         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9895
9896 2005-07-19  Martin Baulig  <martin@ximian.com>
9897
9898         * exceptions-amd64.c (throw_exception): Call
9899         mono_debugger_throw_exception() here like we're doing it on i386.
9900
9901 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * mini-ia64.c: Add optimized TLS access support.
9904
9905 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9906
9907         * mini-exceptions.c: Ongoing IA64 work.
9908
9909         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9910
9911         * mini.c: Use the default optimization set when embedding. Fixes
9912         #75194.
9913
9914 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9915
9916         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9917         of trampolines to a separate file.
9918
9919         * mini-trampolines.c: New file.
9920
9921         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9922         separate file.
9923         
9924         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9925         amd64/ia64 code.
9926
9927         * mini-codegen.c: Fix cygwin build.
9928
9929 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9930
9931         * mini.c: Add some minor changes needed by the IA64 port.
9932
9933         * *-ia64.*: Ongoing IA64 work.
9934
9935 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9938         trampolines into arch-independent and arch-dependent parts.
9939
9940         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9941
9942 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9943
9944         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9945
9946         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9947         the xp-regalloc-branch for amd64.
9948
9949         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9950         xp-regalloc-branch for x86.
9951
9952 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9953
9954         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9955
9956 2005-07-06  Martin Baulig  <martin@ximian.com>
9957
9958         * mini.c
9959         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9960         (mono_jit_runtime_invoke): Likewise.
9961
9962 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9965         on x86 too.
9966         
9967         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9968         without loading their metadata. Reorganize the file format so exception handling+
9969         debug info is kept separate from normal method info. Create MonoJitInfo 
9970         structures for methods lazily.
9971
9972         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9973         loading metadata.
9974         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9975
9976         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9977
9978         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9979         in AOT code.
9980
9981         * mini.h: Bump AOT file version.
9982
9983 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9984
9985         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9986
9987 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9988
9989         * Makefile.am (check-local): Call semdel-wrapper.
9990
9991 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9992
9993         * mini-x86.c: Revert the last change as it seems to break the build..
9994
9995 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9996
9997         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9998         
9999         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10000
10001 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10002
10003         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10004         outside of the macro, so strange stuff doesn't happen with gcc4
10005         (NEW_AOTCONST_TOKEN): Likewise.
10006
10007 2005-06-28  Martin Baulig  <martin@ximian.com>
10008
10009         * mini.c (mini_class_is_system_array): New static method; use this
10010         instead of `klass->parent == mono_defaults.array_class' everywhere
10011         since this also works for the new generic array class.
10012
10013 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10014
10015         * inssel.brg: Remove warnings.
10016
10017 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10018
10019         * mini-ia64.c: Ongoing IA64 work.
10020
10021         * basic-float.cs: Add float->i1 conversion test.
10022
10023         * iltests.il: Add conv.u4 test.
10024
10025 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10026
10027         * inssel-long.brg: Fix bug caused by last change.
10028
10029 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10030
10031         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10032         BSDs.  Allows the x86 JIT to work on OSX86
10033
10034 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10035
10036         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10037         u4->i8 conversion.
10038
10039         * mini-ia64.c: Ongoing IA64 work.
10040
10041 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10042
10043         * mini-ia64.c: Ongoing IA64 work.
10044
10045         * driver.c: Clean up jit_code_hash as well when using --regression.
10046
10047         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10048
10049         * basic-long.cs: Add tests for long->u4 conversion.
10050
10051 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10052
10053         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10054         that we do not depend on undefined C behavior: the order stuff
10055         gets evaluated within an expression. Fixes mono when compiled on
10056         GCC 4.
10057
10058 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10059
10060         * *-ia64.*: Ongoing IA64 work.
10061
10062         * aot.c: Lower memory usage while loading AOT methods.
10063
10064         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10065
10066         * mini.h: Bump AOT file format version.
10067
10068 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10069
10070         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10071
10072 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10073
10074         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10075         not on callee assembly). Fixed some comments.
10076
10077 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10078
10079         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10080         it gets proper disassembly.
10081         (emit_method_info): Remove some dead code.
10082
10083         * mini.c (mini_method_compile): Allways allocate the GOT var in
10084         mono_method_to_ir for emulating opcodes.
10085
10086 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10089         before freeing the code memory. Fixes #74990.
10090
10091         * objects.cs: Add regression test for #74992.
10092
10093         * liveness.c: Extend live ranges of arguments to the beginning of the
10094         method. Fixes #74992.
10095
10096         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10097         so it points into the faulting instruction.
10098
10099 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10102
10103         * *-ia64.*: Ongoing IA64 work.
10104
10105         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10106
10107 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10108
10109         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10110
10111         * *-ia64.*: Ongoing IA64 work.
10112
10113 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * basic-long.cs: Add tests for add/sub.ovf.
10116
10117         * basic.cs: Add tests for sub.ovf.
10118
10119         * *-ia64.*: Ongoing IA64 work.
10120
10121 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10122
10123         * *-ia64.*: Ongoing IA64 work.
10124
10125         * basic.cs: Add conv.ovf.i4.un test.
10126
10127 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10128
10129         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10130         
10131 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10132
10133         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10134
10135 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10136
10137         * *-ia64.*: Ongoing IA64 work.
10138
10139 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10140
10141         * trace.[ch]:
10142         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10143
10144 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10145
10146         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10147
10148 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10149
10150         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10151
10152         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10153         of a call is callable by a near call.
10154
10155 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini-ia64.c: Ongoing IA64 work.
10158
10159 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10160
10161         * genmdesc.c: Make the generated array non-static.
10162
10163         * inssel-long.brg: Fix LSHR_IMM rule.
10164
10165         * *-ia64.*: Ongoing IA64 work.
10166
10167         * *-ia64.*: Ongoing IA64 work.
10168
10169 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10170
10171         * *-ia64.*: Ongoing IA64 work.
10172
10173         * *-ia64.*: Ongoing IA64 work.
10174         
10175         * mini-ia64.c: Ongoing IA64 work.
10176
10177         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10178
10179 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10180
10181         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10182         
10183         * objects.cs basic-long.cs: Move some tests to objects.cs.
10184
10185 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10186
10187         * *-ia64.*: Ongoing IA64 work.
10188
10189         * iltests.il: Add a new test.
10190
10191         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10192         newobj. Fixes #75042.
10193
10194 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10195
10196         * *-ia64.*: Ongoing IA64 work.
10197         
10198         * *-ia64.*: Ongoing IA64 work.
10199         
10200         * *-ia64.*: Ongoing IA64 work.
10201
10202         * basic.cs objects.cs: Move tests accessing static variables as well.
10203
10204         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10205
10206 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10207
10208         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10209
10210         * driver.c: Always print failed tests.
10211
10212         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10213         frame pointer.
10214
10215         * *ia64*: Ongoing IA64 work.
10216
10217 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10218
10219         * basic.cs: Add tests for add.ovf. Fix warnings.
10220
10221 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10222
10223         * driver.c (mono_main): Avoid crash if no argument is passed to
10224         --break;  Do not use g_error, but f_printf.   And fix all other
10225         ocurrences of the same crash.
10226
10227 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10228
10229         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10230         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10231         Fixes #74742.
10232
10233 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10234
10235         * *-ia64.*: Add beginnings of IA64 backend.
10236
10237         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10238
10239 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10240
10241         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10242         Fixes #74925.
10243
10244         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10245
10246         * mini-amd64.c: Fix a warning.
10247
10248 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10249
10250         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10251         in float_neg. Fixes #74897.
10252
10253         * mini-amd64.c (emit_call): Fix another near call bug.
10254
10255 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10256
10257         * declsec.c: Keep the appdomain information in the structure. Added a 
10258         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10259         value gets overwritten).
10260         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10261         an MonoAppDomain member to MonoSecurityFrame.
10262         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10263         used in the stack walk. Now use a MonoArray which grow (double) when
10264         it gets full.
10265
10266 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10267
10268         * mini.c: Re-enabled runtime cleanup, since running threads should
10269         now properly stop when exiting.
10270
10271 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10272
10273         * mini-codegen.c: New file contaning the arch-independent local
10274         register allocator. Not used by any architectures yet.
10275
10276         * mini.h linear-scan.c: Merge some changes from the 
10277         mini-xp-local-regalloc branch.
10278
10279 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10280
10281         * mini-amd64.c (emit_call): Fix calls to native functions when the
10282         runtime is compiled as a shared library. Fixes #74756.
10283
10284         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10285         on a literal field. Fixes #74751.
10286
10287 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10288
10289         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10290
10291 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10292
10293         * objects.cs: Add missing null casting test.
10294
10295 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10296
10297         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10298         in wrapper methods. Also rename 'address' variable to 'offset'.
10299
10300 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10301
10302         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10303         warnings.
10304         
10305         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10306
10307         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10308         work on windows.
10309
10310 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10311
10312         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10313
10314 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10315
10316         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10317         just the last bytes.
10318
10319 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10320
10321         * aot.c (mono_compile_assembly): Fix warning.
10322
10323         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10324         by the _MSC_VER stuff.
10325
10326 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10327
10328         * inssel-long.brg: Fix #74588.
10329
10330         * cpu-amd64.md: Fix #74591.
10331
10332         * iltests.il: Add new regression tests.
10333
10334 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10335
10336         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10337         valuetype.
10338
10339 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10340
10341         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10342
10343         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10344         from Bill Middleton <flashdict@gmail.com>.
10345
10346 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10347
10348         * arrays.cs: Add new regression test. Fix warnings.
10349
10350 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10351
10352         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10353         and leakage in CKFINITE.
10354
10355         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10356         this to a null op since it is called on amd64 too.
10357
10358         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10359
10360         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10361         body since this is not used on amd64.
10362         
10363         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10364
10365         * mini-amd64.c: Remove obsolete fixmes.
10366
10367         * mini.c (print_method_from_ip): Fix debugging support.
10368
10369 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10370
10371         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10372         so that expressions that don't give much gain are not reduced.
10373         * ssapre.h: Likewise.
10374
10375 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10376
10377         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10378
10379         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10380
10381         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10382
10383 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10384
10385         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10386
10387         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10388
10389 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10390
10391         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10392         stack touching.
10393
10394         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10395
10396         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10397
10398         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10399
10400         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10401         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10402
10403         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10404
10405         * mini-x86.c: Fix up stack overflow handling.   
10406
10407         * exceptions.cs: Add new regression test.
10408
10409 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10410
10411         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10412         mono_jit_thread_attach.
10413
10414         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10415
10416 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10417
10418         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10419         avoid calling constructors using callvirt.
10420
10421         * inssel.brg: Fix #74073.
10422
10423 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10424
10425         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10426         compilation with non-GCC compilers.
10427         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10428         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10429
10430 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10431
10432         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10433         klass->interface_offsets (will likely fix bug#74073).
10434
10435 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10436
10437         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10438
10439 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10440
10441         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10442         to amd64_div_reg_size ().
10443         
10444         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10445
10446 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10449
10450 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10451
10452         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10453
10454 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10455
10456         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10457         
10458         * mini.c (mono_precompile_assembly): Load and precompile referenced
10459         assemblies as well. Fixes #74015.
10460
10461 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10462
10463         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10464
10465 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10466
10467         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10468         a lot of checks and (anyway) permissions cannot work until corlib is 
10469         loaded.
10470
10471 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10472
10473         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10474
10475 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10476
10477         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10478         calls (fixes bug#72824).
10479
10480 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10481
10482         * mini.c: fix tail recursion elimination (see test in bug#73936).
10483
10484 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10485
10486         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10487         some fp functions in sse2 mode.
10488
10489 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10492
10493 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10494
10495         * mini.h mini.c: Add mono_get_jit_tls_key ().
10496
10497         * mini-x86.c: Enable fast TLS support on windows.
10498
10499 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10500
10501         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10502         * mini.c: Check for p/invoke method when generating code. If a
10503         p/invoke method, or it's class, isn't decorated with [Suppress
10504         UnmanagedCodeSecurity] then generate code to call System.Security.
10505         UnmanagedDemand (only if the security manager is active).
10506
10507 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10508
10509         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10510         last change as it seems to cause strange crashes.
10511         
10512 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10513
10514         * *.c: handle unsafe function pointers where needed.
10515
10516 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10517
10518         * mini.c (mono_jit_free_method): Remove the fixme too.
10519
10520 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10521
10522         * mini.c: As discussed, make the code actually free the delegate
10523         thunk now, to enable the debugging of delegate problems, use
10524         MONO_DEBUG=1 when running Mono. 
10525
10526         This takes also care of parts of the leaks as seen by Joe.
10527
10528 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10531         thread_tls_offset calculation.
10532
10533 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10534
10535         * declsec.c: Reworked linkdemand checks for icall. The previous code
10536         was using the declaration code (untrusted) and didn't work as expected
10537         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10538         specific case.
10539
10540 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10541
10542         * iltests.il: Add new localloc test.
10543
10544         * mini-amd64.c: Handle large stack allocations the same way as on
10545         windows if stack overflow handling is working.
10546         
10547         * mini-amd64.c: Allocate the signal stack using mmap.
10548
10549         * mini.c (sigsegv_signal_handler): Fix reading of context.
10550
10551         * mini-exceptions.c: Fix up stack overflow handling.
10552
10553         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10554
10555         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10556
10557         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10558
10559         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10560
10561         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10562         tramp_init functions as they are no longer needed.
10563
10564 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10565
10566         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10567         
10568         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10569
10570         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10571         
10572         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10573         support that now.
10574
10575         * mini-ops.h: Add OP_LMUL_IMM.
10576
10577         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10578         long mul/div opcodes as intrinsic.
10579
10580         * mini-amd64.c (emit_call): Handle the case when the callee might be
10581         an AOT method.
10582
10583 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10584
10585         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10586         extra safe.
10587         
10588         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10589
10590         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10591
10592 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10593
10594         * mini.c (mono_codegen): Don't leak here, to help people running
10595         monogrind.
10596
10597 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10598
10599         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10600         conversions in sse2 mode.
10601
10602         * basic-float.cs: Add regression test.
10603         
10604         * mini-amd64.c: Reenable sse2.
10605
10606 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10607
10608         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10609
10610 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10611
10612         * driver.c: Copyright text should include 2005.
10613         
10614 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10615
10616         * cpu-amd64.md (load_membase): Fix more max lengths.
10617
10618 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * cpu-amd64.md (load_membase): Fix max length.
10621
10622         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10623
10624         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10625
10626         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10627         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10628
10629         * basic-float.cs: Add rounding regression test.
10630
10631         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10632
10633 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10634
10635         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10636         structures in registers for pinvoke wrappers.
10637
10638 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10639
10640         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10641
10642 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10643
10644         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10645         wrapper to mono_jit_thread_attach.
10646
10647         * mini.c (mini_jit_thread_attach): New jit icall.
10648
10649         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10650         native->managed wrappers.
10651
10652         * exceptions.cs: Add new regression test.
10653
10654         * mini.c (optimize_branches): Check regions in the cbranch to throw
10655         block case as well. Fixes #73242.
10656
10657 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10658
10659         * mini.c: thread safety fixes.
10660
10661 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10662
10663         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10664         patching stuff, since delegates use jump trampolines so there is
10665         no caller.
10666
10667         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10668         jump trampolines.
10669         
10670         * tramp-amd64.c: Fix build.
10671
10672         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10673         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10674
10675         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10676         Rename this to mono_arch....
10677         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10678
10679         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10680
10681         * mini-amd64.c (emit_call): If both the caller and the callee is
10682         guaranteed to have 32 bit addresses, emit a normal call.
10683
10684         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10685
10686         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10687         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10688         method_ptr inside delegates.
10689
10690 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10693         invalidated. Fixes #73001.
10694
10695         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10696
10697         * mini-x86.c: Only use stdcall for pinvokes on windows.
10698
10699 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10700
10701         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10702         * mini-x86.c: remove unreliable __thread var offset detection,
10703         use the correct accessors and enable by default.
10704
10705 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10706
10707         * mini.c (mono_jit_free_method): Fix memory leak.
10708
10709 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10710
10711         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10712
10713 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10714
10715         * cpu-amd64.md: Fix lengths of atomic opcodes.
10716
10717 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10718
10719         * driver.c: try to not imply using ICU is any good.
10720
10721 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10722
10723         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10724         functions as inline ops.
10725
10726         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10727         some Interlocked functions as inline ops.
10728
10729         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10730
10731         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10732
10733         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10734
10735         * mini.c: Add support for OP_NOT_TAKEN.
10736
10737         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10738         structures in registers for pinvoke wrappers.
10739
10740         * mini-amd64.c: Fix warnings.
10741
10742 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10743
10744         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10745
10746         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10747
10748         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10749         address instead of loading the address from it.
10750
10751         * mini-x86.c: Add support for returning small structs in registers
10752         on Win32. Fixes part of #70864.
10753         
10754 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10755
10756         * trace.c (get_token): Improve error checking.
10757
10758 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10759
10760         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10761
10762 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10763  
10764         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10765         it can be reused for MonoClass.
10766         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10767         _LINKDEMAND.
10768
10769 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10770
10771         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10772         instead of a MonoReflectionMethod. The method information wasn't used
10773         when displaying SecurityException details (but will be now).
10774
10775 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10776
10777         * Makefile.am : windows build fix.
10778
10779 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10780
10781         * iltests.il: Add new regression test.
10782
10783         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10784         #72522.
10785
10786 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10787  
10788         * mini.c: Moved linkdemand check into helper function check_linkdemand
10789         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10790         LDFTN, LDVIRTFTN).
10791
10792 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10793
10794         * declsec.c: Added statistics counter for different kinds of 
10795         LinkDemands.
10796         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10797         (and commented) declaration.
10798         * mini.c: Added statistics counter for security Demand code 
10799         generation. Added display of security statistics.
10800
10801 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10802
10803         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10804         Fix compilation errors under gcc-2.95.
10805
10806 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10807
10808         * mini.c, driver.c: Use the new jit trampoline hashtable
10809
10810 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10811
10812         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10813
10814 2005-02-11  Martin Baulig  <martin@ximian.com>
10815
10816         * debug-mini.c (mono_debug_close_method): Free the line number array.
10817
10818 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10819
10820         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10821         icalls.
10822
10823         * mini.h: Bump AOT file format version. 
10824
10825 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10826
10827         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10828         APTC and P/Invoke.
10829         * declsec.h: Added macros to get/set lazyly initialized security 
10830         informations about assemblies. Added new enum for different type of
10831         possible LinkDemand violation. Added function to check LinkDemands.
10832         * mini.h: Added a field to MonoCompile to hold any security violation
10833         detected when JITting a method (so it can be thrown later).
10834         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10835         and CEE_CALLVIRT. Added code to throw exception at the end of
10836         mini_method_compile (note: the exception is unhandled right now).
10837
10838 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10839
10840         * mini.c, jit-icalls.c: use the managed implementation of
10841         memset for initobj and memset, to avoid managed <-> unmanaged
10842         transitions.
10843
10844 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10845
10846         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10847         optimization if it would need a GOT var.
10848
10849         * basic.cs: Add tests for constant propagation and switch statements.
10850
10851         * ssa.c: Fix out-of-range constant propagation and switch statements.
10852
10853 2005-02-09    <vargaz@freemail.hu>
10854
10855         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10856
10857 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10858
10859         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10860
10861 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10862
10863         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10864
10865 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10866
10867         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10868         arithmetic operations.
10869
10870 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10871
10872         * mini-ppc.c: add a workaround for broken user code that
10873         DllImports vararg functions with non-vararg signatures.
10874
10875 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10876
10877         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10878         meaningfull error message for assemblies written in Managed C++.
10879
10880         * tramp-amd64.c mini-amd64.h: Add support for 
10881         create_trampoline_from_token ().
10882
10883         * aot.c mini-x86.c abcremoval.c: Applied patch from
10884         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10885
10886 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10887
10888         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10889         which takes a MonoImage/token as parameter instead of a MonoMethod.
10890
10891         * aot.c: Use the new trampoline for initializing vtables.
10892
10893         * aot.c: Add support for ldfld/stfld_remote wrappers.
10894
10895         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10896         rules for compare <MEM>, IMM.
10897
10898         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10899
10900         * aot.c: Handle inherited finalizers correctly.
10901
10902 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10903
10904         * inssel.brg (stmt): Add a missing _setup_... ().
10905
10906         * aot.c: Save some parts of the class state to the AOT file and use it
10907         to recompute that state when a class is initialized.
10908
10909         * mini.c: Install AOT hooks into the runtime.
10910
10911         * mini.h: Bump AOT file format version.
10912         
10913         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10914         Fixes #72148.
10915
10916         * iltests.il: Add new test.
10917
10918 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10919
10920         * mini.c: fix typo.
10921
10922 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10923
10924         * mini.c: setup the statistical profiler in the thread attach
10925         callback to cope with the new single thread code.
10926
10927 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10928
10929         * mini-ppc.c: ensure we have enough room for the profiler
10930         calls (fixed bug#72084).
10931
10932 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10933
10934         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10935         it.
10936
10937 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10938
10939         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10940
10941 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10942
10943         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10944         to succesfully execute parrotbench).
10945         * ssapre.h: Likewise.
10946
10947 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10948
10949         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10950         variable for stores to method arguments (fixes a SSAPRE issue).
10951
10952 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10953
10954         * mini.c: handle value types in dup, fixes gen-112.cs.
10955
10956 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10957
10958         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10959         sequence for calls in dynamic methods to avoid thunks.
10960
10961 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10962
10963         * mini.c: correctly remove dynamic methods from the hashtable.
10964
10965 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10966
10967         * driver.c: Disabled SSAPRE until fix the bug that appears
10968         in IronPython's parrotbench.
10969
10970 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10971
10972         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10973
10974         * mini.c (mono_method_to_ir): Revert the previous change.
10975         
10976         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10977         when AOT compiling.
10978
10979         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10980         mono_jit_info_table_find () etc. when running under valgrind.
10981
10982         * inssel.brg: Fix warnings.
10983
10984         * mini-exceptions.c: Fix warnings.
10985
10986 2005-01-31  Martin Baulig  <martin@ximian.com>
10987
10988         * driver.c (compile_all_methods_thread_main): Don't try to compile
10989         generic methods or anything which has type parameters.
10990
10991 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10992
10993         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10994
10995         * TestDriver.cs: Add --verbose flags.
10996
10997         * graph.c ssa.c: Fix 64 bit warnings.
10998         
10999         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11000         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11001         Fix 64 bit warnings.
11002
11003         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11004         variable not spotted by gcc.
11005         
11006         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11007         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11008         X86_COMPARE_MEMBASE opcodes.
11009
11010         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11011
11012 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11013
11014         * *: MonoMethod->signature might be NULL now. You *MUST* use
11015         mono_method_signature.
11016
11017 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11018
11019         * driver.c (compile_all_methods_thread_main): Compile the methods
11020         without invoking cctors.
11021
11022 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11023
11024         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11025         * basic-calls.cs: test for the above.
11026
11027 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11028
11029         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11030         MonoJitInfo changes.
11031
11032 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11035         eagerly if it contains dynamic methods.
11036         
11037         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11038
11039         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11040         trace, it is now computed by an icall from trace_ips.
11041         
11042         * mini-exceptions.c: Fix a warning.
11043
11044 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11045
11046         * mini-exceptions.c: don't bother getting stack trace info if
11047         it's not going to be used.
11048
11049 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11050
11051         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11052         ssapre-mini-ops.h.
11053
11054 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11055
11056         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11057
11058         * aot.c: Avoid calling mono_method_get_header () if not needed.
11059
11060         * mini.h: Bump AOT file format version.
11061         
11062         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11063
11064         * mini.c (mono_print_tree): Print more info for calls.
11065
11066 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11067
11068         * declsec.h: Remove warning by adding missing include for marshal.h
11069
11070 2005-01-26  Martin Baulig  <martin@ximian.com>
11071
11072         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11073         `ip' twice.
11074
11075 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11076
11077         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11078         flags.
11079
11080         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11081
11082         * aot.c (mono_compile_assembly): Fix a warning.
11083
11084 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11085
11086         * declsec.c: Look for security attributes on the original MonoMethod 
11087         (and not the wrapped one). This fix permissions on icalls.
11088
11089 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11090
11091         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11092
11093         * mini.c (mono_allocate_stack_slots): Add a fixme.
11094
11095         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11096
11097 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11098
11099         * inssel.brg: optimize casts of sealed types (more
11100         optimizations waiting for fixes in remoting).
11101
11102 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11103
11104         * inssel.brg (stmt): Add another dummy rule.
11105
11106         * driver.c: Fix warnings.
11107
11108         * driver.c (mono_main): If running under valgrind, instruct glib to use
11109         the system allocation functions so valgrind can track the memory
11110         allocated by the g_... functions.
11111
11112         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11113
11114         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11115
11116         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11117
11118         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11119         variables in try regions.
11120
11121         * mini.c (mini_method_compile): Don't disable optimizations on large
11122         methods when AOT compiling.
11123
11124         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11125         allocate stack slots. Not yet used.
11126
11127 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11128
11129         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11130
11131 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11132
11133         * mini-ppc.c: make the branch info relative as the code
11134         buffer can be reallocated.
11135
11136 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11137
11138         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11139         * driver.c: Removed the AOT/security restriction. Now initialize the
11140         security manager (in metadata) if --security is used.
11141         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11142         rather than the pointer to declarative security, when AOT is used.
11143
11144 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11145
11146         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11147         basic blocks, reduced intrinsic exception throwing code size.
11148
11149 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11150
11151         * driver.c (mini_usage): Reorder the usage screen.
11152
11153 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11154
11155         * mini.c (mono_resolve_patch_target): Fix warning.
11156
11157 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11160         previous patch.
11161
11162         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11163
11164         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11165         breaks the amd64 build.
11166
11167         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11168         register allocation. Fixes #71454.
11169
11170         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11171
11172         * arrays.cs: Add new regression test.   
11173
11174 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11175
11176         * ssapre.c: Turned usage of snprintf to GString.
11177         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11178         (I left it on by mistake in my previous commit).
11179
11180 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11181
11182         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11183         on cond branch optimization (fixes bug# 71515).
11184
11185 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11186
11187         * abcremoval.c: Fixed bug 71062.
11188         * abcremoval.h: Likewise.
11189
11190 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11191
11192         * mini.c: Added a new functionality to optimize_branches, the removal
11193         of useless basic blocks, and fixed some problem in the removal of
11194         critical edges; some utility functions added for both purposes.
11195         * ssapre.c: Added complex expression support, and fixed bug 70637.
11196         * ssapre.h: Likewise.
11197         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11198         enabled in SSAPRE.
11199         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11200         * driver.c: Re-enabled SSAPRE.
11201
11202 2005-01-19  Martin Baulig  <martin@ximian.com>
11203
11204         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11205         the result of mono_get_method_constrained().
11206
11207 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11208
11209         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11210         manager.
11211
11212 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11213
11214         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11215         be detected.  Fixes #59296.
11216
11217 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11218
11219         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11220         which can happen. Fixes #71361.
11221
11222 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11223
11224         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11225         manager.
11226
11227 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11228
11229         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11230         appdomain-unload.exe to fail.
11231         
11232         * mini.c: Fix some memory leaks.
11233
11234 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11235
11236         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11237         Fixed bug and sped up some codepaths.
11238
11239 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11240
11241         * mini.c: Fix some memory leaks.
11242
11243         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11244         conversion.
11245
11246         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11247
11248         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11249         #71320.
11250
11251         * iltests.il: Add regression test for #71320.
11252
11253 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11254
11255         * mini.c (mono_codegen): Fix installation of profiler hooks.
11256
11257         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11258
11259 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11260
11261         * mini.h, mini.c, cfold.c: optimize access to enum
11262         readonly fields, too. Eval conditional branches if possible
11263         to perform unreachable code removal in more cases.
11264
11265 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11266
11267         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11268
11269         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11270         code manager.
11271
11272         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11273         WinXP DEP. Fixes #71244.
11274
11275 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11276
11277         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11278
11279 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11282
11283 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11284
11285         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11286         changes.
11287
11288         * mini.h: Bump AOT version.
11289
11290         * mini.h (MonoCompile): Change exvar to a hash table.
11291
11292         * mini.c: Allocate a separate exvar for each handler block.
11293
11294         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11295
11296         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11297         ex var with the pending exception and only throw if the two are equal.
11298         Fixes #68552.
11299         
11300         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11301
11302         * mini-x86.c: Fix warnings.
11303
11304         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11305         used by all the ports now.
11306
11307         * aot.c: Add write-symbols and save-temps options.
11308
11309 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11310
11311         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11312
11313 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11314
11315         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11316         operations.
11317
11318         * tramp-s390.c: Check vtable slot belongs to the domain.
11319
11320         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11321         as per other platforms.
11322
11323         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11324
11325 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11326
11327         * driver.c: we don't run the Main() code in a subthread anymore.
11328
11329 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11330
11331         * mini.c: added experimental rtc support in the statistical
11332         profiler: if the user has the permission, more accurate statistics
11333         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11334         The MONO_RTC value must be restricted to what the linux rtc allows:
11335         power of two from 64 to 8192 Hz.
11336
11337 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11338
11339         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11340
11341 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11342
11343         * mini-ppc.c: better icache flush for smp.
11344
11345 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11346
11347         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11348
11349         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11350         amd64 port, not yet used.
11351
11352 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11353
11354         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11355         a struct type.
11356
11357 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11358
11359         * driver.c: Added --security option to activate the security manager.
11360         Right now this will allow code generation for declarative demands and
11361         is disabled when AOT is specified.
11362         * mini.c: Add code generation for declarative security demands.
11363         * mini.h: Add mono_use_security_manager as an extern gboolean.
11364
11365 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11366
11367         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11368         emitting more dense assembly code.
11369
11370         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11371         exception throwing stuff.
11372
11373 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11374
11375         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11376         dead code.
11377
11378         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11379         left in by mistake.
11380
11381         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11382         fixed.
11383
11384         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11385
11386         * tramp-*.c: Only patch vtable slots if the object is in the current
11387         domain. Fixes appdomain-unload.exe.
11388
11389         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11390         
11391         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11392         x86 branch.
11393
11394 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11395
11396         * mini.c (reverse_branch_op): New helper function.
11397
11398         * mini.c (optimize_branches): Run the new optimization only on 
11399         platforms which support it. Also reverse all kinds of branches.
11400
11401         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11402
11403         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11404         a throw statement.
11405
11406         * mini.c (optimize_branches): Reverse not-equals branches if the false
11407         bblock is a throw. This happens a lot of time with argument checking in
11408         corlib.
11409
11410         * mini.c (mono_codegen): Add support for placing basic blocks after
11411         the function epilogue.
11412
11413         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11414         function epilogue.
11415         
11416 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11417
11418         * mini.c (setup_stat_profiler): Only set this up if the platform
11419         supports ITIMER_PROF.
11420
11421 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11422
11423         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11424         previous patch.
11425
11426         * inssel.brg: Fix a warning.
11427
11428 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11429
11430         * mini.c: added support for statistical profiler 
11431         (run with: --profile=default:stat).
11432
11433 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11434
11435         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11436
11437         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11438
11439         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11440         related to global registers from the amd64 port.
11441
11442 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11443
11444         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11445
11446         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11447         with global registers.
11448         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11449
11450         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11451
11452 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11453
11454         * debug-mini.c (encode_value): Fix off-by-one.
11455
11456         * aot.c (encode_value): Likewise.
11457
11458         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11459
11460 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11461
11462         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11463         AOT.
11464
11465         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11466         
11467         * aot.c (emit_method_info): Increase size of temp buffer.
11468
11469         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11470         the AOT case.
11471
11472 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11473
11474         * aot.c (emit_method_info): Fix build.
11475         
11476         * aot.c: Further rework of the AOT file format to reduce the size of
11477         the method info data.
11478
11479         * mini.h: Bump AOT file format version.
11480
11481 2004-12-27  Martin Baulig  <martin@ximian.com>
11482
11483         * mini.c (mini_get_method): New static method; call
11484         mono_get_method_full() and mono_get_inflated_method().
11485         (mono_method_to_ir): Use mini_get_method() instead of
11486         mono_get_method_full(). 
11487
11488 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11489
11490         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11491
11492 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11493
11494         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11495
11496         * inssel-amd64.brg: Add some optimization rules.
11497
11498 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11499
11500         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11501         standard not GC'd stuff is fine.
11502
11503 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11504
11505         * aot.c: Rework the AOT file format to get rid of most of the global
11506         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11507
11508         * mini.h: Bump AOT file format version.
11509         
11510 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11511
11512         * mini.h: Bump AOT file format version.
11513
11514         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11515         address is inside a GOT.
11516
11517         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11518
11519         * cpu-pentium.md: Increase the maximum size of some instructions which
11520         might involve a got access.
11521         
11522         * mini.c (get_method_from_ip): Another debug helper function.
11523
11524         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11525         when got var accesses are created during the decompose phase.
11526
11527         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11528
11529         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11530         argument mini_compile_method and to MonoCompile, and use this to
11531         determine whenever a given method is compiled for AOT. This allows the
11532         other methods compiled during AOT compilation to be free of AOT stuff,
11533         so the backends does not need to add special support for them by
11534         creating a fake GOT etc.
11535
11536         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11537         longer needed.
11538
11539 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11540
11541         * mini.c (mono_method_to_ir): It turns out that some of the
11542         x-appdomain wrappers are lax with types, so just ignore this for
11543         all wrappers.
11544
11545         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11546         at the vtable->klass. If it is non-shared code we can just use the
11547         vtable.
11548
11549 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11550
11551         * mini-ppc.c: access MonoDomain from tls, too.
11552
11553 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11554
11555         * declsec.c: Removed unused variable (and related warning ;-)
11556
11557 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11558
11559         * iltests.il: New test for LDELEMA on an array of ref types.
11560
11561         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11562         all ldelema's on reftypes.
11563         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11564         it was the wrong place to put it.
11565
11566         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11567         register to pop to make this cleaner, at the request of Paolo.
11568
11569 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11570
11571         * mini-ops.h (OP_GETHASHCODE): New op.
11572
11573         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11574
11575         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11576         operation.
11577
11578         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11579         by 25%.
11580         
11581         * mini-x86.c (mono_arch_output_basic_block): Rather than
11582
11583         add ebp, 4
11584
11585         Emit
11586
11587         pop edx
11588
11589         The first is 3 bytes while the second is 1. This saves 36 kb on
11590         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11591         see a small boost because of icache locality.
11592
11593         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11594
11595 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11596
11597         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11598         started code sharing with the generic code.
11599
11600 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11601
11602         * mini-ppc.c, cpu-g4.md: added code for direct access to
11603         tls data slots.
11604
11605 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11606
11607         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11608          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11609         to OP_TLS_GET.
11610
11611 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11612
11613         * declsec.c|h: Added functions to cache the declarative stack modifiers
11614         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11615         structure.
11616         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11617         created. Register internal calls for System.Security.SecurityFrame::
11618         _GetSecurityFrame and _GetSecurityStack.
11619         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11620         the definitions for the new stack walk/callback mechanism.
11621         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11622         first security frame for LinkDemands and InheritanceDemands) and
11623         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11624         from lupus.
11625         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11626         walk initialization (lupus).
11627
11628 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11629
11630         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11631         idiom.
11632         (handle_loaded_temps): Do not create a temporary variable for
11633         things that we know are temps. They will never be modified.
11634         (mono_spill_call): Set MONO_INST_IS_TEMP
11635         (mono_emulate_opcode): ditto
11636         (emit_tree): ditto
11637         (mono_method_to_ir.CEE_DUP): ditto
11638
11639 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11640
11641         * mini.c (type_to_eval_stack_type): Make this handle the void type
11642         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11643         (emit_tree): use ip_in_bb to special case some common idioms
11644         Update all callers to pass in the IP.
11645         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11646
11647         This gives us a nice 2% speedup in mcs bootstrap.
11648
11649         * mini-x86.c (peephole_pass): Peephole pass to make
11650         mov  [foo], eax
11651         push [foo]
11652
11653         into
11654
11655         mov [foo], eax
11656         push eax
11657
11658         * mini.c (ip_in_bb): new method.
11659         (mono_method_to_ir): use this method rather than doing the hash
11660         lookup ourselves.
11661
11662         * linear-scan.c (mono_linear_scan): When expiring actives, you
11663         don't need to keep around variables that expire on this
11664         instruction. This makes it so that:
11665              a = b + 1
11666         will turn into:
11667              store (ebx add (ebx, 1))
11668         which will become
11669              add ebx, 1
11670
11671 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11672
11673         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11674         combination to avoid doing two copies. Fix up problems with previous
11675         patch.
11676
11677         * mini.c: Fix 64 bit warnings.
11678
11679         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11680
11681 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11682
11683         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11684         changes from the x86 code.
11685
11686         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11687
11688 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11689
11690         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11691         throwing code to reduce its size, unify the AOT and non-aot code and 
11692         get rid of relocations in the AOT case.
11693
11694         * mini-x86.h mini.c exceptions-x86.c 
11695         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11696         raise corlib exceptions which doesn't require relocations in the 
11697         caller.
11698
11699         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11700
11701 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11702
11703         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11704         needed.
11705
11706         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11707         in the AOT case.
11708
11709 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11710
11711         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11712         with add function when used from Inc/dec atomic 
11713         functions. Re-enabled optimization on x86.
11714         * mini-ops.h: renamed atomic_add functions to
11715         allow _add to match the Interlocked::Add and
11716         _add_next to match Interlocked::Inc/Dec.
11717
11718 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11719
11720         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11721         linking of BBs to the end BB, and enabled SSAPRE also with
11722         consprop and copyprop (which was prevented by that bug).
11723
11724 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11725
11726         * mini-x86.c: disabling the Interlocked optimizing code. 
11727
11728 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11731         file version check.
11732         
11733 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11734
11735         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11736         interlocked optimization due lack of support on x86, rewrote 
11737         exchange to take into account that base may be in eax.
11738         
11739         xsp works again; activated Interlocked optimizing code.
11740         
11741 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11742
11743         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11744
11745 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11746
11747         * mini-ops.h: Add new opcodes.
11748
11749         * mini.h: Add new patch types. Add got_var to MonoCompile.
11750
11751         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11752         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11753         make it work with all kinds of patchable code.
11754
11755         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11756         address of the GOT, and referencing entries in the GOT.
11757
11758         * mini.c: Add code to load the GOT address if needed by an opcode.
11759
11760         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11761         independent AOT code on the x86 using an elf-style Global Offset Table.
11762
11763 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11764
11765         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11766
11767 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11768
11769         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11770         when running xsp.
11771
11772 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11773
11774         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11775         of Interlocked:Increment/Decrement/Add as inline ops.
11776         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11777
11778 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11779
11780         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11781         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11782
11783 2004-12-12  Duncan Mak  <duncan@ximian.com>
11784
11785         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11786         again. `patch_info->table_size' is no longer valid after Zoltan's
11787         commit #37636.
11788
11789 2004-12-12  Martin Baulig  <martin@ximian.com>
11790
11791         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11792         if we are the "real" method, ie. not an inlined method inside it.
11793
11794 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11795
11796         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11797         before we look in the special fields table. This fixes
11798         ../tests/thread-static-init.cs.
11799
11800 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11801
11802         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11803         for Array get_Rank and get_Length. Fixes bug #70465.
11804
11805 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11806
11807         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11808         separate structure to reduce the size of MonoJumpInfo.
11809
11810 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11811
11812         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11813
11814 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11815
11816         * mini.c (mini_get_inst_for_method): Changed to allow ports
11817         to return a MonoInst instead of opcode 
11818         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11819         
11820         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11821         Allow ports to return a created MonoInst instead of op-code, will enable
11822         new optimizations.
11823         (renamed mini_get_opcode_for_method to better reflected the functionality)
11824
11825 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11826
11827         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11828
11829 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11830
11831         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11832         Fixes #69985.
11833
11834 2004-12-08  Martin Baulig  <martin@ximian.com>
11835
11836         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11837         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11838
11839 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11840
11841         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11842         correctly.
11843
11844         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11845         arithmetic.
11846
11847 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11848
11849         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11850
11851 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11854         bug introduced by the previous patch.
11855
11856 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11857
11858         * mini-ppc.c, objectc.cs: handle large structs passed by value
11859         (fixes bug #69972).
11860
11861 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11862
11863         * mini-ppc.c: OP_ARGLIST implementation from
11864         Geoff Norton  <gnorton@customerdna.com>.
11865
11866 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11867
11868         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11869         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11870
11871 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11872
11873         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11874
11875 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11876
11877         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11878         support.
11879
11880 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11881
11882         * mini-sparc.c: Zero out localled-ed memory.
11883
11884         * iltests.il: Add tests for zeroing out localloc-ed memory.
11885
11886 2004-12-04  Martin Baulig  <martin@ximian.com>
11887
11888         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11889         mono_method_get_signature_full().       
11890
11891 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11892
11893         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11894         and some utility functions (always for SSAPRE), integrated SSAPRE.
11895         * mini.h: Likewise.
11896         * driver.c: Added ssapre option.
11897         * ssa.c: Small fix on OP_ARG handling.
11898         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11899         * Makefile.am: Likewise.
11900
11901 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11902
11903         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11904         now in the xp code.
11905
11906         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11907         icall.
11908
11909 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11910
11911         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11912         
11913         * cpu-s390.md : Increase instruction length of oparglist.
11914
11915         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11916
11917 2004-11-30  Martin Baulig  <martin@ximian.com>
11918
11919         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11920         virtual generic methods.  We call a special helper_compile_generic_method()
11921         icall to retrieve the method from the vtable, inflate and compile
11922         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11923
11924         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11925
11926 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11927
11928         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11929
11930 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11931
11932         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11933         Fixes #69929.
11934
11935 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11936
11937         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11938         platforms with PIC aot.
11939
11940 2004-11-28  Martin Baulig  <martin@ximian.com>
11941
11942         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11943         Fixes gen-112.cs.
11944
11945 2004-11-28  Martin Baulig  <martin@ximian.com>
11946
11947         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11948         the result of mono_type_get_underlying_type() to check whether
11949         we're byref.
11950
11951 2004-11-26  Martin Baulig  <martin@ximian.com>
11952
11953         * mini.c
11954         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11955         in the g_assert().
11956
11957 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11960         the same way as the other arguments so they won't get clobbered.
11961
11962         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11963         calls through R11 since it is clobbered by the trampoline code.
11964
11965 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11966
11967         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11968         pick up in-tree mscorlib.dll.
11969
11970 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11971
11972         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11973
11974         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11975         runtime data/code are now stored in a table similar to the GOT in ELF. 
11976         This allows the code itself to be position independent.
11977
11978         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11979         loading changes.
11980
11981         * aot.c: Attach ELF type (object/function) directives to all global
11982         symbols.
11983
11984         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11985
11986         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11987
11988         * mini-amd64.h: Turn on PIC AOT code.
11989
11990         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11991         returning the offset within an OP_AOTCONST instruction where the GOT
11992         offset needs to be added.
11993
11994         * mini.h: Bump AOT file format version.
11995
11996 2004-11-25  Martin Baulig  <martin@ximian.com>
11997
11998         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11999         uninflated generic methods.
12000
12001 2004-11-25  Martin Baulig  <martin@ximian.com>
12002
12003         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12004
12005 2004-11-24  Martin Baulig  <martin@ximian.com>
12006
12007         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12008         original klass (this only applies for generic instances).
12009
12010 2004-11-24  Martin Baulig  <martin@ximian.com>
12011
12012         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12013         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12014         that array).
12015
12016 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12017
12018         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12019         localloc. Fixes #69678.
12020
12021         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12022         
12023 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12024
12025         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12026         used SSE registers on pinvoke calls. Fixes #69774.
12027
12028 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12029
12030         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12031         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12032
12033 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12034
12035         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12036         Refer directly to the mcs/ tree.
12037
12038 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12039
12040         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12041         Check if a trampoline for a synchronized method is required. 
12042
12043 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12044
12045         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12046         with localloc if needed. Throe arithmetric exception in
12047         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12048         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12049
12050 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12051
12052         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12053         types before switching on type.  Fixes #69622.
12054
12055 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12056
12057         * Makefile.am (check-local): New.  Integrate into 'make check'.
12058         (MCS,RUNTIME): Define using in-tree mono and mcs.
12059         (ILASM): New.
12060         (%.exe): Use $(ILASM).
12061
12062 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12063
12064         * mini-ppc.c: adjust initial prolog size (bug #69691).
12065
12066 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12067
12068         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12069         #69664.
12070
12071 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12072
12073         * Makefile.am (clean-local): Rename from 'clean'.
12074
12075 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12076
12077         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12078         to mono_arch_is_int_overflow. 
12079         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12080         SIGFPE events.
12081
12082 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12083
12084         * declsec.c|h: New files to support declarative security attributes.
12085         Added function to check if a method has (applicable) security.
12086         * mini.c|h: Add check for declarative security attributes in
12087         mono_method_check_inlining.
12088         * Makefile.am: Added declsec.c and declsec.h to the build.
12089
12090 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12091
12092         * mini.c, mini.h: update to keep dynamic code info per-domain.
12093
12094 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12095
12096         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12097         (mini_init): Get rid of it from here too.
12098
12099 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12100
12101         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12102         implemented OP_RETHROW (patch by Geoff Norton
12103         <gnorton@customerdna.com>).
12104
12105 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12106
12107         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12108         between appdomains.  Fixes appdomain-unload on PPC.
12109
12110 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12111
12112         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12113         mini-exceptions.c: handle the new wrapper types.
12114         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12115         token value as a MonoClass* when compiling a wrapper.
12116         mono_jit_create_remoting_trampoline now takes an additional
12117         MonoRemotingTarget parameter.
12118         
12119 2004-11-10  Martin Baulig  <martin@localhost>
12120
12121         * mini.c (mono_method_to_ir): Use `generic_container->context'
12122         rather than creating a new one.
12123
12124 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12125
12126         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12127
12128         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12129
12130 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12131
12132         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12133         the experimental aot cache stuff.
12134
12135 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12136
12137         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12138         mini-exceptions.c: update to exception clause structure changes.
12139
12140 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12141
12142         * exceptions-x86.c (throw_exception): Fix warnings.
12143
12144         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12145         for OP_RETHROW.
12146
12147 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12148
12149         * exceptions-sparc.c (get_throw_exception): Really fix this.
12150
12151 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12152
12153         * tramp-*.c: we no longer support icalls without wrappers, so
12154         a bit of code can be removed here
12155
12156 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12157
12158         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12159         patch.
12160
12161         * cpu-sparc.md: Add op_rethrow.
12162
12163         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12164
12165         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12166
12167         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12168         * mini-ops.h: Add OP_RETHROW.
12169
12170         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12171
12172         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12173
12174 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12175         
12176         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12177         Makes the output much easier to read
12178
12179 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12180
12181         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12182         prevents another huge leak when compiling with ssa. Secondly, the
12183         performance of doing this rather than freeing the lists is much
12184         better. GList does a lock every time you allocate a list link,
12185         so that it can use a memory pool. So, it is better to just use
12186         a memory pool of our own.
12187         
12188         * ssa.c, linear-scan.c: replace g_list_remove_link with
12189         g_list_delete.  The remove one does not free the GList, so we were
12190         leaking memory. On -O=all --compile-all with corlib, this cut down
12191         3 MB of allocations.
12192
12193 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12194
12195         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12196
12197         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12198
12199         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12200         into a new function mono_create_jit_trampoline ().
12201
12202 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12203
12204         * trace.c (get_spec): Allow tracing of classes without a namespace.
12205
12206 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12207
12208         * mini.c: Fix pointer overwrite in mini_method_compile.
12209
12210 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12211
12212         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12213         The darwin ABI needs some special handling for 1 and 2 byte structs
12214         Lets use lbz/lhz instead of lwz everywhere.
12215         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12216         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12217         Use stb/sth for the former, and put the latter always on stack instead of in
12218         argument registers.
12219
12220 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * trace.c (is_filenamechar): Add '_'.
12223
12224 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12225
12226         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12227
12228         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12229
12230 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12231
12232         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12233         depends on libmonogc. Fixes #68805.
12234
12235 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12236
12237         * mini.c (mono_jit_free_method): Provide extra information for
12238         this error.  Currently this leaks, but will be turned into a
12239         developer option in the future.
12240
12241 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12242
12243         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12244
12245 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12246
12247         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12248         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12249         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12250
12251 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12252
12253         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12254         trampolines for AOT code.
12255
12256 2004-10-22    <vargaz@freemail.hu>
12257
12258         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12259         constructed types. Fixes #68136.
12260
12261 2004-10-21  Martin Baulig  <martin@ximian.com>
12262
12263         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12264         if it returns true, unwind the stack to the call instruction.
12265
12266 2004-10-21    <vargaz@freemail.hu>
12267
12268         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12269
12270         * mini.h: Bump AOT version number.
12271
12272         * objects.cs: Add another test for unbox trampolines.
12273
12274         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12275         valuetype methods.
12276
12277 2004-10-20    <vargaz@freemail.hu>
12278
12279         * driver.c: Add SHARED to the set of optimizations tested.
12280
12281         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12282
12283         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12284         used by CEE_NEWARR.
12285
12286         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12287
12288 2004-10-20  Martin Baulig  <martin@ximian.com>
12289
12290         * mini-exceptions.c (mono_handle_exception): Call
12291         mono_debugger_handle_exception() to tell the debugger about
12292         catch/finally clauses.
12293
12294 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12295
12296         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12297
12298         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12299         #68447.
12300
12301 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12302
12303         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12304         methods as their native size, fixed bug #57543, #57545.
12305         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12306         This saves a temporary register and mullw call down into 1 (minor perf
12307         increase for cases like sum = sum * 5;  This use to translate into:
12308             li r11,5
12309             mullw r28,r28,r11
12310         It now translates to
12311             mulli r28,r28,5
12312
12313 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12314
12315         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12316         #68388.
12317
12318 2004-10-11  Martin Baulig  <martin@ximian.com>
12319
12320         * mini.c (mono_method_to_ir): If we're a generic method, get the
12321         MonoGenericContainer from our MonoMethodNormal and create a
12322         MonoGenericContext from it.
12323
12324 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12325
12326         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12327
12328         * basic-long.cs: Add test for checked i8->i2 cast.
12329
12330 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12331
12332         * inssel-ppc.brg: added a couple of speedup rules.
12333
12334 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12335
12336         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12337         to speed up rebuilds.
12338
12339 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12340
12341         * mini-s390.c: Minor fix to OP_OR_IMM.
12342
12343 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12346         better. Fixes appdomain-unload.exe on sparc.
12347
12348 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12349
12350         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12351         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12352         see bug 67324.
12353
12354 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12355
12356         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12357
12358 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12359
12360         * mini.c: Always generate a field read/write wrapper for members
12361         of the class MarshalByRefObject since the actual instance could
12362         be a CBO.
12363
12364 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12365
12366         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12367
12368 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * driver.c mini.h trace.c: Move the setting of the main assembly into
12371         a separate function called mono_trace_set_assembly () and call it after
12372         actually loading the main assembly. Fixes #66872.
12373
12374 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12375
12376         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12377         using the code manager.
12378
12379 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12380
12381         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12382
12383 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12384
12385         * cpu-amd64.md: Fix bug in previous patch.
12386         
12387         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12388         #66650.
12389
12390 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12391
12392         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12393         mini-exceptions.c: updates for changed stack walk interface.
12394
12395 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12396
12397         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12398
12399 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12400
12401         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12402
12403 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12404
12405         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12406         since assemblies can't be unloaded.
12407         
12408 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12409
12410         * cpu-amd64.md: Fix more instruction lengths.
12411
12412         * cpu-amd64.md: Fix lengths of some instructions.
12413
12414 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12415
12416         * inssel.brg: Make the array ldelema check aot friendly.
12417
12418 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12419
12420         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12421
12422         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12423
12424 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12425
12426         * mini-x86.c: Fix build.
12427
12428         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12429         mono_type_get_underlying_type () helper function to simplify code.
12430         
12431 2004-09-09  Martin Baulig  <martin@ximian.com>
12432
12433         * mini-amd64.c: Don't access `type->data.klass' directly, call
12434         mono_class_from_mono_type() instead since the type may be a
12435         generic instance.
12436
12437 2004-09-09  Martin Baulig  <martin@ximian.com>
12438
12439         * mini-amd64.c (get_call_info): Fix support for generic instances.
12440         (add_valuetype): Use mono_class_from_mono_type() to get the class
12441         since we can be a generic instance.
12442
12443 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12444
12445         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12446
12447 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12448
12449         * liveness.c: reset spill costs on each scan: bug 62107
12450
12451 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12452
12453         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12454         unnecessary line that doesn't compile
12455
12456 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12457
12458         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12459         trampolines, make them call an error function so people can fix their
12460         code.
12461
12462 2004-09-06  Martin Baulig  <martin@ximian.com>
12463
12464         * mini.c (mono_method_to_ir): When initializing locals, handle a
12465         generic instances like a valuetype if it's a valuetype and like a
12466         class if it's a class.
12467
12468 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12471         stack. Fixes #64674.
12472
12473         * exceptions.cs: Add test for unwinding of call arguments.
12474
12475 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12476
12477         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12478         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12479         set the carry/borrow flag). The sparc and s390 implementations
12480         can now use optimized versions (and simplify the code). ppc bugfixes.
12481
12482 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12483
12484         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12485
12486 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12487
12488         * inssel-amd64.brg: Remove leftover 32 bit rule.
12489
12490         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12491
12492 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12493
12494         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12495         mono_arch_find_jit_info functions into a new function. Fix a memory
12496         leak.
12497
12498         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12499         refactored code.
12500         
12501 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12502
12503         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12504         as well.
12505         
12506         * exceptions.cs: Add array size tests.
12507
12508         * mini.c: Allocate a separate icall wrapper for each arity of 
12509         mono_array_new_va. Fixes #59509.
12510
12511         * exceptions.cs: Add testcase for 64578.
12512
12513         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12514
12515         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12516         
12517 2004-09-02  Martin Baulig  <martin@ximian.com>
12518
12519         * mini.c (mono_method_to_ir): When initializing the locals, call
12520         handle_initobj() on the generic instance itself, not its
12521         underlying type.
12522
12523 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12524
12525         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12526         MonoJitInfo for dynamic methods.
12527
12528         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12529
12530         * mini.c: Add support for freeing JIT data for dynamic methods.
12531         
12532 2004-09-01  Martin Baulig  <martin@ximian.com>
12533
12534         * mini-x86.c (is_regsize_var): Added support for generic
12535         instances.
12536         (mono_arch_emit_prolog): Make this compile again, use
12537         `x86_push_imm_template (code)'.
12538
12539 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12540
12541         * mini-x86.c: make all push_imm instructions that get
12542         patched always emit the long form
12543
12544 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12545
12546         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12547         in a per-domain hash.
12548
12549         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12550         types.
12551
12552 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12553
12554         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12555         work.
12556         
12557         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12558         work.
12559
12560         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12561         Beginnings of SSE2 support.
12562
12563         * exceptions.cs: Add more tests for checked int<->uint casts.
12564
12565 2004-08-28  Martin Baulig  <martin@ximian.com>
12566
12567         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12568         generic instances.
12569
12570         * mini.c
12571         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12572         Handle generic instances recursively.
12573
12574 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12575
12576         * iltests.il: test for conv.u8 on a constant
12577
12578 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12579
12580         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12581         LCONV_x4 (shrun_32 (membase)).
12582
12583 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12584
12585         * inssel-x86.brg: c&p rules for push/setret of long
12586
12587 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12588
12589         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12590         compare (regvar, base)
12591
12592         * inssel-x86.brg: more burg love
12593
12594         * inssel.brg: more cleanup
12595
12596         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12597
12598 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12599
12600         * basic-long.cs, basic-calls.cs: new tests for optimization.
12601
12602 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12603
12604         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12605         patch.
12606
12607 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12608
12609         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12610         
12611 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12612
12613         * inssel.brg (mini_emit_memcpy): use 
12614         NO_UNALIGNED_ACCESS to disable memcpy optimization
12615
12616 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12617
12618         * mini-amd64.c: Handle generic types in various places.
12619
12620         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12621
12622 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12623
12624         * mini.c (handle_box): Fix warning.
12625
12626         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12627
12628         * mini-amd64.h: Enable the emit_state optimization.
12629
12630         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12631
12632         * mini-amd64.c: Add some new 64 bit peephole opts.
12633
12634         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12635
12636         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12637
12638         * mini-amd64.c: Register allocator fixes.
12639
12640         * mini.c: Add an optimization to emit_state to avoid allocation of new
12641         registers on some platforms.
12642
12643 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12644
12645         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12646
12647         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12648         allocation. Fixes #63085.
12649
12650         * basic-long.cs: Add new regression test.
12651
12652         * mini-amd64.c: Register allocator improvements.
12653
12654 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12655
12656         * mini-amd64.c (read_tls_offset_from_method): Add another code
12657         sequence.
12658
12659         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12660         instruction sequence for nullifying class init trampolines.
12661
12662         * objects.cs: Add new regalloc test.
12663
12664         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12665
12666 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12667
12668         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12669         
12670         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12671         arguments.
12672
12673         * driver.c: Fix profiling after TLS changes.
12674         
12675         * driver.c (mono_main): Set mono_stats.enabled if needed.
12676
12677         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12678         CEE_BOX.
12679
12680 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12681
12682         * mini-x86.c: use a 1 op rather than a 2 op tls access
12683         instruction -> faster.
12684
12685 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12686
12687         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12688         x86 backend.
12689
12690 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12691
12692         * exceptions-sparc.c (throw_exception): fix typo
12693
12694 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12695
12696         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12697         set tree->dreg correctly with tls. Allow any
12698         register to be used.
12699
12700         * mini-x86.c (read_tls_offset_from_method): add new code
12701         generation pattern seen with GCC.
12702
12703
12704 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12705
12706         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12707         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12708         exceptions-sparc.c: fix some performance issues in exception
12709         handling and setting of the stack trace for exceptions that were
12710         already thrown.
12711
12712 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12713
12714         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12715         x86 backend.
12716         
12717         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12718         registers.
12719
12720 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12721
12722         This patch inlines tls access, when possible.
12723         
12724         * mini.h: new arch functions for TLS intrinsics.
12725         All platforms updated with a stub.
12726
12727         * mini.c: use the new intrinsics
12728
12729         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12730         arch specific intrinsic for tls variables
12731
12732 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12735         under windows.
12736
12737 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12738
12739         * mini.c: thread local allocation
12740
12741 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12742
12743         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12744
12745         * Makefile.am: Link against the static version of libmonogc.
12746         
12747         * Makefile.am: Link the static versions of the convenience libraries
12748         into the mono executable.
12749
12750         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12751
12752 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12753
12754         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12755         on integer overflow.
12756
12757         * mini-amd64.c: Reorganize function call code.
12758
12759         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12760
12761 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12762
12763         * inssel-x86.brg: use xor eax,eax.
12764         
12765         * basic.cs: new tests
12766
12767 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12768
12769         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12770         in exception throwing code.
12771         
12772 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12773
12774         * inssel-x86.brg: use xor esi,esi.
12775
12776 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12779         can trace methods compiled during mini_init () too.
12780
12781         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12782         CEE_CONV_U4.
12783
12784 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12785
12786         * Makefile.am: static link on x86 (r=zoltan)
12787
12788 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12789
12790         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12791         code since it causes some programs to fail.
12792
12793 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12796
12797 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12798
12799         * mini.c: ovfops_op_map - add STACK_OBJ case for
12800         CONV_I 
12801         * basic.cs: add test_0_pin_string as test
12802         case for above.
12803
12804 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12805
12806         * Makefile.am: build C# if srcdir != builddir
12807
12808 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12809
12810         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12811         fall-through blocks.
12812
12813 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12814
12815         * driver.c: enable loop by default again and include abcrem in -O=all.
12816
12817 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12818
12819         * iltests.il: Add some localloc tests.
12820
12821         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12822
12823         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12824         Fixes #62574.
12825
12826         * inssel-amd64.brg: Add some optimizations.
12827
12828         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12829         for gcc-3.4.
12830
12831         * Makefile.am: Statically link mono against libmono on AMD64.
12832         
12833         * mini-amd64.c inssel-amd64.brg: Optimizations.
12834
12835 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12836
12837         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12838
12839         * tramp-amd64.c: Patch calling code in trampolines.
12840
12841 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12842
12843         * mini-amd64.c: pinvoke struct passing fixes.
12844
12845 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12846
12847         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12848         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12849
12850 2004-08-05  Duncan Mak  <duncan@ximian.com>
12851
12852         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12853         CEE_LDELEM_ANY.
12854
12855 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12856
12857         * mini-amd64.c (emit_move_return_value): Move return value for normal
12858         calls too.
12859
12860 2004-08-05  Martin Baulig  <martin@ximian.com>
12861
12862         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12863         `type->type'; just modify `type' itself when dealing with enums
12864         and generic instances.
12865         (check_call_signature): Make `simple_type' a `MonoType *'.
12866
12867 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12868
12869         * mini.c: Use OP_PADD to add offsets to addresses.
12870
12871         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12872
12873 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12874
12875         * mini-sparc.c (mono_arch_emit_epilog): fix check
12876         for folding last op into restore instruction
12877
12878 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12879
12880         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12881         helper methods using the code manager.
12882         
12883         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12884
12885         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12886
12887 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12888         
12889         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12890           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12891
12892         * mini-s390.c: fix tail processing
12893
12894 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12895
12896         * mini-ppc.c: mul.ovf.un exception name fix.
12897
12898 2004-08-03  Martin Baulig  <martin@ximian.com>
12899
12900         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12901         instances; before jumping to `handle_enum', also modify `ptype'.
12902
12903 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12904
12905         * cpu-sparc.md: fcall maximal length too small.
12906
12907 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12908
12909         * mini-amd64.c mini.h: Add initial support for passing/returning 
12910         structures to/from pinvoked methods.
12911
12912 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12913
12914         * mini-ppc.c: reg allocator fix.
12915
12916 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12917
12918         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12919
12920         * inssel.brg: Optimize memset on 64 bit machines.
12921
12922         * mini-amd64.c: Fix some vararg cases.
12923
12924 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12925
12926         * mini-s390.c: Corrected macro in emit_float_to_int
12927
12928         * s390-abi.cs: Tests to exercise the s390 ABI
12929
12930 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12931
12932         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12933         caller saved regs.
12934
12935         * basic.cs: Add a test for add.ovf.un.
12936
12937 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12938
12939         * mini-sparc.c: add case for OP_IDIV_UN
12940
12941 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12942
12943         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12944         
12945         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12946
12947 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12948
12949         * basic.cs: regression tests.
12950
12951         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12952         regressions.
12953
12954 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12955
12956         * basic.cs: Add a new test.
12957
12958         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12959         and AOT. Various fixes and optimizations.
12960
12961         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12962
12963 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12964
12965         * mini-ppc.c: make sure temp regs are not used for global reg
12966         allocation.
12967
12968 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12969
12970         * cpu-sparc.md: conv_i8 fix for 64bits
12971
12972         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12973
12974 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12975         
12976         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12977         add opcode for cmp BYTE PTR [eax], imm.
12978
12979         * inssel.brg: Make memcpy and memset takes bases.
12980
12981 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12982
12983         * *-amd64.*: More AMD64 work.
12984         
12985 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12986
12987         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12988         add a compare-not-equal opcode.
12989         
12990 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12991
12992         * mini.c: Use mono_init_from_assembly instead of mono_init.
12993         
12994 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12995
12996         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12997
12998         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12999
13000         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13001
13002         * inssel.brg: 64 bit fixes.
13003
13004         * mini.h (MonoCallInst): Add some AMD64 specific data.
13005
13006         * mini.h: Add some OP_P opcodes.
13007
13008 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13009
13010         * basic.cs: tests for 61797 and 61740
13011
13012 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13013
13014         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13015         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13016
13017 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13018
13019         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13020
13021         * *-amd64*.*: Ongoing AMD64 work.
13022
13023 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13024
13025         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13026
13027         * *-amd64*: Ongoing AMD64 work.
13028
13029         * mini-arch.h: Add AMD64 support.
13030
13031         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13032
13033         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13034
13035         * mini-ops.h: Add new opcodes.
13036
13037         * Makefile.am: Add AMD64 support.
13038
13039         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13040         rules into the inssel-long*.brg files.
13041
13042         * *-amd64.*: Add beginnings of AMD64 backend.
13043
13044 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13045
13046         * mini.c (print_dfn): commenting out the code that prints
13047         the cil. With -O=deadce, this makes -v -v crash.
13048         
13049         * cpu-pentium.md: make checkthis have a length of 2
13050
13051 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13052
13053         * mini-sparc.h: fix implementations of __builtin
13054         functions for Sun compiler for V9.
13055
13056 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13057
13058         * mini.c: use the new stelem.ref wrapper
13059         * exceptions.cs, arrays.cs: new stelem.ref tests
13060
13061 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13062
13063         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13064         new XSP should work with these changes).
13065
13066 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13067         
13068         * inssel-{long32,x86,}.brg: trivial optimizations.
13069         
13070 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13071
13072         * mini.c: load value when emitting box operation in
13073         constrained calls.
13074
13075 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13076
13077         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13078         is one byte shorter than cmp DWORD PTR [eax], 0.
13079
13080 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13081
13082         * inssel-ppc.brg: arguments on the stack are always
13083         relative to the stack pointer (spotted by Neale Ferguson).
13084
13085 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13086
13087         * exceptions-x86.c: delay appending the method name to the trace until
13088         after mono_jit_info_table_find is called, as this gets the real
13089         MonoMethod.
13090
13091 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13092
13093         * aot.c: register roots
13094
13095 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13096
13097         * aot.c : I could just use PLATFORM_WIN32 flag.
13098
13099 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13100
13101         * aot.c : Reverting the previous fix. This time it broke linux build.
13102
13103 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13104
13105         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13106
13107 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13108
13109         * mini.c (handle_stack_args): Remove some more debugging code.
13110         
13111         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13112
13113         * driver.c mini.h aot.c: Allow additional options to be specified with
13114         --aot and pass them to mono_compile_assembly.
13115
13116         * aot.c: Add experimental code to AOT compile all loaded assemblies
13117         on demand and save the code into a cache in the filesystem.
13118
13119         * aot.c: Add support for more wrapper methods.
13120         
13121         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13122         58863.
13123
13124         * cpu-*.md: Remove removed opcodes.
13125
13126         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13127         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13128         related icalls to marshal.c.
13129
13130 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13131
13132         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13133
13134         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13135
13136         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13137
13138 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13139         * liveness.c: If liveness is recomputated we need to reset the information
13140         for each variable. This way, if the liveness range has been narrowed
13141         by optimizations that happened after the last computation, we can return
13142         a smaller range.
13143         
13144         For example, if you have
13145         
13146         {
13147                 int i = 0;
13148                 
13149                 // Tons of code that does not affect i
13150                 
13151                 i = foo ();
13152                 ...
13153         }
13154         
13155         i = 0 is dead code and will be removed by SSA. However, when
13156         linear scan gets to the code, i will still appear to be live
13157         throughout the entire block. This prevents good register allocation.
13158
13159 2004-07-06  Martin Baulig  <martin@ximian.com>
13160
13161         * debug-mini.c (mono_debug_init_method): Allow
13162         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13163         (mono_debug_add_icall_wrapper): New method.
13164
13165         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13166
13167 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13168
13169         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13170         optimization.
13171
13172 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13173
13174         * aot.c (mono_aot_load_method): Fix loading of debug info.
13175
13176 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * aot.c: Add logging support.
13179
13180 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13181
13182         * mini.h: Add prototype for mono_print_method_from_ip.
13183
13184         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13185
13186         * inssel.brg: 64 bit fixes.
13187
13188         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13189         inssel-long32.brg.
13190
13191         * Makefile.am: Add SPARC64 support.
13192
13193 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13194
13195         * aot.c: Fix alignment problems on 32 bit platforms.
13196
13197 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13198
13199         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13200         SPARC64.
13201
13202         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13203         problems.
13204
13205         * mini.h: Bump AOT file version. Some 64 bit fixes.
13206
13207 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13208
13209         * inssel-sparc.brg: Add new rule to avoid register moves.
13210
13211         * inssel.brg: Add ldind_to_load_membase helper function.
13212
13213 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13214
13215         * mini.c: OffsetToStringData intrinsic.
13216         
13217 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13220
13221         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13222         regression tests.
13223
13224         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13225 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13226
13227         * mini.c: reinstated mono_compile_get_interface_var()
13228         on x86, too, since the change breaks the Gtk# build there as well.
13229
13230 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13231
13232         * driver.c: remove loop from the default optimizations: it seems to
13233         interact badly with some of the other options (see bug #60613).
13234
13235 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13236
13237         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13238         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13239
13240 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13241
13242         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13243         vararg-using methods.
13244
13245 2004-06-21  Martin Baulig  <martin@ximian.com>
13246
13247         * mini/mini-exceptions.c
13248         (mono_handle_exception): Added `gpointer original_ip' argument.
13249         After calling mono_unhandled_exception(), call
13250         mono_debugger_unhandled_exception() and if that returns true,
13251         restore the context and return.
13252
13253 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13254
13255         * mini-ppc.c: prefer the use of relative branches so
13256         they won't need to be patched in aot code (patch from Patrick Beard).
13257
13258 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13259
13260         * aot.c: patch from Patrick Beard to make the output assembly
13261         more correct for the MacOSX assembler. Small tweak to
13262         generate sane images on Linux/PPC, too.
13263
13264 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13265
13266         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13267         case until bug #59509 is fixed (shows up in #60332).
13268
13269 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini.c: make sure the needed wrappers are compiled, too, with
13272         precomp.
13273
13274 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13275
13276         * driver.c: remove NPTL reference in --version output.
13277
13278 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13279
13280         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13281         generate valid assembly for the Mach-O assembler.
13282
13283 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13284
13285         * driver.c: don't include abcrem in the all optimization specifier
13286         since it slows down jit compilation too much for now.
13287
13288 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13289
13290         * mini.c: use BIGMUL only if both operands have the same signage.
13291         * iltests.il: Test for bug 60056. (errors related to signage in
13292         BIGMUL).
13293
13294         r=lupus.
13295
13296 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13297
13298         * mini.c, aot.c: memory leak fixes.
13299
13300 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13301
13302         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13303
13304 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13305
13306         * Makefile.am: remove the -static hack completely, it links in
13307         statically glib as well.
13308
13309 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13310
13311         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13312         * exceptions.cs: make it compile with new mcs/csc.
13313
13314 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13315         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13316         and added relevant test case.
13317
13318 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13319
13320         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13321         regressions in gtk-sharp.
13322
13323 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13324
13325         * exceptions.cs: New regression tests.
13326
13327         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13328
13329 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13330
13331         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13332
13333 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13334
13335         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13336
13337         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13338
13339 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13340
13341         * mini.c (mono_jit_runtime_invoke): Init class in this
13342         method instead of trusting mono_jit_compile_method to
13343         do the work (because wrappers can be in object class)
13344
13345 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13346
13347         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13348
13349         * basic-long.cs: New regression test.
13350
13351 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13352
13353         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13354         and div/rem checks.
13355
13356 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13357
13358         * Makefile.am: fix miguel's change to build mono statically against
13359         libmono (track build dependencies).
13360
13361 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13362
13363         * cfold.c: Some glib versions do not have G_MININT32.
13364
13365 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13366
13367         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13368         with precision of tan, atan, sin and cos, and implemented related
13369         regressions tests (fixes bug 54467, but one new problem appeared and
13370         is not fixed yet).
13371
13372 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13373
13374         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13375
13376         * exceptions.cs: Add test for constant folding && division by zero.
13377
13378         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13379         since driver.c is in libmono too, so the optimization was useless.
13380
13381         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13382         variable to driver.c so the compiler can emit more efficient code to
13383         access them.
13384
13385 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13386
13387         * Makefile.am: don't distribute generated inssel.[ch] files.
13388
13389 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13390
13391         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13392         into the default appdomain. Fixes #58707.
13393
13394         * jit-icalls.c: Remove the broken approximation for truncl, doing
13395         no conversion is better.
13396
13397         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13398         Fixes #58863.
13399
13400 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13401
13402         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13403         of the mcrxr instruction which is not available on some processors
13404         even if it's documented to be. Implement add and sub overflow correctly
13405         (still not complete for long unsigned). Speed up icalls a bit.
13406
13407 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13408
13409         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13410         we run .cctor in the current domain instead of target_domain.
13411         
13412         Fixes bug #58558, .cctor not being called in -O=shared.
13413
13414 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13415
13416         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13417
13418 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13419
13420         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13421         which can be done with an imm8, do it that way.
13422         (mono_arch_output_basic_block): ditto for a jmp
13423         (mono_arch_emit_prolog): Computate maximum offset of a label.
13424
13425 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13426
13427         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13428         now tries to allocate prefered physical reg's for virtual
13429         regs. This reduces the number of emited spills/loads with
13430         20-30% on our core assemblies.
13431
13432 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13433
13434         * jit-icalls.c: truncl() is not needed and trunc() is
13435         the correct thing to do anyway (bug #58287).
13436
13437 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13438
13439         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13440         if available.
13441
13442 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13443
13444         * driver.c: enable loop optimizations by default.
13445
13446 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13447
13448         * mini-x86.c: fix calc of max loop size when aligning loops start.
13449
13450 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13453         the stack.
13454
13455 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13456
13457         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13458         should set carry.
13459
13460         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13461
13462         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13463         
13464         * mini.c (inline_method): Allways inline some wrappers even if the cost
13465         is too large. Fixes #58785.
13466
13467         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13468         
13469 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13470
13471         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13472         (crichton@gimp.org). Beginning of support for sparc/linux.
13473
13474         * mini-sparc.c: Optimize retrieval of LMF address.
13475
13476 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13477
13478         * exceptions-ppc.c:  handle alloca in methods with clauses.
13479
13480 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13481
13482         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13483
13484 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13485
13486         * mini.c: Delegate most of the abort signal work to 
13487           mono_thread_request_interruption, which also handles Stop and Suspend
13488           states.
13489
13490 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13491
13492         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13493         supports the save/restore lmf opcodes.
13494
13495 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13496
13497         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13498         by gcc-3.4 as well.
13499
13500         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13501
13502 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13503
13504         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13505         methods which contain array accesses.
13506
13507         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13508         boundaries. Fixes #58537.
13509
13510         * iltests.il: Add regression test for #58537.
13511
13512 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13513
13514         * mini-x86.c (mono_arch_local_regalloc): Last part of
13515         fix for bug #58633 (releasing register to early).
13516
13517 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13518
13519         * basic-long.cs: Add new regression test.
13520
13521 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13522
13523         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13524         register too early on the chain.
13525
13526 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13527
13528         * mini.c (create_helper_signature): Use a helper function to reduce
13529         the code which needs to be written. Also set the calling convention of
13530         icalls on windows. Fixes #57840.
13531
13532 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13533
13534         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13535         exceptions-ppc.c: added helper function to get the instruction address
13536         from a signal handler context.
13537
13538 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13539
13540         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13541         from gonzalo.
13542
13543 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13544
13545         * helpers.c: Add new env variable to pass args to objdump.
13546         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13547
13548 2004-05-17  Radek Doulik  <rodo@ximian.com>
13549
13550         * Makefile.am (common_sources): added abcremoval.h so it get
13551         disted and daily mono packages on go-mono.com will build again
13552
13553 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13554
13555         * abcremoval.c: Fixed coding style, added copyright header.
13556
13557         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13558
13559         * mini.h: Added prototype for abc removal main function.
13560
13561         * build_relations_propagation_table.pl: Added copyright header.
13562
13563 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13564
13565         * basic-long.cs: reg test for complex ceq_long bug.
13566
13567 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13568
13569         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13570         reg in long and clob case (bug #58343). Fixed/added comments.
13571
13572 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13573
13574         * mini.c (mono_jit_runtime_invoke): Follow new convention
13575         of calling the invoke method with an function pointer.
13576
13577 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13578
13579         * ChangeLog: Fix author of memory leak patch.
13580
13581 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13582
13583         * Makefile.am: fix make dist as well...
13584
13585
13586 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13587
13588         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13589         on archs where pointers are 4 bytes long.
13590
13591         * Makefile.am: Added abcremoval.c source file.
13592
13593         * abcremoval.c: Added abcremoval.c.
13594
13595         * abcremoval.h: Added abcremoval.h.
13596
13597         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13598
13599         * inssel.brg: Enabled bounds check removal.
13600
13601         * mini.c: Added support for abcrem optimization.
13602
13603         * mini.h: Added abcrem optimization label.
13604
13605         * driver.c: Added support for abcrem optimization.
13606
13607         * propagated_relations_table.def: Added propagated_relations_table.def.
13608
13609 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13610
13611         * mini.c, cfold.c: fix style.
13612
13613 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13614
13615         * mini.c: handle issue with the low-level implementation of
13616         some long opcodes (bug #54209).
13617
13618 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13619
13620         * basic.cs: test for my new cmov stuff.
13621
13622 2004-05-13      Patrik Torstensson
13623
13624         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13625         opt and added peephole documentation.
13626
13627 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13628
13629         * tramp-ppc.c: rewrote the generic trampoline code.
13630
13631 2004-05-11      Patrik Torstensson
13632
13633         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13634
13635 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13636
13637         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13638
13639         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13640         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13641
13642         * mini.c: Add new icalls for AsAny marshalling.
13643
13644 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13645
13646         * tramp-ppc.c, mini-ppc.c: more cleanups.
13647
13648 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13649
13650         * mini.c: no warnings.
13651
13652 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13653
13654         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13655
13656 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13657
13658         * mini.c: In the thread abort signal handler, if the thread is in the
13659         process of being stoped, don't throw the Abort exception, just stop the
13660         thread.
13661
13662 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13663
13664         * tramp-ppc.c: removed old code.
13665
13666 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13667
13668         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13669         do some simple speed optimizations on ppc.
13670
13671 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13672
13673         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13674         and large offsets in load/store.
13675
13676 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13677
13678         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13679         it causes regressions.
13680
13681 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13682
13683         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13684         support.
13685
13686 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13687
13688         * jit-icalls.c: remove warnings.
13689         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13690         speedups for unsafe code.
13691
13692 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13693
13694         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13695
13696 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13697
13698         * basic-calls.cs: Add new regression test.
13699
13700         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13701         more portable.
13702
13703         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13704
13705         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13706         is no longer used.
13707
13708 2004-05-06      Patrik Torstensson
13709
13710         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13711         long reg allocation in any reg (not only eax:edx) and implemented 
13712         long shl/shr ops in asm instead of helpers.
13713
13714 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13715
13716         * mini-sparc.h: Fix warnings.
13717
13718         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13719         stack.
13720
13721         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13722         separate statement for clarity.
13723
13724         * mini-sparc.c: Update status.
13725
13726 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13727
13728         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13729         here.
13730
13731 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13732
13733         * inssel-ppc.brg: another small pre-release workaround:
13734         we don't do overflow detection for long_sub_un.
13735
13736 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13737
13738         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13739         (also works around a weird ppc bug: 57957).
13740
13741 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13742
13743         * tramp-ppc.c: trampoline fixes.
13744
13745 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13746
13747         * mini-ppc.c: fixed typos.
13748
13749 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13750
13751         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13752         at the top of the stack. Fixed typos. Use a frame registers
13753         for all the methods with exception clauses.
13754
13755 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13756
13757         * exceptions-ppc.c: restore fp registers.
13758
13759 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13760
13761         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13762         order from the stack top (moved the stack room to save the
13763         return value for trace after the param area). Fixed corruption
13764         in restoring registers on unwind.
13765
13766 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13767
13768         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13769
13770 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13771
13772         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13773         and prolog/epilog for methods that use it. Allow
13774         enough param area room for varargs methods. Fix miguel's
13775         breakage in exception handling.
13776
13777 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13778
13779         * Makefile.am: run genmdesc only on current arch.
13780
13781 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13782
13783         * exceptions-x86.c:
13784         * mini-x86.h: fix the build on windows.
13785
13786 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13787
13788         * 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.
13789
13790         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13791
13792         * mini-exceptions.c: New file.
13793         
13794         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13795         Move some parts of the x86 exception handling code to an 
13796         arch-independent file so it can be shared with other ports.
13797
13798 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13799
13800         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13801
13802 2004-04-26  David Waite  <mass@akuma.org>
13803
13804         * driver.c: remove comma from end of enumeration declaration
13805
13806 2004-04-26  Jackson Harper  <jackson@ximian.com>
13807
13808         * driver.c: parse config file before loading first assembly. This
13809         allows the user gac to be enabled/disabled. 
13810         
13811 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13812
13813         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13814         simpler mechanism: we do not care what is encoded initially
13815         (branch absolute or relative), we care about the code and its
13816         target.  I kept the old code for reference for now.
13817
13818         The new code tries first to determine if the jump is anywhere in
13819         the -/+32 absolute meg range, if it succeeds, it encodes using the
13820         absolute branch;  If not, it tried to find something in the
13821         relative range, if not, it uses the handle_thunk code. 
13822
13823 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13824
13825         * exceptions-ppc.c: use the correct ip register on macosx.
13826
13827 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13828
13829         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13830
13831 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13832
13833         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13834         Raise exception on integer divide by zero by hand since the hw
13835         doesn't support it. Handle NaNs in FP compares.
13836
13837 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13838
13839         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13840         code reducing duplication between the platforms and enabled
13841         signal exception handling (on linux for now).
13842
13843 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13844
13845         * exceptions-ppc.c: more macosx support.
13846
13847 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13848
13849         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13850
13851 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13852
13853         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13854
13855 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13856
13857         * iltests.il: more tests.
13858
13859 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13860
13861         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13862         vars as well.
13863
13864 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13865
13866         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13867
13868 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13869
13870         * liveness.c: Mark variables as volatile in all basic blocks reachable
13871         from exception clauses.
13872
13873 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13874
13875         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13876         inlining.
13877
13878 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13879
13880         * iltests.il, basic.cs: more tests for regalloc.
13881
13882 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13883
13884         * iltests.il: Some tests for register allocation modifications
13885         I have locally.
13886
13887 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13888
13889         * exceptions.cs: Add regression test for bug #56782.
13890
13891         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13892         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13893         the beauty of fixing the same thing in 5 different files...
13894
13895 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13898         methods.
13899
13900 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13901
13902         * mini.c: Add support for STRWLPARRAY marshalling convention.
13903
13904 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13905
13906         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13907         to init the context to setup the regs pointer).
13908
13909 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13910
13911         * exceptions-ppc.c: more exceptions work.
13912
13913 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13914
13915         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13916         not allowed.
13917
13918 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13919
13920         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13921         can use the memory directly.
13922
13923         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13924
13925         add x86_add_membase, x86_sub_membase, x86_mul_membase
13926
13927 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13928
13929         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13930         GENERAL_REGS they were also hardcoded for all PPC ports.
13931
13932         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13933
13934         Remove hard-coded limit for floating point registers, use
13935         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13936
13937         Notice that in MacOS X calling conventions you can fit a lot more
13938         floating point values in registers, so I should update the PInvoke
13939         test to excercise the passing of floating point values on the
13940         stack (currently broken).
13941         
13942 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13943
13944         * tramp-ppc.c (create_trampoline_code): Added
13945         JUMP_TRAMPOLINE_SIZE. 
13946         (ppc_magic_trampoline): Follow the pattern from
13947         x86_magic_trampoline: if code is set to zero, return. 
13948         (create_trampoline_code): Always pass MonoMethod to the jump
13949         trampoline, before it was passing a null.
13950         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13951         share the code with mono_arch_create_jit_trampoline. 
13952
13953         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13954         implemented.
13955         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13956         implemented.  
13957
13958         * cpu-g4.md: Added length for jmp instruction, the worst case
13959         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13960         for save_lmf).
13961
13962 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13963
13964         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13965
13966 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13967
13968         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13969         before each IL instruction.
13970
13971         * mini.c (CEE_BOX): Fix warnings.
13972
13973 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13974
13975         * mini.c: removed a few unused vars and extra whitespace.
13976
13977 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13978
13979         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13980         checks.
13981         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13982         index.
13983         (OP_GETCHR): use the above
13984         (CEE_LDELEMA): use the above.
13985
13986         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13987         version of the generic impl.
13988         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13989         (CEE_LDELEMA): use the above.
13990
13991 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13992
13993         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13994         Fixes #56317.
13995
13996         * iltests.il: Added new regression test for #56317.
13997
13998 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13999
14000         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14001         under NetBSD. Fixes #56450.
14002
14003         * liveness.c (update_gen_kill_set): Fix previous patch.
14004
14005 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14006
14007         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14008
14009 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14010
14011         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14012         ldsfld and ldsflda.
14013
14014         * inssel-sparc.brg: Add more optimizations.
14015
14016         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14017
14018 2004-04-01  Martin Baulig  <martin@ximian.com>
14019
14020         * mini.c (handle_box): New static function; moved the
14021         implementation of CEE_BOX here.
14022         (mono_method_to_ir): Added `constrained_call' variable.
14023         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14024         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14025         mono_method_get_constrained() to get the method.
14026
14027 2004-04-01  Martin Baulig  <martin@ximian.com>
14028
14029         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14030         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14031         (mono_method_to_ir): We don't need these macros anymore since
14032         mono_class_get_full() already takes care of it. 
14033
14034 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14035
14036         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14037         use @function (as doesn't accept #function here) and check the return
14038         value of system and stop if fails.
14039
14040 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14041
14042         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14043
14044 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14045
14046         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14047
14048         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14049
14050         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14051         #56223.
14052
14053         * basic-long.cs: Add test for negation of Int64.MinValue.
14054
14055 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14056
14057         * mini-sparc.c: Update status.
14058
14059         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14060
14061         * exceptions-sparc.c: Fix return value in filters.
14062
14063         * inssel-sparc.brg: Fix register allocation in some rules.
14064
14065 2004-03-28  Martin Baulig  <martin@ximian.com>
14066
14067         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14068         if neccessary.  
14069
14070 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14071
14072         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14073         
14074         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14075         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14076         remove unused conv_u4 opcode.
14077
14078         * mini-x86.c: Remove valgrind workaround since it slows down things
14079         even when mono is not run under valgrind.
14080
14081 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14082
14083         * mini-sparc.c: Update status.
14084
14085         * inssel-sparc.brg: Add some optimizations.
14086
14087         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14088         future delay slot filling. Add support for varargs, tail calls and JMP.
14089
14090         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14091         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14092
14093         * inssel.brg: Fix register allocation in OP_ARGLIST.
14094
14095         * inssel.brg: Fix warnings.
14096
14097 2004-03-25  Martin Baulig  <martin@ximian.com>
14098
14099         * mini.c (inflate_generic_field): Removed.
14100         (mini_get_method): Removed, use mono_get_method_full(),
14101         (mini_get_class): Removed, use mono_class_get_full().
14102         (mono_method_to_ir): Pass our generic context to
14103         mono_field_from_token().        
14104
14105 2004-03-25  Martin Baulig  <martin@ximian.com>
14106
14107         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14108         of a `MonoMethod *'.
14109         (mini_get_method): Take a `MonoGenericContext *' instead
14110         of a `MonoMethod *'.
14111         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14112         a new local variable called `generic_context' which holds the
14113         current `MonoGenericContext *'; use it to lookup things.
14114
14115 2004-03-24  Martin Baulig  <martin@ximian.com>
14116
14117         * mini.c (mini_get_class): New static method; if we're inside a
14118         generic instance, inflate the class if neccessary.
14119         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14120
14121 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14122
14123         * iltests.il: New regression test for #55976.
14124
14125         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14126         #55976.
14127
14128 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14131         output.
14132
14133 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14134
14135         * liveness.c: Consider SSA stores as well as loads when making vars
14136         volatile.
14137
14138         * exceptions.cs: New regression tests for register allocation.
14139         
14140 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14141
14142         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14143         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14144           domain lock only to protect puntual access to data structures.
14145           Added access lock for sighash, jit_icall_hash_name, 
14146           jit_icall_hash_addr and domain->code_mp.
14147
14148 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14149
14150         * driver.c: Print SIGSEGV handling method.
14151
14152         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14153
14154         * mini.c (setup_jit_tls_data): Handle case when this is called
14155         multiple times for a thread.
14156
14157         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14158         is different from fbxx_un. Fixes #54303. Also use constants instead of
14159         magic numbers in a lot of places.
14160
14161 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14162
14163         * exceptions.cs: Fix cctor test when --regression is used.
14164
14165 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14166
14167         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14168         for Linux/ppc.
14169
14170 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14171
14172         * inssel-ppc.brg: fixed register assignments for some rules.
14173
14174 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14175
14176         * exceptions.cs: Add test for exceptions in static constructors.
14177
14178         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14179         static constructors outside the domain lock. Fixes #55720.
14180
14181 2004-03-17  Martin Baulig  <martin@ximian.com>
14182
14183         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14184         (inflate_generic_field): Take the `MonoMethod *' instead of the
14185         `MonoClass *' and added support for generic method.
14186         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14187         have a `field->parent->gen_params', only inflate the field if it's
14188         an open constructed type.
14189
14190 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14191
14192         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14193         exception object instead of the preconstructed ones.
14194
14195 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14196
14197         * mini.c: reverted changed to sigsegv_signal_handler commited
14198         accidentally in the previous patch.
14199
14200 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14201
14202         * mini.c:
14203         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14204         running --aot with an old assembly.
14205
14206 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14207
14208         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14209         point values.
14210
14211         * mini-sparc.c: Add support for v9 branches with prediction.
14212
14213 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14214
14215         * mini.c (mini_init): #warning is GNUC only
14216
14217         * mini-sparc.h: implement __builtin_frame_address
14218         and __builtin_return_address for Sun C compiler
14219
14220 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14223
14224 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14225
14226         * basic-calls.cs: Add test for unaligned byref long argument passing.
14227
14228         * mini-ops.h: Add sparcv9 compare and branch instructions.
14229
14230         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14231         v9 instructions if we have a v9 cpu.
14232
14233         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14234         registers for global allocation.
14235
14236         * exceptions-sparc.c: Fixes.
14237         
14238 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14239
14240         * liveness.c (mono_analyze_liveness): Optimized version.
14241
14242         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14243
14244         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14245         sparc work.
14246
14247         * basic-float.cs basic-calls.cs: New regression tests.
14248
14249 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14250
14251         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14252         sigaltstack implementation.
14253
14254         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14255         
14256         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14257         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14258
14259 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14260
14261         * mini.c: Fix warnings.
14262         
14263         * mini.c (mono_resolve_patch_target): New function which contains the
14264         arch independent part of the patching process.
14265
14266         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14267         patching code to a separate function.
14268
14269 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14270
14271         * mini.c (add_signal_handler): ifdef out on Windows
14272
14273 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14274
14275         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14276         cpu-sparc.md: Add exception handling support + other fixes.
14277
14278         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14279         typed GC detection in --version.
14280
14281         * basic.cs exceptions.cs: New regression tests.
14282
14283         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14284         the arch specific code can store data during a compilation.
14285
14286         * mini-ops.h: Add OP_SETFRET.
14287
14288         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14289         function, register a separate icall for each arity, so the icalls can
14290         get a wrapper.
14291         
14292         * mini.c (mono_print_tree): Print negative offsets in a more readable
14293         form.
14294         
14295         * mini.c: Make signal handling work on sparc.
14296         
14297         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14298
14299         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14300
14301         * jit-icalls.c: Emulate truncl by aintl on solaris.
14302
14303         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14304
14305 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14306
14307         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14308
14309 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14310
14311         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14312         a MarshalByRef type, inline a method that performs the check, taking into
14313         account that the object can be a proxy. Also implemented tow new opcodes:
14314         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14315         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14316         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14317
14318 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14319
14320         * mini-ppc.c: if a relative branch displacement is too big
14321         but it points to and area reachable with an absolute branch, 
14322         avoid the thunks.
14323
14324 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14325
14326         * mini.c: optimize small copies in cpblk.
14327
14328 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14329
14330         * basic-calls.cs basic-float.cs: New regression tests.
14331
14332         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14333         negative offsets from %fp. Implement localloc. Fix local register 
14334         allocation. Fix the case when the this argument needs to be saved to
14335         the stack. Implement some missing opcodes.
14336
14337 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14338
14339         * mini.c (mini_method_compile): Reenable global regalloc in methods
14340         with exception handlers.
14341
14342         * linear-scan.c (mono_varlist_sort): Fix warning.
14343
14344         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14345
14346         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14347         regalloc costs.
14348
14349         * liveness.c: Make all variables uses in exception clauses volatile, to
14350         prevent them from being allocated to registers. Fixes #42136.
14351
14352 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14353
14354         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14355         causes regressions.
14356
14357         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14358         argument to mono_arch_regalloc_cost.
14359
14360         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14361         precisely.
14362
14363 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14364
14365         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14366         Make the cost of allocating a variable to a register arch dependent.
14367
14368         * basic-calls.cs: Fix compilation of tests.
14369         
14370         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14371         helper function to cut back on the number of #ifdefs needed.
14372
14373         * mini-ppc.c: Fix compilation.
14374
14375         * basic-calls.cs: New regression tests.
14376
14377         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14378
14379         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14380         of l0 since that is callee saved.
14381
14382         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14383         to virtual calls.
14384
14385         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14386         of delay instruction.
14387
14388         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14389
14390         * mini.h (MonoCallInst): Add 'virtual' flag.
14391
14392         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14393
14394 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14395
14396         * *.cs: New regression tests.
14397
14398         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14399         work.
14400
14401         * mini.c (mono_runtime_install_handlers): Fix build.
14402
14403         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14404         'signal_stack_size' members.
14405
14406         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14407         alternate signal stack.
14408
14409         * exceptions-x86.c: Add stack overflow handling.
14410
14411         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14412         functions to arch independent code.
14413
14414         * mini.c (mono_print_tree): Print more detailed info for load_membase
14415         opcodes.
14416         
14417 2004-02-23  Martin Baulig  <martin@ximian.com>
14418
14419         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14420
14421 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14422
14423         * mini-x86.c: fixed reg allocation for div/rem.
14424
14425 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14426
14427         * driver.c (mono_main): Report some configuratio options on --version.
14428
14429 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14430
14431         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14432         low in the address space. Correctly flush memory in thunks where we
14433         output native code.
14434
14435 2004-02-20  Martin Baulig  <martin@ximian.com>
14436
14437         * mini.c (mini_get_method): New static method; inflate all generic
14438         methods and methods in open generic instances.
14439         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14440         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14441
14442 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14445
14446         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14447
14448 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14449
14450         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14451
14452         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14453         it compile using Sun's compiler.
14454
14455 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14456
14457         * 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.
14458
14459         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14460
14461 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14462
14463         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14464         code.
14465         * mini-ppc.c: handle calls outside of the allowed range with thunks
14466         allocated using the code manager.
14467         * tramp-ppc.c: use the code manager to hold generated native code.
14468         Fixed the magic trampoline to just patch vtable entries.
14469
14470 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14471
14472         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14473         independent file.
14474
14475 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14476
14477         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14478         PPC.
14479
14480         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14481         if we have a working __thread implementation.
14482
14483         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14484         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14485
14486 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14487
14488         * mini-x86.c: Fix compilation under gcc 2.
14489         
14490 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14491
14492         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14493         contains a call to the wrapped function.
14494
14495         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14496         OP_<CALL>_IMM opcodes, and use them under X86.
14497         
14498         * mini.c (mono_jit_find_compiled_method): Fix warning.
14499
14500         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14501
14502         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14503
14504         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14505         functionality to mini.c.
14506
14507         * mini.c (mono_create_jump_trampoline): New function to create a jump
14508         trampoline. Return a compiled method instead of a trampoline if it
14509         exists. Add a cache for jump trampolines.
14510
14511         * mini.c (mono_jit_find_compiled_method): New function to return a
14512         compiled method if it exists.
14513
14514         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14515         mono_arch_create_jit_trampoline.
14516
14517         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14518         a jump trampoline. Fixes #52092.
14519         
14520 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14521
14522         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14523         which is not up-to-date. Add check_corlib_version () instead.
14524
14525         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14526         have to call it.
14527         
14528         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14529         since newer valgrind versions do not need it.
14530
14531         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14532         compile a method with a given set of optimizations.
14533
14534         * mini.c: Compile icall wrappers on-demand instead of at startup.
14535
14536         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14537         wrapper for an icall.
14538
14539 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14540
14541         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14542         #54063.
14543
14544         * iltests.il: Add test for non-empty stack before switch instruction.
14545
14546 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14547
14548         * mini.c: Add support for new stringbuilder marshalling conventions.
14549
14550         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14551
14552 2004-02-01  Martin Baulig  <martin@ximian.com>
14553
14554         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14555         in `ginst->mtype_argv'.
14556
14557 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14558
14559         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14560         facilitate grepping.
14561
14562 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14563
14564         * mini.c: fixed buglet in initobj generic implementation for references.
14565
14566 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14567
14568         * Makefile.am: make the version script conditional.
14569         * jit-icalls.c: handle missing truncl().
14570
14571 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14572
14573         * exceptions.cs: Add more tests for double->int conversion.
14574
14575         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14576         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14577
14578 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14579
14580         * driver.c: make --verbose --version emit an error
14581         if the loaded corlib doesn't match the runtime version.
14582
14583 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14584
14585         * mini-ppc.h: export ppc_patch().
14586         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14587         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14588         on par or better than on MacOSX.
14589
14590 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14591
14592         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14593         mono_lookup_pinvoke_call.
14594
14595         * mini-x86.c: Under windows, the default pinvoke calling convention is
14596         stdcall. Fixes #52834.
14597
14598         * mini.c (optimize_branches): Add an upper bound to the number of
14599         iterations to prevent infinite loops on strange loops. Fixes #53003.
14600
14601 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14602
14603         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14604         and ISINST. Fixes #52093.
14605
14606         * objects.cs (test_0_vector_array_cast): New tests.
14607         
14608 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14609
14610         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14611         checking in Array.Set ().
14612
14613         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14614         #52590.
14615
14616         * object.cs (test_0_multi_array_cast): New regression test.
14617
14618 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14619
14620         * exceptions-ppc.c: fix build on Linux/PPC.
14621
14622 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14623
14624         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14625         running under valgrind.
14626         (x86_magic_trampoline): Fix build bustage.
14627
14628         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14629         negative values as well. This is needed for the encoding of the line number
14630         info, since sometimes the line numbers are not in increasing order.
14631
14632 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14633
14634         * cpu-pentium.md (localloc): Increase the size of the localloc 
14635         instruction since it is a loop under Win32.
14636
14637         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14638         allocation.
14639
14640 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14641
14642         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14643         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14644         Max Horn (max@quendi.de). Fix file names in comments.
14645
14646 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14647
14648         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14649         avoid stack overflow.
14650         (replace_usage): Avoid uninitialized variable warnings.
14651
14652         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14653         and taking the address of valuetype variables.
14654
14655 2004-01-03  Patrik Torstensson
14656
14657         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14658         for other purposes than FP later on.
14659
14660 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14661
14662         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14663         of tail calls.
14664
14665 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14666
14667         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14668
14669 2003-12-30  Patrik Torstensson <p@rxc.se>
14670
14671         * mini-x86.h: Decreased number of availiable fp regs.
14672         Solves corner cases with FP spilling.
14673
14674 2003-12-23  Patrik Torstensson <p@rxc.se>
14675
14676         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14677         for floating point stack tracking / spilling on x86. 
14678         Fixes bug #49012.
14679         
14680         * basic-float.cs: added float mul overflow test.
14681
14682 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14683
14684         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14685
14686 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14687
14688         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14689         supports for cond branches that overflow the immediate
14690         overflow offset. mcs can compile simple programs.
14691
14692 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14693
14694         * exceptions-ppc.c: exception handling support wip:
14695         finally handlers get run on exception.
14696
14697 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14698
14699         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14700         profiling.
14701
14702 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14703
14704         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14705         initial support for stack walking and unwinding.
14706
14707 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14708
14709         * driver.c (mono_main): Make corlib-out-of-sync message more 
14710         descriptive. Also remove verify_corlib call.
14711
14712 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14713
14714         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14715         not overlap with other call's arguments, too.
14716
14717 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14718
14719         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14720         move to arch-specific code the choice of arch-specific
14721         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14722         * mini.c: ensure emulation calls will not interleave
14723         with other calls.
14724
14725 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14726
14727         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14728         the magic trampoline stack frame is dropped before executing
14729         the new method.
14730
14731 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14732
14733         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14734         and integer to fp conversions. Added support for overflowing
14735         arguments on the stack. Reserve a couple more registers as temps.
14736         Added support for aot compilation (as output still needs to be
14737         tweaked, though).
14738
14739 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14740
14741         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14742         Don't overwrite return register in some corner cases.
14743
14744 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14745
14746         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14747         static constructors when AOT compiling.
14748
14749         * driver.c (mono_main): Call mono_check_corlib_version.
14750
14751 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14752
14753         * cpu-g4.md, basic.cs: fixed div target register.
14754
14755 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14756
14757         * mini-ppc.c, basic.cs: shl_imm fix with test.
14758
14759 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14760
14761         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14762         structures by value. Misc fixes.
14763         * objects.cs: more tests.
14764
14765 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14766
14767         * mini-ppc.c: lconv.ovf.i implemented.
14768
14769 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14770
14771         * mini.c:
14772         (mini_init): don't error out if someone already called g_thread_init.
14773
14774 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14775
14776         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14777         to be any type per the spec. Fix abnormal memory usage when
14778         the same object is repeatedly thrown.
14779
14780 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * mini.c: check for overruns in IL code.
14783
14784 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14785
14786         * TODO: Add/remove some todo entries.
14787
14788 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14789
14790         * driver.c (mono_main): Call mono_verify_corlib.
14791
14792 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14793
14794         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14795         This has been moved to mini.c
14796         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14797         type being casted is marshalbyref it could be a proxy, so instead of
14798         emitting the type check code, emit a call to a runtime method that will
14799         perform the check by calling CanCastTo if needed.
14800
14801 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14802
14803         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14804         methods with large stack frames under Win32.
14805
14806 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14807
14808         * Makefile.am: Distribute regression tests.
14809
14810         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14811         at the end instead of inserting each variable into the sorted list.
14812
14813         * linear-scan.c (mono_varlist_sort): New helper function.
14814         
14815 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14816
14817         * mini.c: ensure arguments and locals are within bounds.
14818
14819 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14820
14821         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14822         related fixes.
14823
14824 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14825
14826         * mini.c (mono_cprop_copy_values): Fix crash.
14827
14828         * aot.c: Set verbosity back to 0.
14829         
14830 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14831
14832         * regalloc.c: complete memory leak fix by Laurent Morichetti
14833         (l_m@pacbell.net).
14834
14835 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14836
14837         * driver.c (main_thread_handler): Revert the previous patch.
14838
14839         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14840         under valgrind.
14841
14842         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14843         memory from the memory pool.
14844
14845         * driver.c (main_thread_handler): Turn on all optimizations when
14846         --aot is used.
14847
14848         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14849         an array for better performance.
14850
14851         * regalloc.c (mono_regstate_assign): Fix memory leak.
14852
14853         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14854         serialize the debug info.
14855
14856         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14857         debug info from the serialized representation.
14858
14859         * aot.c: Save debug info into the generated file and load it when 
14860         loading a method.
14861
14862         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14863
14864 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14865
14866         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14867         More FP-related fixes.
14868
14869 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14870
14871         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14872         and register allocation buglet. Hello world now runs.
14873
14874 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14875
14876         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14877         * tramp-ppc.c: fixed class init trampoline.
14878         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14879
14880 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14881
14882         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14883         mini.c: more ppc changes/fixes.
14884
14885 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14886
14887         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14888         Also optimize the case when the arguments are the same in the caller 
14889         and in the callee.
14890
14891         * iltests.il: Add tests for tail calls with valuetype arguments.
14892
14893 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14894
14895         * mini-ppc.c: fixes for struct return type.
14896
14897 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14898
14899         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14900         mono_spillvar_offset() to arch-specific code.
14901
14902 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14903
14904         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14905
14906 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14907
14908         * exceptions-x86.c: Fix stack space leaks.
14909         
14910         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14911         registers from the lmf if the method has save_lmf set.
14912
14913 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14914
14915         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14916         of icall wrappers into InvokeInDomain, since these are now per-domain.
14917
14918 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14919
14920         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14921         make some opcode emulation and intrinsic ops enabled/disabled 
14922         according to the architecture. More fixes.
14923
14924 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14925
14926         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14927
14928 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14929
14930         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14931         arch-specific handling for 'this' and struct return type to
14932         arch-specific code.
14933
14934 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14935
14936         * aot.c: prevent divide by zero error when reporting (it happened with
14937         Accessibility.dll).
14938
14939 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14940
14941         * mini.h (inst_switch): Remove unused macro.
14942
14943 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14944
14945         * aot.c:
14946         (load_aot_module): free 'info->methods' and 'info' properly. No more
14947         "free(): invalid pointer blah" messages when you have an old aot
14948         compiled assembly.
14949
14950 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14951
14952         * jit-icalls.c, mini.c: Added support for context static fields.
14953
14954 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14955
14956         * mini.c (mono_method_blittable): Methods which set LastError are not 
14957         blittable either. Fixes #51108.
14958         
14959 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14960
14961         * mini.c: flush icache.
14962         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14963
14964 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14965
14966         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14967
14968 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14969
14970         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14971         safe on IA32.
14972
14973         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14974         vararg calls.
14975
14976         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14977
14978 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14979
14980         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14981         instruction when the result is discarded.
14982
14983         * iltests.il (test_0_div_regalloc): New regression test.
14984
14985         * arrays.cs: Fix compilation error.
14986
14987 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14988
14989         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14990         float rules to inssel-x86.brg: sane architectures with FP registers
14991         don't need to implement these rules.
14992
14993 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14994
14995         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14996
14997 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14998
14999         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15000         implementation of 32 bit systems.
15001
15002 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15003
15004         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15005         (Jeroen Zwartepoorte).
15006
15007 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15008
15009         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15010         the caller and the callee matches.
15011         
15012         * mini.c (mono_method_to_ir): Add comment.
15013
15014         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15015         signbit is missing on some platforms.
15016
15017 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15018
15019         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15020
15021         * mini.c (setup_jit_tls_data): Call the new function.
15022         
15023         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15024
15025         * mini-x86.c: Add experimental support for fast access to the lmf
15026         structure under NPTL/Linux 2.6.x.
15027
15028 2003-11-06  Martin Baulig  <martin@ximian.com>
15029
15030         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15031         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15032         the debugger.
15033
15034 2003-11-02  Martin Baulig  <martin@ximian.com>
15035
15036         * mini.c (inflate_generic_field): New static method.
15037         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15038         generic instance and the field is declared in a generic type, call
15039         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15040
15041 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15042
15043         * mini.h mini.c (mono_method_same_domain): New function to return
15044         whenever the caller and the callee are in the same domain.
15045
15046         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15047
15048 2003-10-30  Martin Baulig  <martin@ximian.com>
15049
15050         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15051         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15052         method parameters.
15053         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15054         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15055
15056 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15057
15058         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15059         propagation.
15060
15061         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15062         object here, so it is in the correct appdomain etc.
15063
15064 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15065
15066         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15067         already done.
15068         (mono_method_to_ir): Avoid freeing the type created returned from
15069         mono_type_create_from_typespec, since it is put into an internal cache
15070         by the function. Fixes pointer.exe.
15071
15072         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15073         trampolines for icalls and pinvokes as well. Fixes #33569.
15074
15075 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15076
15077         * mini.c: Update after appdomain changes.
15078
15079         * mini.c (mono_jit_compile_method_inner): Allways compile native
15080         method wrappers in the root domain, since there can only be one
15081         instance of them, whose address is stored in method->info.
15082
15083 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15084
15085         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15086         environment variable. Instead detect automatically whenever running
15087         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15088         valgrind.h.
15089
15090 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15091
15092         * trace.c, trace.h: New files that implement the new trace option
15093         parsing. 
15094
15095         * driver.c: Document new --trace options.
15096
15097         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15098         mini-x86.c: Apply:
15099
15100         -       if (mono_jit_trace_calls)
15101         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15102
15103         * mini.h: prototypes.
15104         
15105 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15106
15107         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15108
15109         * mini.c inssel.brg: Implement typedefbyref opcodes.
15110
15111         * mini.c (mono_jit_compile_method): Remove unused local variable.
15112
15113         * mini.c (mono_jit_compile_method_inner): Ditto.
15114         
15115 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15116
15117         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15118         
15119         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15120
15121 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15122
15123         * mini.c (mono_no_aot): Remove unused global variable.
15124
15125         * mini.c: Thread safety fixes.
15126
15127 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15128
15129         * mini.c (mono_create_class_init_trampoline): Add a lock around
15130         class_init_hash_addr.
15131
15132         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15133         #30073.
15134
15135         * mini.c: Decompose the NEWARR instruction before decomposing its
15136         arguments. Fixes #30073.
15137
15138 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15139
15140         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15141         convention.
15142
15143 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15144
15145         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15146
15147         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15148
15149         * driver.c: Add support for compiling icall wrappers to --compile.
15150
15151 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15152
15153         * inssel.brg: The empty value in class->interface_offsets is -1, not
15154         0. Fixes #49287.
15155
15156 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15157
15158         * objects.cs: New test for 'is' operator on an array of interfaces.
15159
15160 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15161
15162         * tramp-ppc.c: update trampoline code to support jumps
15163         and class initialization.
15164
15165 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15166
15167         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15168
15169         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15170
15171         * inssel.brg (OP_UNBOX): Remove unused rule.
15172
15173         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15174         region instead of one for each method. Fixes #47813.
15175
15176 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15177
15178         * exceptions.cs (test_0_nested_finally): New regression test for
15179         nested exception handlers.
15180
15181         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15182
15183         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15184
15185         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15186         inlining.
15187
15188         * mini.c (mono_method_check_inlining): Make the inlining limit 
15189         configurable by an environment variable.
15190         
15191         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15192
15193         * mini.h: Bump AOT file version.
15194
15195         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15196         token, store the image along with the token, since the token might not 
15197         refer to the same image as the method containing the relocation, 
15198         because of inlining.
15199
15200 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15201
15202         * mini.c (mono_precompile_assemblies): New function to compile
15203         all methods in all loaded assemblies.
15204
15205         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15206
15207         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15208         iassign and fassign to int*, since they can contain large negative
15209         values if the register is spilled. Also added some comments. Fixes
15210         #45817.
15211
15212         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15213         under Win32. Fixes #42964.
15214
15215 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15216
15217         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15218
15219         * aot.c: Added support for AOT compiling methods which contain calls
15220         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15221         handled.
15222         
15223         * driver.c (compile_all_methods): Run the compilation in a thread
15224         managed by mono. Fixes #44023.
15225
15226         * mini.c (mono_codegen): Print full method name in verbose output.
15227
15228         * mini-x86.c (mono_arch_patch_code): Fix warning.
15229         
15230         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15231         jumps, since the method we are jumping to might be domain-specific.
15232
15233         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15234
15235 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15236
15237         * inssel.brg: string chars are unsigned.
15238
15239 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15240
15241         * TODO: New todo item.
15242
15243         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15244         which calls mono_runtime_class_init and patches the call site to
15245         avoid further calls.
15246         (mono_arch_create_class_init_trampoline): New arch specific function 
15247         to create a class init trampoline.
15248         (create_trampoline_code): Generalized so it can create
15249         class init trampolines as well.
15250
15251         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15252         (mono_create_class_init_trampoline): New function to create and cache
15253         class init trampolines.
15254         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15255         vtable given the address of a class init trampoline. Used by the
15256         patching process.
15257         (mono_codegen): Generate a call to a trampoline instead of
15258         mono_runtime_class_init in LDSFLD[A].
15259         (mono_codegen): Add relocations for the new trampoline.
15260         
15261         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15262         MONO_PATCH_INFO_CLASS_INIT.
15263
15264         * mini.h: Bump AOT version number.
15265
15266         * aot.c: Create a copy of the loaded code instead of using the original
15267         so methods which call each other will be close in memory, improving
15268         cache behaviour.
15269         
15270         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15271         patch since it breaks the regression tests.
15272         
15273         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15274         for the register saving instruction sequence since the 
15275         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15276
15277 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15278
15279         * TODO: Fix todo item && remove another.
15280
15281 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15282
15283         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15284         previous checkin.
15285
15286         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15287         function of the module.
15288
15289         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15290         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15291         --no-aot command line option.
15292
15293 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15294
15295         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15296         by Bernie Solomon (bernard@ugsolutions.com).
15297
15298         * inssel.brg: Refactor the interface offset table related code into
15299         its separate functions and add support for the AOT case.
15300
15301 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15302
15303         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15304         
15305         * aot.c: Added mono_aot_verbose variable and made all debugging
15306         output depend on the value of this variable.
15307
15308         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15309         method_label and info_label.
15310
15311         * mini.h mini-x86.c aot.c: Added a new relocation type 
15312         MONO_PATCH_INFO_IID for klass->interface_id.
15313
15314         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15315         the MonoJitInfo structure.
15316
15317         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15318         a non-root appdomain in shared mode.
15319
15320 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15321
15322         * aot.c: make aot loader less verbose. Remove free of unused variable.
15323
15324 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15325
15326         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15327
15328         * .cvsignore: Added *.dll.
15329
15330         * mini.c (mono_print_tree_nl): New function callable while debugging.
15331
15332         * mini.c (mono_print_code): Export this.
15333
15334         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15335         patched code.
15336
15337 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15338
15339         * mini.h (MonoCompile): Added 'jit_info' field.
15340
15341         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15342         the cfg structure, since it is needed by the AOT compiler.
15343
15344         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15345
15346         * aot.c: A major rewrite. Changes include:
15347         - save exception tables for methods which have them.
15348         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15349         to g_module_symbol.
15350         - reworked the file format so it is now much smaller and needs
15351         fewer relocation entries.
15352         
15353 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15354
15355         * aot.c (load_aot_module): Fix build bustage on platforms without
15356         Boehm GC.
15357
15358 2003-09-04  Martin Baulig  <martin@ximian.com>
15359
15360         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15361
15362 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15363
15364         * TODO: Some new optimization ideas.
15365
15366         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15367
15368         * aot.c: Save the optimization flags used to compile the code into
15369         the AOT module.
15370
15371         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15372         support emitting domain specific code.
15373         
15374         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15375         no longer domain neutral. It can be made domain neutral by compiling 
15376         with --optimize=shared.
15377
15378         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15379         between appdomains.
15380
15381         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15382         loading of AOT code.
15383
15384         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15385         
15386         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15387         if there is no domain neutrality information.
15388
15389 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15390
15391         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15392         format version into the generated library.
15393
15394         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15395         callee method into the caller since one of them could be shared.
15396
15397         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15398         system exceptions from AOT code now works.
15399
15400         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15401         method if it is domain neutral and the callee is not.
15402
15403         * graph.c (cfg_emit_one_loop_level): Fix warning.
15404
15405 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15408         last checkin.
15409
15410 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15411
15412         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15413         is needed  by code which is executed before mono_runtime_init ().
15414         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15415         
15416         * mini.c (mono_thread_abort): Fix warning.
15417         (mono_jit_compile_method): Call static constructor in the AOT case too.
15418
15419         * aot.c (mono_compile_assembly): Fix warning.
15420
15421 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15422
15423         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15424
15425 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15426
15427         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15428
15429         * cpu-pentium.md: Fix the length of call opcodes so they include the
15430         ESP restoring instruction. Fixes #47968.
15431
15432 2003-08-28  Martin Baulig  <martin@ximian.com>
15433
15434         * mini-x86.c (mono_arch_call_opcode): Added support for
15435         MONO_TYPE_GENERICINST.
15436
15437         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15438
15439 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15440
15441         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15442         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15443
15444         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15445         metadata_section.
15446
15447 2003-08-26  Martin Baulig  <martin@ximian.com>
15448
15449         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15450         when reporting an error, set this to the actual error location.
15451         (mono_method_to_ir): Report the correct error location if
15452         get_basic_blocks() returned an error.
15453
15454 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15455
15456         * mini.c (mono_type_blittable): OBJECT is not blittable.
15457         (mono_method_blittable): Methods which have marshalling descriptors
15458         are not blittable either. Fixes #47842.
15459
15460 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15461
15462         * driver.c mini.c: Use an environment variable instead of a global 
15463         variable. Also fix the build.
15464
15465         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15466         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15467         reporting this. 
15468
15469         * driver.c mini.c: Added --with-valgrind option to turn off some
15470         code which prevents mono from running under valgrind.
15471
15472         * mini.c (mono_emit_call_args): Fixed warning.
15473
15474         * mini.c (mono_emulate_opcode): Fixed warning.
15475
15476 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15477
15478         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15479         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15480         regalloc.c, regalloc.h: specify available registers in arch-specific
15481         code and support floats in the regallocator (patch by Laurent Morichetti 
15482         <l_m@pacbell.net>)
15483
15484 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15485
15486         * mini.c: mono_thread_current() can be called only after
15487         mono_runtime_init(): rearrange code to not call it early on.
15488
15489 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15490
15491         * mini.c: allocate jump tables in the code mempools.
15492
15493 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15494
15495         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15496         freed.
15497
15498 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15499
15500         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15501         12 to 16.  This fixes bug #47453.
15502
15503
15504 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15505
15506         * mini-ppc.c: fixed indexed load and unsigned compares.
15507
15508 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15509
15510         * mini.c: reenabled installation of handler for
15511           thread abort signal.
15512
15513 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15514
15515         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15516         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15517         until it's fixed and actually useful.
15518
15519 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15520
15521         * inssel-long32.brg: couple more opcodes implemented.
15522
15523 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15524         
15525         * mini-sparc.c: Even more opcodes implemeted.
15526
15527 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15528
15529         * mini-sparc.c: More opcodes implemented.
15530
15531 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15532
15533         * mini-sparc.c: More opcodes implemented.
15534
15535 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15536
15537         * inssel-sparc.brg: Add some needed rules.  Direct
15538         copy from PPC.
15539         * Makefile.am: Use inssel-sparc.brg
15540         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15541         an assert happy for now.
15542
15543 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15544
15545         * mini-sparc.c: Fixed compile errors.
15546         * exceptions-sparc.c: Same.  We now produce a mono binary 
15547         on sparc-linux.  Yea.
15548
15549 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15550
15551         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15552         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15553         They compile, but do not work.
15554
15555 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15556
15557         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15558         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15559         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15560         (ct@gentoo.org).
15561
15562 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15563
15564         * mini.c: more opcodes implemented and better support for generics.
15565
15566 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15567
15568         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15569         * mini.c, mini.h: first cut at generics support: some new instructions 
15570         added and changed the behaviour of some of the existing ones.
15571
15572 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15573
15574         * mini.c: Removed definition of metadata_shared mutex here.
15575
15576 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15577
15578         * mini-x86.c: make vararg calls work for instance methods.
15579
15580 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15581
15582         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15583         returns the arguments in a separte list, now.
15584
15585 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15586
15587         * aot.c, mini.c: updates for array type representation changes.
15588
15589 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15590
15591         * mini.c: register function to perform jit shutdown.
15592
15593 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15594
15595         * mini.c: use a faster allocator if possible.
15596
15597 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15598
15599         * aot.c: some cleanups and portability changes.
15600
15601 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15602
15603         * mini.c: use faster allocation for CEE_BOX if possible.
15604
15605 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15606
15607         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15608         Moved inlined mempcy code to its own function so that is can be
15609         reused. Added an inline memset function as well (optimized initobj).
15610         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15611
15612 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15613
15614         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15615
15616 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15617
15618         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15619         arch code can setup the cpu for CLR execution, if needed.
15620         We use it on x86 to set the precision of FP operations.
15621
15622 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15623
15624         * mini.c: disable some optimizations if we can guess they'll cost too
15625         much for a given method.
15626
15627 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15628
15629         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15630         
15631 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15632         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15633         info collection support.
15634
15635 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15636
15637         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15638         is now implemented in the profiling API. Get rid of a couple of
15639         unnecessary global variables.
15640
15641 2003-06-15  Nick Drochak <ndrochak@gol.com>
15642
15643         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15644         * cpu-g4.md: add op_bigmul and op_bigmul_un
15645         * cpu_pentium.md: add op_bigmul_un
15646         * inssel-long32.brg: add rule for unsigned bigmul
15647         * mini-ops.h: define OP_BIGMUL_UN
15648         * mini-x86.c: THE BUG: handle (un)signed properly
15649         * mini.c: choose unsigned opcode if needed.
15650         This set of patches fixes bug #44291
15651
15652 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15653
15654         * mini.c (optimize_branches): improved to handle all kinds of
15655         conditional branches.
15656
15657 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15658
15659         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15660         don't raise exceptions.
15661
15662 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15663
15664         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15665         to arch-specific files.
15666
15667 2003-06-09  Martin Baulig  <martin@ximian.com>
15668
15669         * Makefile.am (libs): Added $(LIBGC_LIBS).
15670
15671 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15672
15673         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15674         and OP_ATAN (fixes bug#44293).
15675
15676 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15677
15678         * Makefile.am, mini-x86.c: rename cpu description array to
15679         pentium_desc, since some compilers define the 'pentium' preprocessor
15680         symbol.
15681
15682 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15683
15684         * mini.c (mini_select_instructions): add explicit branch if the
15685         following block is not the false target of a conditional branch -
15686         we need this with any optimization that reorder or remove bblocks
15687
15688         * mini.c (optimize_branches): bug fixes
15689
15690 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15691
15692         * mini.c (mono_method_to_ir): inline static readonly fields
15693
15694         * ssa.c (fold_tree): start cfold support for long (very simple
15695         cases only)
15696
15697         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15698
15699 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15700
15701         * inssel.brg: fixed memcpy (bug #44219).
15702
15703 2003-06-05  Dick Porter  <dick@ximian.com>
15704
15705         * driver.c: Set the glib log levels to not abort if g_message
15706         recurses.
15707
15708         g_set_prgname() has to happen before mini_init() so that the
15709         process handle gets the info.
15710         
15711 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15712
15713         * driver.c: add intrins to the default optimizations to get wider
15714         exposure.
15715
15716 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15717
15718         * mini.h: some large basic blocks will overflow a 16-bit
15719         integers for symbolic registers.
15720
15721 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15722
15723         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15724         (mono_arch_output_basic_block): fix bug 43499 
15725
15726 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15727
15728         * mini.c: kill duplicated definition of mono_debug_format.
15729
15730 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15731
15732         * mini-x86.c, arrays.cs: fixed register allocation bug.
15733
15734 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15735
15736         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15737
15738         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15739
15740 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15741
15742         * mini.c:
15743         (print_method_from_ip): also print source location information if
15744         available.
15745
15746 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15747
15748         * mini.c (mono_find_block_region): bug fix in region code
15749         (mini_method_compile): enable removing unreachable code again, but
15750         only in methods without exception clauses.
15751
15752 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15755         Implemented arglist opcode and handling of TypedReference type.
15756         Fixed x86 call convention when a structure is returned.
15757         Minimal support for calling static vararg methods.
15758
15759 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15760
15761         * mini.c (mini_method_compile):  always remove unreachable code,
15762         because the code in them may be inconsistent  (access to dead
15763         variables for example).
15764
15765 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15766
15767         * driver.c, debug-mini.c: warning fixes.
15768
15769 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15770
15771         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15772
15773 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15774
15775         * mini.c: thread-static fields are registered in mono_class_vtable(),
15776         so ensure the function is called before checking for them.
15777
15778 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15779
15780         * mini.c (optimize_branches): fix for bug 43586
15781
15782         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15783         overflow (fixes Bug #43639)
15784
15785 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15786
15787         * mini.c, objects.cs: allow the use of stobj for primitive types.
15788
15789 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15790
15791         * mini.c: be less strict about argument checking until we support
15792         running the verifier.
15793
15794 2003-05-27  Nick Drochak <ndrochak@gol.com>
15795
15796         * basic-long.cs: tests for (ulong)int * (ulong)int also
15797         * mini.c: use the same trick for (ulong)int * (ulong)int
15798
15799 2003-05-27  Nick Drochak <ndrochak@gol.com>
15800
15801         * basic-long.cs: add regression test for (long)int * (long)int
15802         * cpu-pentium.md: add op_bigmul specification
15803         * inssel-long32.brg: add OP_BIGMUL rule
15804         * mini-ops.h: add OP_BIGMUL
15805         * mini-x86.c: register allocator: handle case where src1 needs to be
15806         in EAX.
15807         * mini.c: substitute special BIGMUL opcode in the tree for 
15808         (long)int * (long)int
15809
15810 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15811
15812         * jit-icalls.c: call the type ctor on field access if needed.
15813
15814 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15815
15816         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15817         to a method (including results of ldelema, bug#43207).
15818
15819 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15820
15821         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15822         colors to show exception handler blocks.
15823
15824         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15825         (fix for pinvoke7.cs).
15826
15827 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15828
15829         * mini.h, mini.c: ensure correct initialization order for types that
15830         require it. Prepare for lazy compilation of jit icall wrappers.
15831         Provide a name for opcode emulation to reduce unneeded mallocing.
15832
15833 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15834
15835         * mini-x86.c: better register restoring code and profiling
15836         support for tail calls.
15837
15838 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15839
15840         * mini.h, driver.c: prepare for leaf methods optimization.
15841
15842 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15843
15844         * mini.c: get targets of branches before converting a method.
15845
15846 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15847
15848         * mini.c (optimize_branches): added some experimental code (disbaled) 
15849
15850 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15851
15852         * mini.c (optimize_branches): fix branch to branch optimization 
15853
15854         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15855
15856         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15857
15858         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15859
15860         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15861         if needed.
15862
15863 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15864
15865         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15866         enable use of interface variables again.
15867
15868         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15869         I1 to registers because there is no simply way to sign extend 8bit
15870         quantities in caller saved registers on x86.
15871
15872         * inssel-float.brg: set costs of some rules to 2 so
15873         that monobure always select the arch. specific ones if supplied,
15874         regardless of the order we pass the files to monoburg.
15875
15876 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15877
15878         * mini.c, mini-x86.c: since the magic trampoline for jumps
15879         can't patch the code directly, we do it as soon as the
15880         method gets compiled.
15881
15882 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15883
15884         * mini-x86.c, mini.h: introduce a new patching method
15885         to support CEE_JMP and tail calls.
15886         * mini.c: obey tail.call. Don't precompile methods target
15887         of CEE_JMP.
15888         * tramp-x86.c: new trampoline code to handle methods
15889         reached through a jump.
15890
15891 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15892
15893         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15894         bit values to registers
15895
15896 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15897
15898         * mini.c (mono_compile_get_interface_var): share interface
15899         variables if possible.
15900
15901 2003-05-16  Martin Baulig  <martin@ximian.com>
15902
15903         * debug-mini.c (mono_init_debugger): New function to initialize
15904         the debugger.  This is not in the debugger since it needs to
15905         access some of mini's internals.
15906
15907 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15908
15909         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15910
15911 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15912
15913         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15914         for value type handling.
15915
15916 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15917
15918         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15919         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15920
15921 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15922
15923         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15924           the constructor through a proxy.
15925
15926 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15927
15928         * jit-icalls.c, inssel.brg: fixes to array element address
15929         calculations.
15930
15931 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15932
15933         * mini-x86.c (is_regsize_var): allocate pointer to registers
15934
15935 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15936
15937         * driver.c: fixed typo, added intrins to the set of optimizations
15938         tested with regressions.
15939
15940 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15941
15942         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15943         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15944         test case.
15945
15946 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15947
15948         * inssel.brg: remove some common pop instructions without side effects
15949
15950 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15951
15952         * inssel-x86.brg: fixed thinko in int to double conversions.
15953
15954 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15955
15956         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15957
15958 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15959
15960         * inssel-long32.brg: two more missing instructions.
15961
15962 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15963
15964         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15965         if not already set.
15966
15967 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15968
15969         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15970         correctly.
15971
15972         * basic-float.cs: Added tests for negative zero.
15973
15974 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15975
15976         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15977         a couple of missing operations for long casts, with test cases.
15978
15979 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15980
15981         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15982
15983 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15984
15985         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15986         code size estimation.
15987
15988 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15989
15990         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15991         abstract methods (fix bug 42542)
15992
15993         * aot.c: add ability to handle array types
15994         
15995 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15996
15997         * mini.c: Call the _specific versions of the object allocation
15998         functions if possible.
15999
16000 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16001
16002         * driver.c: call setlocale ().
16003
16004 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16005
16006         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16007         windows build.
16008
16009 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16010
16011         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16012
16013         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16014         wrappers (fix bug 42122)
16015
16016 2003-05-04  Martin Baulig  <martin@ximian.com>
16017
16018         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16019
16020         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16021         s/mini_set_defaults/mono_set_defaults/g.
16022
16023 2003-05-04  Martin Baulig  <martin@ximian.com>
16024
16025         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16026
16027 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16028
16029         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16030         (reported by Don Roberts).
16031
16032 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16033
16034         * mini.c: temporarily work around two bugs for this release.
16035
16036 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16037
16038         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16039         that contains -export-dynamic and it makes using the ld script
16040         useless.
16041         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16042
16043 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16044
16045         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16046         specific cpu.
16047
16048 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16049
16050         * mini.c: make sure leave calls all the needed finally blocks,
16051         even when the target jumps out of multiple exception clauses.
16052
16053 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16054
16055         * ldscript, Makefile.am: add linker script to reduce the number of
16056         exported symbols (should also fix the issues with libwine defining
16057         some of the same symbols in io-layer).
16058
16059 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16060
16061         * driver.c (mini_main): Avoid assertion when no file name is given on 
16062         the command line.
16063
16064 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16065
16066         * driver.c: added --version/-V command line option.
16067         Added the inline optimization in the regression tests.
16068
16069 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16070
16071         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16072         to the type in the method signature (fixes bug#42134).
16073
16074 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16075
16076         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16077
16078 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16079
16080         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16081
16082 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16083
16084         * driver.c: fixed bug #42100.
16085
16086 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16087
16088         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16089
16090 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16091
16092         * mini.c: moved most of the code required to do inlining to its own
16093         function so it can be reused. Inline also ctors if appropriate.
16094
16095 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16096
16097         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16098         the runtime can call mono API functions.
16099
16100 2003-04-27  Martin Baulig  <martin@ximian.com>
16101
16102         * debug-mini.c (mono_debug_init_method): Added
16103         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16104         send a notification to the debugger.
16105
16106         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16107         running in the Mono Debugger, just pass the breakpoint number to
16108         mono_debug_init_method().
16109
16110         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16111
16112 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16113
16114         * mini.c: allow some more unsafe compares.
16115
16116 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16117
16118         * mini-x86.c, Makefile.am: make distcheck works (partially from
16119         a patch by Richard Lee <r.h.lee@attbi.com>).
16120         * regset.c, regset.h: removed, they are unused.
16121
16122 2003-04-25  Dick Porter  <dick@ximian.com>
16123
16124         * driver.c: Usage reports the name as 'mono' not 'mini'
16125         * exceptions-x86.c: Build and run on freebsd
16126
16127 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16128
16129         * Makefile.am: install the program with the 'mono' name and
16130         the library as libmono instead of mini and libmini.
16131
16132 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16133
16134         * driver.c: provide the APIs for the embedding interface of the old jit.
16135
16136 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16137
16138         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16139
16140 2003-04-23  Martin Baulig  <martin@ximian.com>
16141
16142         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16143
16144         * driver.c: Added `--debug' command line argument to enable
16145         debugging support.
16146
16147 2003-04-23  Martin Baulig  <martin@ximian.com>
16148
16149         * debug.[ch]: Removed.  The code is now in
16150         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16151
16152         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16153         last six months.
16154
16155 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16156
16157         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16158
16159 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16160
16161         * mini.c:
16162         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16163         mono_domain_finalize.
16164         (mini_method_compile): use mono_method_profile* if the the option is
16165         enabled.
16166
16167 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16168
16169         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16170         methods with their wrapper.
16171
16172         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16173         methods with their wrapper.
16174
16175         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16176         their wrapper.
16177
16178         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16179         wrapper.
16180
16181         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16182         methods.
16183
16184 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16185
16186         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16187
16188 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16189
16190         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16191         of the mempool. This is slightly faster and uses less memory
16192
16193 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16194
16195         * mini.c: avoid O(n) allocation for variables.
16196
16197 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16198
16199         * mini.c: handle items on the stack after inlining methods.
16200
16201 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16202
16203         * mini.c: make the method->opcode optimization dependent
16204         on MONO_OPT_INSTRINS and do it lazily.
16205
16206 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16207
16208         * driver.c: print overall results at the end of regression run.
16209
16210 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16211
16212         * inssel.brg: don't overwrite symbolic registers.
16213
16214 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16215
16216         * inssel-x86.brg: fix conversion from long to float.
16217
16218 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16219
16220         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16221
16222 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16223
16224         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16225
16226         * driver.c: Added --print-vtable option as in the old JIT.
16227
16228 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16229
16230         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16231
16232 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16233
16234         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16235
16236 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16237
16238         * mini.c regalloc.c regalloc.h: Fix memory leak.
16239
16240 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16241
16242         * aot.c (mono_aot_get_method): register all used strings
16243
16244 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16245
16246         * mini.c: always intern strings references with ldstr at compile time.
16247
16248 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16249
16250         * Makefile.am: add BUILT_SOURCES.
16251
16252 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16253
16254         * driver.c: give a better error message when the assembly to execute
16255         doesn't have an entry point.
16256
16257 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16258
16259         * Makefile.am: added hack for automake
16260
16261         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16262         correct sematics.
16263
16264         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16265
16266 22003-04-07  Martin Baulig  <martin@ximian.com>
16267
16268         * Makefile.am: Added Makefile.am.
16269
16270         * debugger-main.c: Removed, this is now in the debugger where it
16271         belongs.
16272
16273         * mini.pc.in: Call this package `mini' for the moment.
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287